@wildo-ai/saas-models 1.1.4 → 1.1.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (1032) hide show
  1. package/dist/esm/__tests__/setup.d.ts.map +1 -1
  2. package/dist/esm/_inspect.d.ts.map +1 -1
  3. package/dist/esm/applications/application-metadata.shared.resources-config.schemas.d.ts +1 -1
  4. package/dist/esm/applications/application-metadata.shared.resources-config.schemas.d.ts.map +1 -1
  5. package/dist/esm/applications/application-subject.shared.schemas.d.ts.map +1 -1
  6. package/dist/esm/applications/application-versions.shared.resources-config.schemas.d.ts +1 -1
  7. package/dist/esm/applications/application-versions.shared.resources-config.schemas.d.ts.map +1 -1
  8. package/dist/esm/applications/application-versions.shared.resources-config.schemas.js +2 -2
  9. package/dist/esm/applications/application-versions.shared.resources-config.schemas.js.map +1 -1
  10. package/dist/esm/applications/applications-context.schemas.d.ts +236 -18
  11. package/dist/esm/applications/applications-context.schemas.d.ts.map +1 -1
  12. package/dist/esm/applications/applications.shared.resources-config.schemas.d.ts +1 -0
  13. package/dist/esm/applications/applications.shared.resources-config.schemas.d.ts.map +1 -1
  14. package/dist/esm/applications/applications.shared.resources-config.schemas.js +1 -1
  15. package/dist/esm/applications/applications.shared.resources-config.schemas.js.map +1 -1
  16. package/dist/esm/applications/applications.shared.schemas.d.ts +3 -2
  17. package/dist/esm/applications/applications.shared.schemas.d.ts.map +1 -1
  18. package/dist/esm/applications/applications.shared.schemas.js +40 -5
  19. package/dist/esm/applications/applications.shared.schemas.js.map +1 -1
  20. package/dist/esm/billing/billing-account.shared.resources-config.schemas.d.ts +1 -2
  21. package/dist/esm/billing/billing-account.shared.resources-config.schemas.d.ts.map +1 -1
  22. package/dist/esm/billing/billing-account.shared.resources-config.schemas.js +1 -2
  23. package/dist/esm/billing/billing-account.shared.resources-config.schemas.js.map +1 -1
  24. package/dist/esm/billing/billing-account.shared.schemas.d.ts.map +1 -1
  25. package/dist/esm/billing/billing-configuration.shared.schemas.d.ts.map +1 -1
  26. package/dist/esm/billing/billing-configuration.shared.schemas.js.map +1 -1
  27. package/dist/esm/billing/billing-enums.shared.schemas.d.ts +87 -5
  28. package/dist/esm/billing/billing-enums.shared.schemas.d.ts.map +1 -1
  29. package/dist/esm/billing/billing-enums.shared.schemas.js +91 -5
  30. package/dist/esm/billing/billing-enums.shared.schemas.js.map +1 -1
  31. package/dist/esm/billing/billing-types.shared.schemas.d.ts +24 -4
  32. package/dist/esm/billing/billing-types.shared.schemas.d.ts.map +1 -1
  33. package/dist/esm/billing/billing-types.shared.schemas.js +24 -8
  34. package/dist/esm/billing/billing-types.shared.schemas.js.map +1 -1
  35. package/dist/esm/billing/credit-pool.shared.resources-config.schemas.d.ts.map +1 -1
  36. package/dist/esm/billing/credit-pool.shared.schemas.d.ts.map +1 -1
  37. package/dist/esm/billing/invoice-ref.shared.resources-config.schemas.d.ts.map +1 -1
  38. package/dist/esm/billing/invoice-ref.shared.schemas.d.ts.map +1 -1
  39. package/dist/esm/billing/price.shared.resources-config.schemas.d.ts.map +1 -1
  40. package/dist/esm/billing/price.shared.resources-config.schemas.js +32 -2
  41. package/dist/esm/billing/price.shared.resources-config.schemas.js.map +1 -1
  42. package/dist/esm/billing/price.shared.schemas.d.ts.map +1 -1
  43. package/dist/esm/billing/price.shared.schemas.js.map +1 -1
  44. package/dist/esm/billing/product-behavior-policy.shared.schemas.d.ts.map +1 -1
  45. package/dist/esm/billing/product-behavior-policy.shared.schemas.js +1 -1
  46. package/dist/esm/billing/product-behavior-policy.shared.schemas.js.map +1 -1
  47. package/dist/esm/billing/product-definition.shared.schemas.d.ts.map +1 -1
  48. package/dist/esm/billing/product.shared.resources-config.schemas.d.ts.map +1 -1
  49. package/dist/esm/billing/product.shared.resources-config.schemas.js +32 -2
  50. package/dist/esm/billing/product.shared.resources-config.schemas.js.map +1 -1
  51. package/dist/esm/billing/product.shared.schemas.d.ts +1 -0
  52. package/dist/esm/billing/product.shared.schemas.d.ts.map +1 -1
  53. package/dist/esm/billing/product.shared.schemas.js +3 -0
  54. package/dist/esm/billing/product.shared.schemas.js.map +1 -1
  55. package/dist/esm/billing/promotions.shared.resources-config.schemas.d.ts.map +1 -1
  56. package/dist/esm/billing/promotions.shared.resources-config.schemas.js +33 -3
  57. package/dist/esm/billing/promotions.shared.resources-config.schemas.js.map +1 -1
  58. package/dist/esm/billing/promotions.shared.schemas.d.ts.map +1 -1
  59. package/dist/esm/billing/referral.shared.resources-config.schemas.d.ts.map +1 -1
  60. package/dist/esm/billing/referral.shared.resources-config.schemas.js +22 -2
  61. package/dist/esm/billing/referral.shared.resources-config.schemas.js.map +1 -1
  62. package/dist/esm/billing/referral.shared.schemas.d.ts +1 -0
  63. package/dist/esm/billing/referral.shared.schemas.d.ts.map +1 -1
  64. package/dist/esm/billing/referral.shared.schemas.js +3 -0
  65. package/dist/esm/billing/referral.shared.schemas.js.map +1 -1
  66. package/dist/esm/billing/subscription.shared.resources-config.schemas.d.ts +23 -1
  67. package/dist/esm/billing/subscription.shared.resources-config.schemas.d.ts.map +1 -1
  68. package/dist/esm/billing/subscription.shared.resources-config.schemas.js +48 -2
  69. package/dist/esm/billing/subscription.shared.resources-config.schemas.js.map +1 -1
  70. package/dist/esm/billing/subscription.shared.schemas.d.ts +1 -0
  71. package/dist/esm/billing/subscription.shared.schemas.d.ts.map +1 -1
  72. package/dist/esm/billing/subscription.shared.schemas.js +3 -0
  73. package/dist/esm/billing/subscription.shared.schemas.js.map +1 -1
  74. package/dist/esm/billing/usage-flush-evidence.shared.schemas.d.ts +49 -0
  75. package/dist/esm/billing/usage-flush-evidence.shared.schemas.d.ts.map +1 -0
  76. package/dist/esm/billing/usage-flush-evidence.shared.schemas.js +48 -0
  77. package/dist/esm/billing/usage-flush-evidence.shared.schemas.js.map +1 -0
  78. package/dist/esm/billing/usage-record.shared.resources-config.schemas.d.ts.map +1 -1
  79. package/dist/esm/billing/usage-record.shared.schemas.d.ts +1 -0
  80. package/dist/esm/billing/usage-record.shared.schemas.d.ts.map +1 -1
  81. package/dist/esm/billing/usage-record.shared.schemas.js +3 -0
  82. package/dist/esm/billing/usage-record.shared.schemas.js.map +1 -1
  83. package/dist/esm/charts/aggregation-query.shared.schemas.d.ts.map +1 -1
  84. package/dist/esm/charts/chart-definition-builder.shared.d.ts.map +1 -1
  85. package/dist/esm/companion/provider-discovery.shared.schemas.d.ts +7 -1
  86. package/dist/esm/companion/provider-discovery.shared.schemas.d.ts.map +1 -1
  87. package/dist/esm/companion/provider-discovery.shared.schemas.js.map +1 -1
  88. package/dist/esm/companion/shared-library-companion.shared.definitions.d.ts.map +1 -1
  89. package/dist/esm/companion-exports.d.ts.map +1 -1
  90. package/dist/esm/compliance/audit-trails/application-audit-logs.shared.resources-config.schemas.d.ts +14 -3
  91. package/dist/esm/compliance/audit-trails/application-audit-logs.shared.resources-config.schemas.d.ts.map +1 -1
  92. package/dist/esm/compliance/audit-trails/application-audit-logs.shared.resources-config.schemas.js +21 -7
  93. package/dist/esm/compliance/audit-trails/application-audit-logs.shared.resources-config.schemas.js.map +1 -1
  94. package/dist/esm/compliance/audit-trails/audit-export-projection.shared.schemas.d.ts +450 -0
  95. package/dist/esm/compliance/audit-trails/audit-export-projection.shared.schemas.d.ts.map +1 -0
  96. package/dist/esm/compliance/audit-trails/audit-export-projection.shared.schemas.js +723 -0
  97. package/dist/esm/compliance/audit-trails/audit-export-projection.shared.schemas.js.map +1 -0
  98. package/dist/esm/compliance/audit-trails/audit-log-sink.shared.schemas.d.ts.map +1 -1
  99. package/dist/esm/compliance/audit-trails/audit-logs.shared.resources-config.schemas.d.ts +2 -2
  100. package/dist/esm/compliance/audit-trails/audit-logs.shared.resources-config.schemas.d.ts.map +1 -1
  101. package/dist/esm/compliance/audit-trails/audit-trail-config.shared.schemas.d.ts +8 -0
  102. package/dist/esm/compliance/audit-trails/audit-trail-config.shared.schemas.d.ts.map +1 -1
  103. package/dist/esm/compliance/audit-trails/audit-trail-config.shared.schemas.js +15 -0
  104. package/dist/esm/compliance/audit-trails/audit-trail-config.shared.schemas.js.map +1 -1
  105. package/dist/esm/compliance/audit-trails/auditable-events.shared.schema.d.ts +610 -16
  106. package/dist/esm/compliance/audit-trails/auditable-events.shared.schema.d.ts.map +1 -1
  107. package/dist/esm/compliance/audit-trails/auditable-events.shared.schema.js +769 -38
  108. package/dist/esm/compliance/audit-trails/auditable-events.shared.schema.js.map +1 -1
  109. package/dist/esm/compliance/audit-trails/security-audit-event-envelope.shared.schema.d.ts.map +1 -1
  110. package/dist/esm/compliance/audit-trails/security-audit-event-envelope.shared.schema.js +29 -0
  111. package/dist/esm/compliance/audit-trails/security-audit-event-envelope.shared.schema.js.map +1 -1
  112. package/dist/esm/compliance/documents/governed-document-interactions.shared.schemas.d.ts +463 -0
  113. package/dist/esm/compliance/documents/governed-document-interactions.shared.schemas.d.ts.map +1 -0
  114. package/dist/esm/compliance/documents/governed-document-interactions.shared.schemas.js +526 -0
  115. package/dist/esm/compliance/documents/governed-document-interactions.shared.schemas.js.map +1 -0
  116. package/dist/esm/compliance/documents/governed-documents.shared.schemas.d.ts +539 -15
  117. package/dist/esm/compliance/documents/governed-documents.shared.schemas.d.ts.map +1 -1
  118. package/dist/esm/compliance/documents/governed-documents.shared.schemas.js +402 -14
  119. package/dist/esm/compliance/documents/governed-documents.shared.schemas.js.map +1 -1
  120. package/dist/esm/compliance/documents/user-governed-document-acceptances.shared.resources-config.schemas.d.ts +18 -0
  121. package/dist/esm/compliance/documents/user-governed-document-acceptances.shared.resources-config.schemas.d.ts.map +1 -0
  122. package/dist/esm/compliance/documents/user-governed-document-acceptances.shared.resources-config.schemas.js +89 -0
  123. package/dist/esm/compliance/documents/user-governed-document-acceptances.shared.resources-config.schemas.js.map +1 -0
  124. package/dist/esm/compliance/documents/user-governed-document-acceptances.shared.schemas.d.ts +47 -0
  125. package/dist/esm/compliance/documents/user-governed-document-acceptances.shared.schemas.d.ts.map +1 -0
  126. package/dist/esm/compliance/documents/user-governed-document-acceptances.shared.schemas.js +73 -0
  127. package/dist/esm/compliance/documents/user-governed-document-acceptances.shared.schemas.js.map +1 -0
  128. package/dist/esm/compliance/privacy/ai-use-posture.shared.schemas.d.ts +21 -0
  129. package/dist/esm/compliance/privacy/ai-use-posture.shared.schemas.d.ts.map +1 -1
  130. package/dist/esm/compliance/privacy/ai-use-posture.shared.schemas.js +39 -1
  131. package/dist/esm/compliance/privacy/ai-use-posture.shared.schemas.js.map +1 -1
  132. package/dist/esm/compliance/privacy/capability-consent-purposes.shared.utils.d.ts +33 -0
  133. package/dist/esm/compliance/privacy/capability-consent-purposes.shared.utils.d.ts.map +1 -0
  134. package/dist/esm/compliance/privacy/capability-consent-purposes.shared.utils.js +30 -0
  135. package/dist/esm/compliance/privacy/capability-consent-purposes.shared.utils.js.map +1 -0
  136. package/dist/esm/compliance/privacy/client-storage.shared.schemas.d.ts +6 -5
  137. package/dist/esm/compliance/privacy/client-storage.shared.schemas.d.ts.map +1 -1
  138. package/dist/esm/compliance/privacy/client-storage.shared.schemas.js +15 -5
  139. package/dist/esm/compliance/privacy/client-storage.shared.schemas.js.map +1 -1
  140. package/dist/esm/compliance/privacy/consent-gate-vocabulary.shared.schemas.d.ts +127 -0
  141. package/dist/esm/compliance/privacy/consent-gate-vocabulary.shared.schemas.d.ts.map +1 -0
  142. package/dist/esm/compliance/privacy/consent-gate-vocabulary.shared.schemas.js +94 -0
  143. package/dist/esm/compliance/privacy/consent-gate-vocabulary.shared.schemas.js.map +1 -0
  144. package/dist/esm/compliance/privacy/consent-purposes.shared.d.ts +125 -0
  145. package/dist/esm/compliance/privacy/consent-purposes.shared.d.ts.map +1 -0
  146. package/dist/esm/compliance/privacy/consent-purposes.shared.js +136 -0
  147. package/dist/esm/compliance/privacy/consent-purposes.shared.js.map +1 -0
  148. package/dist/esm/compliance/privacy/data-retention.shared.schemas.d.ts.map +1 -1
  149. package/dist/esm/compliance/privacy/data-subject-rights.shared.schemas.d.ts +91 -0
  150. package/dist/esm/compliance/privacy/data-subject-rights.shared.schemas.d.ts.map +1 -0
  151. package/dist/esm/compliance/privacy/data-subject-rights.shared.schemas.js +123 -0
  152. package/dist/esm/compliance/privacy/data-subject-rights.shared.schemas.js.map +1 -0
  153. package/dist/esm/compliance/privacy/impersonalization-scrub.shared.utils.d.ts.map +1 -1
  154. package/dist/esm/compliance/privacy/impersonalization.shared.schemas.d.ts.map +1 -1
  155. package/dist/esm/compliance/privacy/operating-jurisdictions.shared.schemas.d.ts.map +1 -1
  156. package/dist/esm/compliance/privacy/operating-jurisdictions.shared.schemas.js.map +1 -1
  157. package/dist/esm/compliance/privacy/operator-compliance-identity.shared.schemas.d.ts +68 -25
  158. package/dist/esm/compliance/privacy/operator-compliance-identity.shared.schemas.d.ts.map +1 -1
  159. package/dist/esm/compliance/privacy/operator-compliance-identity.shared.schemas.js +74 -22
  160. package/dist/esm/compliance/privacy/operator-compliance-identity.shared.schemas.js.map +1 -1
  161. package/dist/esm/compliance/privacy/personal-data-category.shared.schemas.d.ts.map +1 -1
  162. package/dist/esm/compliance/privacy/personal-data-declaration.shared.utils.d.ts.map +1 -1
  163. package/dist/esm/compliance/privacy/privacy.shared.schemas.d.ts +9 -17
  164. package/dist/esm/compliance/privacy/privacy.shared.schemas.d.ts.map +1 -1
  165. package/dist/esm/compliance/privacy/privacy.shared.schemas.js +74 -31
  166. package/dist/esm/compliance/privacy/privacy.shared.schemas.js.map +1 -1
  167. package/dist/esm/compliance/privacy/redaction.shared.schemas.d.ts.map +1 -1
  168. package/dist/esm/compliance/privacy/redaction.shared.schemas.js.map +1 -1
  169. package/dist/esm/compliance/privacy/retention-schedule.shared.schemas.d.ts.map +1 -1
  170. package/dist/esm/compliance/privacy/subject-erasure-lane-evidence.shared.schemas.d.ts +47 -0
  171. package/dist/esm/compliance/privacy/subject-erasure-lane-evidence.shared.schemas.d.ts.map +1 -0
  172. package/dist/esm/compliance/privacy/subject-erasure-lane-evidence.shared.schemas.js +98 -0
  173. package/dist/esm/compliance/privacy/subject-erasure-lane-evidence.shared.schemas.js.map +1 -0
  174. package/dist/esm/compliance/privacy/subject-erasure.shared.schemas.d.ts +368 -35
  175. package/dist/esm/compliance/privacy/subject-erasure.shared.schemas.d.ts.map +1 -1
  176. package/dist/esm/compliance/privacy/subject-erasure.shared.schemas.js +403 -17
  177. package/dist/esm/compliance/privacy/subject-erasure.shared.schemas.js.map +1 -1
  178. package/dist/esm/compliance/privacy/subject-export-render.shared.utils.d.ts.map +1 -1
  179. package/dist/esm/compliance/privacy/subject-export.shared.schemas.d.ts.map +1 -1
  180. package/dist/esm/compliance/privacy/subject-export.shared.schemas.js.map +1 -1
  181. package/dist/esm/compliance/review-cadence.shared.schemas.d.ts +56 -0
  182. package/dist/esm/compliance/review-cadence.shared.schemas.d.ts.map +1 -0
  183. package/dist/esm/compliance/review-cadence.shared.schemas.js +71 -0
  184. package/dist/esm/compliance/review-cadence.shared.schemas.js.map +1 -0
  185. package/dist/esm/compliance/risk-posture.shared.schemas.d.ts +161 -0
  186. package/dist/esm/compliance/risk-posture.shared.schemas.d.ts.map +1 -0
  187. package/dist/esm/compliance/risk-posture.shared.schemas.js +166 -0
  188. package/dist/esm/compliance/risk-posture.shared.schemas.js.map +1 -0
  189. package/dist/esm/config/analytics-value-moments.shared.schemas.d.ts +4 -3
  190. package/dist/esm/config/analytics-value-moments.shared.schemas.d.ts.map +1 -1
  191. package/dist/esm/config/analytics-value-moments.shared.schemas.js +4 -3
  192. package/dist/esm/config/analytics-value-moments.shared.schemas.js.map +1 -1
  193. package/dist/esm/config/app-configuration-shared.shared.schemas.d.ts +222 -9
  194. package/dist/esm/config/app-configuration-shared.shared.schemas.d.ts.map +1 -1
  195. package/dist/esm/config/app-configuration-shared.shared.schemas.js +232 -9
  196. package/dist/esm/config/app-configuration-shared.shared.schemas.js.map +1 -1
  197. package/dist/esm/config/auth-config-resolution.shared.utils.d.ts +75 -3
  198. package/dist/esm/config/auth-config-resolution.shared.utils.d.ts.map +1 -1
  199. package/dist/esm/config/auth-config-resolution.shared.utils.js +93 -4
  200. package/dist/esm/config/auth-config-resolution.shared.utils.js.map +1 -1
  201. package/dist/esm/config/brand-assets.shared.schemas.d.ts +5 -4
  202. package/dist/esm/config/brand-assets.shared.schemas.d.ts.map +1 -1
  203. package/dist/esm/config/brand-assets.shared.schemas.js +14 -4
  204. package/dist/esm/config/brand-assets.shared.schemas.js.map +1 -1
  205. package/dist/esm/config/entity-identity-config.shared.schemas.d.ts +463 -19
  206. package/dist/esm/config/entity-identity-config.shared.schemas.d.ts.map +1 -1
  207. package/dist/esm/config/entity-identity-config.shared.schemas.js +535 -28
  208. package/dist/esm/config/entity-identity-config.shared.schemas.js.map +1 -1
  209. package/dist/esm/config/frontend/chart-definition.shared.schemas.d.ts +24 -24
  210. package/dist/esm/config/frontend/chart-definition.shared.schemas.d.ts.map +1 -1
  211. package/dist/esm/config/frontend/chart-registration-alignment.shared.d.ts.map +1 -1
  212. package/dist/esm/config/frontend/chart-registration-alignment.shared.js.map +1 -1
  213. package/dist/esm/config/frontend/navigation.shared.schemas.d.ts +21 -17
  214. package/dist/esm/config/frontend/navigation.shared.schemas.d.ts.map +1 -1
  215. package/dist/esm/config/frontend/navigation.shared.schemas.js +58 -40
  216. package/dist/esm/config/frontend/navigation.shared.schemas.js.map +1 -1
  217. package/dist/esm/config/frontend/onboarding.shared.schemas.d.ts +90 -133
  218. package/dist/esm/config/frontend/onboarding.shared.schemas.d.ts.map +1 -1
  219. package/dist/esm/config/frontend/onboarding.shared.schemas.js +148 -100
  220. package/dist/esm/config/frontend/onboarding.shared.schemas.js.map +1 -1
  221. package/dist/esm/config/registration-acquisition-policy.shared.utils.d.ts.map +1 -1
  222. package/dist/esm/config-authoring.entry.d.ts.map +1 -1
  223. package/dist/esm/crdt/crdt-merge.shared.utils.d.ts.map +1 -1
  224. package/dist/esm/data-seeding/data-seeding-config.shared.schemas.d.ts.map +1 -1
  225. package/dist/esm/errors/errors.custom-message-ref.shared.definitions.d.ts +140 -43
  226. package/dist/esm/errors/errors.custom-message-ref.shared.definitions.d.ts.map +1 -1
  227. package/dist/esm/errors/errors.custom-message-ref.shared.definitions.js +141 -42
  228. package/dist/esm/errors/errors.custom-message-ref.shared.definitions.js.map +1 -1
  229. package/dist/esm/errors/errors.shared.definitions.d.ts.map +1 -1
  230. package/dist/esm/errors/errors.shared.definitions.js +1 -1
  231. package/dist/esm/errors/errors.shared.definitions.js.map +1 -1
  232. package/dist/esm/errors/errors.shared.schemas.d.ts +29 -40
  233. package/dist/esm/errors/errors.shared.schemas.d.ts.map +1 -1
  234. package/dist/esm/errors/errors.shared.schemas.js +37 -54
  235. package/dist/esm/errors/errors.shared.schemas.js.map +1 -1
  236. package/dist/esm/errors/errors.shared.utils.d.ts +24 -0
  237. package/dist/esm/errors/errors.shared.utils.d.ts.map +1 -1
  238. package/dist/esm/errors/errors.shared.utils.js +39 -0
  239. package/dist/esm/errors/errors.shared.utils.js.map +1 -1
  240. package/dist/esm/errors/thrown-value-description.shared.utils.d.ts +27 -0
  241. package/dist/esm/errors/thrown-value-description.shared.utils.d.ts.map +1 -0
  242. package/dist/esm/errors/thrown-value-description.shared.utils.js +67 -0
  243. package/dist/esm/errors/thrown-value-description.shared.utils.js.map +1 -0
  244. package/dist/esm/external-data/external-data-pipeline.shared.schemas.d.ts +48 -73
  245. package/dist/esm/external-data/external-data-pipeline.shared.schemas.d.ts.map +1 -1
  246. package/dist/esm/external-data/external-data-pipeline.shared.schemas.js +103 -9
  247. package/dist/esm/external-data/external-data-pipeline.shared.schemas.js.map +1 -1
  248. package/dist/esm/external-data.exports.d.ts +1 -0
  249. package/dist/esm/external-data.exports.d.ts.map +1 -1
  250. package/dist/esm/external-data.exports.js +1 -0
  251. package/dist/esm/external-data.exports.js.map +1 -1
  252. package/dist/esm/external-providers/compose-provider-registry.shared.d.ts.map +1 -1
  253. package/dist/esm/external-providers/engine-capabilities.shared.schemas.d.ts +11 -12
  254. package/dist/esm/external-providers/engine-capabilities.shared.schemas.d.ts.map +1 -1
  255. package/dist/esm/external-providers/engine-capabilities.shared.schemas.js +11 -12
  256. package/dist/esm/external-providers/engine-capabilities.shared.schemas.js.map +1 -1
  257. package/dist/esm/external-providers/engine-capability-resolution-mode.shared.d.ts +5 -3
  258. package/dist/esm/external-providers/engine-capability-resolution-mode.shared.d.ts.map +1 -1
  259. package/dist/esm/external-providers/engine-capability-resolution-mode.shared.js +5 -3
  260. package/dist/esm/external-providers/engine-capability-resolution-mode.shared.js.map +1 -1
  261. package/dist/esm/external-providers/engine-capability-surface.shared.d.ts +77 -0
  262. package/dist/esm/external-providers/engine-capability-surface.shared.d.ts.map +1 -0
  263. package/dist/esm/external-providers/engine-capability-surface.shared.js +173 -0
  264. package/dist/esm/external-providers/engine-capability-surface.shared.js.map +1 -0
  265. package/dist/esm/external-providers/external-providers.shared.schemas.d.ts +2 -0
  266. package/dist/esm/external-providers/external-providers.shared.schemas.d.ts.map +1 -1
  267. package/dist/esm/external-providers/external-providers.shared.schemas.js +21 -0
  268. package/dist/esm/external-providers/external-providers.shared.schemas.js.map +1 -1
  269. package/dist/esm/external-providers/frontend-bootstrap.shared.schemas.d.ts +129 -9
  270. package/dist/esm/external-providers/frontend-bootstrap.shared.schemas.d.ts.map +1 -1
  271. package/dist/esm/external-providers/frontend-capability-public-config.shared.schemas.d.ts +114 -0
  272. package/dist/esm/external-providers/frontend-capability-public-config.shared.schemas.d.ts.map +1 -1
  273. package/dist/esm/external-providers/frontend-capability-public-config.shared.schemas.js +148 -0
  274. package/dist/esm/external-providers/frontend-capability-public-config.shared.schemas.js.map +1 -1
  275. package/dist/esm/external-providers/frontend-capability-runtime.shared.types.d.ts.map +1 -1
  276. package/dist/esm/external-providers/frontend-capability-runtime.shared.types.js.map +1 -1
  277. package/dist/esm/external-providers/frontend-provider-entry.shared.schemas.d.ts +54 -3
  278. package/dist/esm/external-providers/frontend-provider-entry.shared.schemas.d.ts.map +1 -1
  279. package/dist/esm/external-providers/frontend-provider-entry.shared.schemas.js +58 -1
  280. package/dist/esm/external-providers/frontend-provider-entry.shared.schemas.js.map +1 -1
  281. package/dist/esm/external-providers/frontend-provider-public-config.shared.d.ts +12 -3
  282. package/dist/esm/external-providers/frontend-provider-public-config.shared.d.ts.map +1 -1
  283. package/dist/esm/external-providers/frontend-provider-public-config.shared.js +14 -5
  284. package/dist/esm/external-providers/frontend-provider-public-config.shared.js.map +1 -1
  285. package/dist/esm/external-providers/provider-authentication-assurance.shared.schemas.d.ts +30 -0
  286. package/dist/esm/external-providers/provider-authentication-assurance.shared.schemas.d.ts.map +1 -0
  287. package/dist/esm/external-providers/provider-authentication-assurance.shared.schemas.js +32 -0
  288. package/dist/esm/external-providers/provider-authentication-assurance.shared.schemas.js.map +1 -0
  289. package/dist/esm/external-providers/provider-browser-operations.shared.schemas.d.ts +86 -0
  290. package/dist/esm/external-providers/provider-browser-operations.shared.schemas.d.ts.map +1 -0
  291. package/dist/esm/external-providers/provider-browser-operations.shared.schemas.js +85 -0
  292. package/dist/esm/external-providers/provider-browser-operations.shared.schemas.js.map +1 -0
  293. package/dist/esm/external-providers/provider-capability.shared.schemas.d.ts +14 -13
  294. package/dist/esm/external-providers/provider-capability.shared.schemas.d.ts.map +1 -1
  295. package/dist/esm/external-providers/provider-capability.shared.schemas.js +10 -10
  296. package/dist/esm/external-providers/provider-capability.shared.schemas.js.map +1 -1
  297. package/dist/esm/external-providers/provider-compliance-profile.shared.schemas.d.ts.map +1 -1
  298. package/dist/esm/external-providers/provider-compliance-profile.shared.schemas.js.map +1 -1
  299. package/dist/esm/external-providers/provider-frontend-component-contract.shared.types.d.ts.map +1 -1
  300. package/dist/esm/external-providers/provider-frontend-component-contract.shared.types.js.map +1 -1
  301. package/dist/esm/external-providers/provider-frontend-surface.shared.schemas.d.ts +7 -5
  302. package/dist/esm/external-providers/provider-frontend-surface.shared.schemas.d.ts.map +1 -1
  303. package/dist/esm/external-providers/provider-frontend-surface.shared.schemas.js +7 -5
  304. package/dist/esm/external-providers/provider-frontend-surface.shared.schemas.js.map +1 -1
  305. package/dist/esm/external-providers/provider-metadata.shared.schemas.d.ts +8 -5
  306. package/dist/esm/external-providers/provider-metadata.shared.schemas.d.ts.map +1 -1
  307. package/dist/esm/external-providers/provider-metadata.shared.schemas.js +5 -2
  308. package/dist/esm/external-providers/provider-metadata.shared.schemas.js.map +1 -1
  309. package/dist/esm/external-providers/provider-protocol.shared.schemas.d.ts.map +1 -1
  310. package/dist/esm/external-providers/provider-protocol.shared.schemas.js.map +1 -1
  311. package/dist/esm/external-providers/provider-tier-rule.shared.utils.d.ts.map +1 -1
  312. package/dist/esm/external-providers/provider-tier-rule.shared.utils.js.map +1 -1
  313. package/dist/esm/external-providers/provider-usage-pricing.shared.schemas.d.ts.map +1 -1
  314. package/dist/esm/features/application-features.shared.resources-config.schemas.d.ts +2 -0
  315. package/dist/esm/features/application-features.shared.resources-config.schemas.d.ts.map +1 -1
  316. package/dist/esm/features/application-features.shared.resources-config.schemas.js +30 -3
  317. package/dist/esm/features/application-features.shared.resources-config.schemas.js.map +1 -1
  318. package/dist/esm/features/connected-feature.example.d.ts +64 -0
  319. package/dist/esm/features/connected-feature.example.d.ts.map +1 -0
  320. package/dist/esm/features/connected-feature.example.js +86 -0
  321. package/dist/esm/features/connected-feature.example.js.map +1 -0
  322. package/dist/esm/features/core-feature-definitions.shared.d.ts.map +1 -1
  323. package/dist/esm/features/core-feature-definitions.shared.js.map +1 -1
  324. package/dist/esm/features/feature-builders.shared.d.ts.map +1 -1
  325. package/dist/esm/features/feature-builders.shared.js.map +1 -1
  326. package/dist/esm/features/feature-definition.shared.schemas.d.ts.map +1 -1
  327. package/dist/esm/features/feature-registry.shared.d.ts.map +1 -1
  328. package/dist/esm/features/feature-resolution.shared.schemas.d.ts.map +1 -1
  329. package/dist/esm/features/scope-features.shared.schemas.d.ts +53 -0
  330. package/dist/esm/features/scope-features.shared.schemas.d.ts.map +1 -1
  331. package/dist/esm/features/scope-features.shared.schemas.js +37 -0
  332. package/dist/esm/features/scope-features.shared.schemas.js.map +1 -1
  333. package/dist/esm/features/user-features.shared.resources-config.schemas.d.ts +1 -1
  334. package/dist/esm/features/user-features.shared.resources-config.schemas.d.ts.map +1 -1
  335. package/dist/esm/features/user-features.shared.resources-config.schemas.js +34 -52
  336. package/dist/esm/features/user-features.shared.resources-config.schemas.js.map +1 -1
  337. package/dist/esm/files/file-remote-reference-link.shared.schemas.d.ts.map +1 -1
  338. package/dist/esm/files/file-remote-reference-link.shared.schemas.js.map +1 -1
  339. package/dist/esm/files/file-upload-grant.shared.schemas.d.ts.map +1 -1
  340. package/dist/esm/files/file-upload-grant.shared.schemas.js.map +1 -1
  341. package/dist/esm/files/files.shared.resources-config.schemas.d.ts +3 -3
  342. package/dist/esm/files/files.shared.resources-config.schemas.d.ts.map +1 -1
  343. package/dist/esm/files/files.shared.resources-config.schemas.js +3 -3
  344. package/dist/esm/files/files.shared.resources-config.schemas.js.map +1 -1
  345. package/dist/esm/files/files.shared.schemas.d.ts.map +1 -1
  346. package/dist/esm/files/files.shared.schemas.js.map +1 -1
  347. package/dist/esm/files/files.shared.utils.d.ts.map +1 -1
  348. package/dist/esm/flows-actors/a2a-push-delivery-log.shared.resources-config.schemas.d.ts.map +1 -1
  349. package/dist/esm/flows-actors/a2a-push-delivery-log.shared.schemas.d.ts.map +1 -1
  350. package/dist/esm/flows-actors/a2a-token-budget-state.shared.resources-config.schemas.d.ts.map +1 -1
  351. package/dist/esm/flows-actors/a2a-token-budget-state.shared.schemas.d.ts.map +1 -1
  352. package/dist/esm/flows-actors/actors.shared.schemas.d.ts +152 -129
  353. package/dist/esm/flows-actors/actors.shared.schemas.d.ts.map +1 -1
  354. package/dist/esm/flows-actors/actors.shared.schemas.js +99 -2
  355. package/dist/esm/flows-actors/actors.shared.schemas.js.map +1 -1
  356. package/dist/esm/flows-actors/agent-traceability.shared.schemas.d.ts +6 -0
  357. package/dist/esm/flows-actors/agent-traceability.shared.schemas.d.ts.map +1 -1
  358. package/dist/esm/flows-actors/agents.shared.schemas.d.ts +3 -3
  359. package/dist/esm/flows-actors/agents.shared.schemas.d.ts.map +1 -1
  360. package/dist/esm/flows-actors/agents.shared.schemas.js +11 -5
  361. package/dist/esm/flows-actors/agents.shared.schemas.js.map +1 -1
  362. package/dist/esm/flows-actors/deliberation.shared.schemas.d.ts +13 -0
  363. package/dist/esm/flows-actors/deliberation.shared.schemas.d.ts.map +1 -1
  364. package/dist/esm/flows-actors/deliberation.shared.schemas.js.map +1 -1
  365. package/dist/esm/flows-actors/execution-plan-readiness.shared.utils.d.ts +45 -0
  366. package/dist/esm/flows-actors/execution-plan-readiness.shared.utils.d.ts.map +1 -0
  367. package/dist/esm/flows-actors/execution-plan-readiness.shared.utils.js +51 -0
  368. package/dist/esm/flows-actors/execution-plan-readiness.shared.utils.js.map +1 -0
  369. package/dist/esm/flows-actors/flows-actors-execution.shared.resources-config.schemas.d.ts.map +1 -1
  370. package/dist/esm/flows-actors/flows-actors-execution.shared.schemas.d.ts +31 -0
  371. package/dist/esm/flows-actors/flows-actors-execution.shared.schemas.d.ts.map +1 -1
  372. package/dist/esm/flows-actors/flows-actors-execution.shared.schemas.js +61 -3
  373. package/dist/esm/flows-actors/flows-actors-execution.shared.schemas.js.map +1 -1
  374. package/dist/esm/flows-actors/flows-actors-task.shared.resources-config.schemas.d.ts.map +1 -1
  375. package/dist/esm/flows-actors/flows-actors-task.shared.schemas.d.ts +2 -2
  376. package/dist/esm/flows-actors/flows-actors-task.shared.schemas.d.ts.map +1 -1
  377. package/dist/esm/flows-actors/flows-actors.commons.shared.schemas.d.ts +16 -8
  378. package/dist/esm/flows-actors/flows-actors.commons.shared.schemas.d.ts.map +1 -1
  379. package/dist/esm/flows-actors/flows-actors.commons.shared.schemas.js +23 -11
  380. package/dist/esm/flows-actors/flows-actors.commons.shared.schemas.js.map +1 -1
  381. package/dist/esm/flows-actors/flows-actors.configuration.shared.schemas.d.ts +0 -189
  382. package/dist/esm/flows-actors/flows-actors.configuration.shared.schemas.d.ts.map +1 -1
  383. package/dist/esm/flows-actors/flows-actors.configuration.shared.schemas.js +14 -50
  384. package/dist/esm/flows-actors/flows-actors.configuration.shared.schemas.js.map +1 -1
  385. package/dist/esm/flows-actors/flows-actors.frontend.shared.schemas.d.ts +0 -3
  386. package/dist/esm/flows-actors/flows-actors.frontend.shared.schemas.d.ts.map +1 -1
  387. package/dist/esm/flows-actors/flows-actors.frontend.shared.schemas.js +0 -1
  388. package/dist/esm/flows-actors/flows-actors.frontend.shared.schemas.js.map +1 -1
  389. package/dist/esm/flows-actors/flows-actors.io.shared.schemas.d.ts.map +1 -1
  390. package/dist/esm/flows-actors/flows-actors.io.shared.schemas.js.map +1 -1
  391. package/dist/esm/flows-actors/flows-actors.system.shared.definitions.d.ts.map +1 -1
  392. package/dist/esm/flows-actors/flows-actors.system.shared.schemas.d.ts +1 -67
  393. package/dist/esm/flows-actors/flows-actors.system.shared.schemas.d.ts.map +1 -1
  394. package/dist/esm/flows-actors/flows-actors.system.shared.schemas.js +1 -2
  395. package/dist/esm/flows-actors/flows-actors.system.shared.schemas.js.map +1 -1
  396. package/dist/esm/flows-actors/flows.shared.schemas.d.ts +0 -1
  397. package/dist/esm/flows-actors/flows.shared.schemas.d.ts.map +1 -1
  398. package/dist/esm/flows-actors/flows.shared.schemas.js.map +1 -1
  399. package/dist/esm/flows-actors/human-decision.shared.schemas.d.ts +121 -0
  400. package/dist/esm/flows-actors/human-decision.shared.schemas.d.ts.map +1 -0
  401. package/dist/esm/flows-actors/human-decision.shared.schemas.js +252 -0
  402. package/dist/esm/flows-actors/human-decision.shared.schemas.js.map +1 -0
  403. package/dist/esm/flows-actors/mcp-servers.shared.schemas.d.ts.map +1 -1
  404. package/dist/esm/flows-actors/mcp-servers.shared.schemas.js +4 -2
  405. package/dist/esm/flows-actors/mcp-servers.shared.schemas.js.map +1 -1
  406. package/dist/esm/flows-actors/prompt-ir.shared.schemas.d.ts.map +1 -1
  407. package/dist/esm/flows-actors/provider-call-records.shared.resources-config.schemas.d.ts +24 -0
  408. package/dist/esm/flows-actors/provider-call-records.shared.resources-config.schemas.d.ts.map +1 -0
  409. package/dist/esm/flows-actors/provider-call-records.shared.resources-config.schemas.js +80 -0
  410. package/dist/esm/flows-actors/provider-call-records.shared.resources-config.schemas.js.map +1 -0
  411. package/dist/esm/flows-actors/provider-call-records.shared.schemas.d.ts +123 -0
  412. package/dist/esm/flows-actors/provider-call-records.shared.schemas.d.ts.map +1 -0
  413. package/dist/esm/flows-actors/provider-call-records.shared.schemas.js +181 -0
  414. package/dist/esm/flows-actors/provider-call-records.shared.schemas.js.map +1 -0
  415. package/dist/esm/flows-actors/tasks.actors.shared.schemas.d.ts +58 -81
  416. package/dist/esm/flows-actors/tasks.actors.shared.schemas.d.ts.map +1 -1
  417. package/dist/esm/flows-actors/tasks.actors.shared.schemas.js +75 -38
  418. package/dist/esm/flows-actors/tasks.actors.shared.schemas.js.map +1 -1
  419. package/dist/esm/frontend-definitions/settings-destination-ref.definitions.d.ts +106 -1
  420. package/dist/esm/frontend-definitions/settings-destination-ref.definitions.d.ts.map +1 -1
  421. package/dist/esm/frontend-definitions/settings-destination-ref.definitions.js +117 -0
  422. package/dist/esm/frontend-definitions/settings-destination-ref.definitions.js.map +1 -1
  423. package/dist/esm/guidance/guidance-flow.shared.schemas.d.ts +106 -24
  424. package/dist/esm/guidance/guidance-flow.shared.schemas.d.ts.map +1 -1
  425. package/dist/esm/guidance/guidance-flow.shared.schemas.js +152 -14
  426. package/dist/esm/guidance/guidance-flow.shared.schemas.js.map +1 -1
  427. package/dist/esm/guidance/guidance-state.shared.resources-config.schemas.d.ts.map +1 -1
  428. package/dist/esm/guidance/guidance-state.shared.schemas.d.ts.map +1 -1
  429. package/dist/esm/guidance/guidance-state.shared.utils.d.ts.map +1 -1
  430. package/dist/esm/guidance/guidance-state.shared.utils.js.map +1 -1
  431. package/dist/esm/guidance/lifecycle-config.shared.schemas.d.ts.map +1 -1
  432. package/dist/esm/guidance/lifecycle-state.shared.resources-config.schemas.d.ts.map +1 -1
  433. package/dist/esm/guidance/lifecycle-state.shared.schemas.d.ts +0 -6
  434. package/dist/esm/guidance/lifecycle-state.shared.schemas.d.ts.map +1 -1
  435. package/dist/esm/guidance/lifecycle-state.shared.schemas.js +0 -19
  436. package/dist/esm/guidance/lifecycle-state.shared.schemas.js.map +1 -1
  437. package/dist/esm/guidance/milestone-builders.shared.d.ts +4 -2
  438. package/dist/esm/guidance/milestone-builders.shared.d.ts.map +1 -1
  439. package/dist/esm/guidance/milestone-builders.shared.js +4 -2
  440. package/dist/esm/guidance/milestone-builders.shared.js.map +1 -1
  441. package/dist/esm/guidance/milestone-definition.shared.schemas.d.ts +66 -4
  442. package/dist/esm/guidance/milestone-definition.shared.schemas.d.ts.map +1 -1
  443. package/dist/esm/guidance/milestone-definition.shared.schemas.js +50 -0
  444. package/dist/esm/guidance/milestone-definition.shared.schemas.js.map +1 -1
  445. package/dist/esm/guidance/progression-presentation.shared.schemas.d.ts +71 -0
  446. package/dist/esm/guidance/progression-presentation.shared.schemas.d.ts.map +1 -0
  447. package/dist/esm/guidance/progression-presentation.shared.schemas.js +72 -0
  448. package/dist/esm/guidance/progression-presentation.shared.schemas.js.map +1 -0
  449. package/dist/esm/guidance/progression-state.shared.resources-config.schemas.d.ts +2 -0
  450. package/dist/esm/guidance/progression-state.shared.resources-config.schemas.d.ts.map +1 -1
  451. package/dist/esm/guidance/progression-state.shared.schemas.d.ts +4 -0
  452. package/dist/esm/guidance/progression-state.shared.schemas.d.ts.map +1 -1
  453. package/dist/esm/guidance/progression-state.shared.schemas.js +5 -0
  454. package/dist/esm/guidance/progression-state.shared.schemas.js.map +1 -1
  455. package/dist/esm/http-api-binding/http-api-binding-id.shared.utils.d.ts.map +1 -1
  456. package/dist/esm/http-api-binding/http-api-binding-id.shared.utils.js +2 -1
  457. package/dist/esm/http-api-binding/http-api-binding-id.shared.utils.js.map +1 -1
  458. package/dist/esm/http-api-binding/http-api-binding.shared.schemas.d.ts +181 -412
  459. package/dist/esm/http-api-binding/http-api-binding.shared.schemas.d.ts.map +1 -1
  460. package/dist/esm/http-api-binding/http-api-binding.shared.schemas.js +249 -199
  461. package/dist/esm/http-api-binding/http-api-binding.shared.schemas.js.map +1 -1
  462. package/dist/esm/http-api-binding/http-api-transport-dialect.shared.d.ts +107 -0
  463. package/dist/esm/http-api-binding/http-api-transport-dialect.shared.d.ts.map +1 -0
  464. package/dist/esm/http-api-binding/http-api-transport-dialect.shared.js +108 -0
  465. package/dist/esm/http-api-binding/http-api-transport-dialect.shared.js.map +1 -0
  466. package/dist/esm/http-api-binding/read-through-engine-anchors.shared.d.ts +38 -0
  467. package/dist/esm/http-api-binding/read-through-engine-anchors.shared.d.ts.map +1 -0
  468. package/dist/esm/http-api-binding/read-through-engine-anchors.shared.js +42 -0
  469. package/dist/esm/http-api-binding/read-through-engine-anchors.shared.js.map +1 -0
  470. package/dist/esm/i18n/labelling.dto.shared.schemas.d.ts.map +1 -1
  471. package/dist/esm/index.d.ts +41 -4
  472. package/dist/esm/index.d.ts.map +1 -1
  473. package/dist/esm/index.js +71 -16
  474. package/dist/esm/index.js.map +1 -1
  475. package/dist/esm/meta-workflows/actions.meta-workflows.shared.schemas.d.ts.map +1 -0
  476. package/dist/esm/meta-workflows/actions.meta-workflows.shared.schemas.js.map +1 -0
  477. package/dist/esm/meta-workflows/catalog.meta-workflows.shared.schemas.d.ts.map +1 -0
  478. package/dist/esm/meta-workflows/catalog.meta-workflows.shared.schemas.js.map +1 -0
  479. package/dist/esm/meta-workflows/coding-tasks.meta-workflows.shared.schemas.d.ts +130 -0
  480. package/dist/esm/meta-workflows/coding-tasks.meta-workflows.shared.schemas.d.ts.map +1 -0
  481. package/dist/esm/meta-workflows/coding-tasks.meta-workflows.shared.schemas.js +104 -0
  482. package/dist/esm/meta-workflows/coding-tasks.meta-workflows.shared.schemas.js.map +1 -0
  483. package/dist/esm/meta-workflows/context-selection.meta-workflows.shared.schemas.d.ts.map +1 -0
  484. package/dist/esm/meta-workflows/context-selection.meta-workflows.shared.schemas.js.map +1 -0
  485. package/dist/esm/{flows-actors/meta-workflows → meta-workflows}/decisions.meta-workflows.shared.schemas.d.ts +64 -0
  486. package/dist/esm/meta-workflows/decisions.meta-workflows.shared.schemas.d.ts.map +1 -0
  487. package/dist/esm/{flows-actors/meta-workflows → meta-workflows}/decisions.meta-workflows.shared.schemas.js +47 -0
  488. package/dist/esm/meta-workflows/decisions.meta-workflows.shared.schemas.js.map +1 -0
  489. package/dist/esm/meta-workflows/orchestration.meta-workflows.shared.schemas.d.ts +544 -0
  490. package/dist/esm/meta-workflows/orchestration.meta-workflows.shared.schemas.d.ts.map +1 -0
  491. package/dist/esm/meta-workflows/orchestration.meta-workflows.shared.schemas.js +638 -0
  492. package/dist/esm/meta-workflows/orchestration.meta-workflows.shared.schemas.js.map +1 -0
  493. package/dist/esm/{flows-actors/meta-workflows → meta-workflows}/portable-primitives.meta-workflows.shared.schemas.d.ts +15 -8
  494. package/dist/esm/meta-workflows/portable-primitives.meta-workflows.shared.schemas.d.ts.map +1 -0
  495. package/dist/esm/{flows-actors/meta-workflows → meta-workflows}/portable-primitives.meta-workflows.shared.schemas.js +15 -8
  496. package/dist/esm/meta-workflows/portable-primitives.meta-workflows.shared.schemas.js.map +1 -0
  497. package/dist/esm/meta-workflows.exports.d.ts +21 -25
  498. package/dist/esm/meta-workflows.exports.d.ts.map +1 -1
  499. package/dist/esm/meta-workflows.exports.js +21 -25
  500. package/dist/esm/meta-workflows.exports.js.map +1 -1
  501. package/dist/esm/monitoring/monitoring.shared.schemas.d.ts.map +1 -1
  502. package/dist/esm/notifications/email/email-context.shared.schemas.d.ts.map +1 -1
  503. package/dist/esm/notifications/email/email-submission.shared.enums.d.ts +16 -0
  504. package/dist/esm/notifications/email/email-submission.shared.enums.d.ts.map +1 -0
  505. package/dist/esm/notifications/email/email-submission.shared.enums.js +17 -0
  506. package/dist/esm/notifications/email/email-submission.shared.enums.js.map +1 -0
  507. package/dist/esm/notifications/email/email-template-registry.shared.schemas.d.ts +36 -0
  508. package/dist/esm/notifications/email/email-template-registry.shared.schemas.d.ts.map +1 -1
  509. package/dist/esm/notifications/email/email-template-registry.shared.schemas.js +50 -3
  510. package/dist/esm/notifications/email/email-template-registry.shared.schemas.js.map +1 -1
  511. package/dist/esm/notifications/email/email-template.shared.enums.d.ts.map +1 -1
  512. package/dist/esm/notifications/email/email-template.shared.enums.js.map +1 -1
  513. package/dist/esm/notifications/m2m/m2m-webhook-delivery-contract.shared.d.ts.map +1 -1
  514. package/dist/esm/notifications/m2m/m2m-webhook-delivery-log.shared.resources-config.schemas.d.ts.map +1 -1
  515. package/dist/esm/notifications/m2m/m2m-webhook-delivery-log.shared.resources-config.schemas.js +4 -1
  516. package/dist/esm/notifications/m2m/m2m-webhook-delivery-log.shared.resources-config.schemas.js.map +1 -1
  517. package/dist/esm/notifications/m2m/m2m-webhook-delivery-log.shared.schemas.d.ts +2 -1
  518. package/dist/esm/notifications/m2m/m2m-webhook-delivery-log.shared.schemas.d.ts.map +1 -1
  519. package/dist/esm/notifications/m2m/m2m-webhook-delivery-log.shared.schemas.js +3 -2
  520. package/dist/esm/notifications/m2m/m2m-webhook-delivery-log.shared.schemas.js.map +1 -1
  521. package/dist/esm/notifications/m2m/webhook-config.shared.resources-config.schemas.d.ts.map +1 -1
  522. package/dist/esm/notifications/m2m/webhook-config.shared.resources-config.schemas.js +44 -3
  523. package/dist/esm/notifications/m2m/webhook-config.shared.resources-config.schemas.js.map +1 -1
  524. package/dist/esm/notifications/m2m/webhook-config.shared.schemas.d.ts.map +1 -1
  525. package/dist/esm/notifications/m2m/webhook-config.shared.schemas.js.map +1 -1
  526. package/dist/esm/notifications/notification-badges.core.definitions.d.ts.map +1 -1
  527. package/dist/esm/notifications/notification-badges.core.definitions.js.map +1 -1
  528. package/dist/esm/notifications/notification-badges.schemas.d.ts.map +1 -1
  529. package/dist/esm/notifications/notification-badges.schemas.js.map +1 -1
  530. package/dist/esm/notifications/notification-badges.shared.resources-config.schemas.d.ts +1 -1
  531. package/dist/esm/notifications/notification-badges.shared.resources-config.schemas.d.ts.map +1 -1
  532. package/dist/esm/notifications/notification-badges.shared.resources-config.schemas.js +12 -33
  533. package/dist/esm/notifications/notification-badges.shared.resources-config.schemas.js.map +1 -1
  534. package/dist/esm/notifications/notifications.shared.schemas.d.ts +19 -8
  535. package/dist/esm/notifications/notifications.shared.schemas.d.ts.map +1 -1
  536. package/dist/esm/notifications/notifications.shared.schemas.js +19 -8
  537. package/dist/esm/notifications/notifications.shared.schemas.js.map +1 -1
  538. package/dist/esm/organizations/application-owner-organization.shared.schemas.d.ts +145 -0
  539. package/dist/esm/organizations/application-owner-organization.shared.schemas.d.ts.map +1 -0
  540. package/dist/esm/organizations/application-owner-organization.shared.schemas.js +146 -0
  541. package/dist/esm/organizations/application-owner-organization.shared.schemas.js.map +1 -0
  542. package/dist/esm/organizations/organization-features.shared.resources-config.schemas.d.ts +2 -0
  543. package/dist/esm/organizations/organization-features.shared.resources-config.schemas.d.ts.map +1 -1
  544. package/dist/esm/organizations/organization-features.shared.resources-config.schemas.js +26 -3
  545. package/dist/esm/organizations/organization-features.shared.resources-config.schemas.js.map +1 -1
  546. package/dist/esm/organizations/organization-members.shared.resources-config.schemas.d.ts +1 -1
  547. package/dist/esm/organizations/organization-members.shared.resources-config.schemas.d.ts.map +1 -1
  548. package/dist/esm/organizations/organization-members.shared.resources-config.schemas.js +18 -14
  549. package/dist/esm/organizations/organization-members.shared.resources-config.schemas.js.map +1 -1
  550. package/dist/esm/organizations/organization-members.shared.schemas.d.ts +1 -1
  551. package/dist/esm/organizations/organization-members.shared.schemas.d.ts.map +1 -1
  552. package/dist/esm/organizations/organization-members.shared.schemas.js +9 -1
  553. package/dist/esm/organizations/organization-members.shared.schemas.js.map +1 -1
  554. package/dist/esm/organizations/organization-notifications.shared.resources-config.schemas.d.ts.map +1 -1
  555. package/dist/esm/organizations/organization-notifications.shared.schemas.d.ts.map +1 -1
  556. package/dist/esm/organizations/organization-notifications.shared.schemas.js.map +1 -1
  557. package/dist/esm/organizations/organization-preferences.shared.resources-config.schemas.d.ts.map +1 -1
  558. package/dist/esm/organizations/organization-preferences.shared.schemas.d.ts +2 -1
  559. package/dist/esm/organizations/organization-preferences.shared.schemas.d.ts.map +1 -1
  560. package/dist/esm/organizations/organization-preferences.shared.schemas.js +3 -0
  561. package/dist/esm/organizations/organization-preferences.shared.schemas.js.map +1 -1
  562. package/dist/esm/organizations/organization-profile.shared.resources-config.schemas.d.ts.map +1 -1
  563. package/dist/esm/organizations/organization-profile.shared.schemas.d.ts +3 -1
  564. package/dist/esm/organizations/organization-profile.shared.schemas.d.ts.map +1 -1
  565. package/dist/esm/organizations/organization-profile.shared.schemas.js +4 -2
  566. package/dist/esm/organizations/organization-profile.shared.schemas.js.map +1 -1
  567. package/dist/esm/organizations/organization-unit-inheritance.shared.d.ts.map +1 -1
  568. package/dist/esm/organizations/organization-unit-members.shared.resources-config.schemas.d.ts.map +1 -1
  569. package/dist/esm/organizations/organization-unit-members.shared.schemas.d.ts.map +1 -1
  570. package/dist/esm/organizations/organization-unit-narrowing-decision.shared.d.ts.map +1 -1
  571. package/dist/esm/organizations/organization-unit-narrowing.example.d.ts.map +1 -1
  572. package/dist/esm/organizations/organization-unit-narrowing.shared.d.ts +29 -2
  573. package/dist/esm/organizations/organization-unit-narrowing.shared.d.ts.map +1 -1
  574. package/dist/esm/organizations/organization-unit-narrowing.shared.js +27 -0
  575. package/dist/esm/organizations/organization-unit-narrowing.shared.js.map +1 -1
  576. package/dist/esm/organizations/organization-units.shared.resources-config.schemas.d.ts +2 -0
  577. package/dist/esm/organizations/organization-units.shared.resources-config.schemas.d.ts.map +1 -1
  578. package/dist/esm/organizations/organization-units.shared.resources-config.schemas.js +3 -0
  579. package/dist/esm/organizations/organization-units.shared.resources-config.schemas.js.map +1 -1
  580. package/dist/esm/organizations/organization-units.shared.schemas.d.ts +17 -5
  581. package/dist/esm/organizations/organization-units.shared.schemas.d.ts.map +1 -1
  582. package/dist/esm/organizations/organization-units.shared.schemas.js +65 -5
  583. package/dist/esm/organizations/organization-units.shared.schemas.js.map +1 -1
  584. package/dist/esm/organizations/organizations.shared.resources-config.schemas.d.ts +51 -7
  585. package/dist/esm/organizations/organizations.shared.resources-config.schemas.d.ts.map +1 -1
  586. package/dist/esm/organizations/organizations.shared.resources-config.schemas.js +151 -7
  587. package/dist/esm/organizations/organizations.shared.resources-config.schemas.js.map +1 -1
  588. package/dist/esm/organizations/organizations.shared.schemas.d.ts +18 -83
  589. package/dist/esm/organizations/organizations.shared.schemas.d.ts.map +1 -1
  590. package/dist/esm/organizations/organizations.shared.schemas.js +37 -19
  591. package/dist/esm/organizations/organizations.shared.schemas.js.map +1 -1
  592. package/dist/esm/organizations/tenant-teardown-config.shared.schemas.d.ts.map +1 -1
  593. package/dist/esm/organizations/tenant-teardown-config.shared.schemas.js.map +1 -1
  594. package/dist/esm/provider-registration-runtime.exports.d.ts +1 -0
  595. package/dist/esm/provider-registration-runtime.exports.d.ts.map +1 -1
  596. package/dist/esm/provider-registration-runtime.exports.js +1 -0
  597. package/dist/esm/provider-registration-runtime.exports.js.map +1 -1
  598. package/dist/esm/public-runtime/index.d.ts +39 -10
  599. package/dist/esm/public-runtime/index.d.ts.map +1 -1
  600. package/dist/esm/public-runtime/index.js +39 -10
  601. package/dist/esm/public-runtime/index.js.map +1 -1
  602. package/dist/esm/queue/jobs.shared.resources-config.schemas.d.ts +7 -8
  603. package/dist/esm/queue/jobs.shared.resources-config.schemas.d.ts.map +1 -1
  604. package/dist/esm/queue/jobs.shared.resources-config.schemas.js +30 -6
  605. package/dist/esm/queue/jobs.shared.resources-config.schemas.js.map +1 -1
  606. package/dist/esm/queue/jobs.shared.schemas.d.ts +388 -2
  607. package/dist/esm/queue/jobs.shared.schemas.d.ts.map +1 -1
  608. package/dist/esm/queue/jobs.shared.schemas.js +315 -11
  609. package/dist/esm/queue/jobs.shared.schemas.js.map +1 -1
  610. package/dist/esm/queue/jobs.shared.utils.d.ts +6 -4
  611. package/dist/esm/queue/jobs.shared.utils.d.ts.map +1 -1
  612. package/dist/esm/queue/jobs.shared.utils.js +5 -4
  613. package/dist/esm/queue/jobs.shared.utils.js.map +1 -1
  614. package/dist/esm/queue/queues.shared.schemas.d.ts +20 -8
  615. package/dist/esm/queue/queues.shared.schemas.d.ts.map +1 -1
  616. package/dist/esm/queue/queues.shared.schemas.js +23 -18
  617. package/dist/esm/queue/queues.shared.schemas.js.map +1 -1
  618. package/dist/esm/queue/queues.shared.utils.d.ts +4 -2
  619. package/dist/esm/queue/queues.shared.utils.d.ts.map +1 -1
  620. package/dist/esm/queue/queues.shared.utils.js +4 -2
  621. package/dist/esm/queue/queues.shared.utils.js.map +1 -1
  622. package/dist/esm/rag/rag-retrieval-health.shared.d.ts +27 -0
  623. package/dist/esm/rag/rag-retrieval-health.shared.d.ts.map +1 -0
  624. package/dist/esm/rag/rag-retrieval-health.shared.js +29 -0
  625. package/dist/esm/rag/rag-retrieval-health.shared.js.map +1 -0
  626. package/dist/esm/requests/header-keys.shared.d.ts +6 -0
  627. package/dist/esm/requests/header-keys.shared.d.ts.map +1 -1
  628. package/dist/esm/requests/header-keys.shared.js +7 -0
  629. package/dist/esm/requests/header-keys.shared.js.map +1 -1
  630. package/dist/esm/requests/idempotency-key.shared.d.ts +76 -0
  631. package/dist/esm/requests/idempotency-key.shared.d.ts.map +1 -0
  632. package/dist/esm/requests/idempotency-key.shared.js +112 -0
  633. package/dist/esm/requests/idempotency-key.shared.js.map +1 -0
  634. package/dist/esm/requests/manual-controllers-routes-documentation.d.ts.map +1 -1
  635. package/dist/esm/requests/manual-controllers-routes-documentation.js +218 -17
  636. package/dist/esm/requests/manual-controllers-routes-documentation.js.map +1 -1
  637. package/dist/esm/requests/manual-controllers-routes-urls.d.ts +87 -0
  638. package/dist/esm/requests/manual-controllers-routes-urls.d.ts.map +1 -1
  639. package/dist/esm/requests/manual-controllers-routes-urls.js +102 -0
  640. package/dist/esm/requests/manual-controllers-routes-urls.js.map +1 -1
  641. package/dist/esm/requests/rate-limits.shared.schemas.d.ts.map +1 -1
  642. package/dist/esm/requests/rate-limits.shared.schemas.js.map +1 -1
  643. package/dist/esm/requests/websocket.shared.schemas.d.ts +200 -24
  644. package/dist/esm/requests/websocket.shared.schemas.d.ts.map +1 -1
  645. package/dist/esm/requests/websocket.shared.schemas.js +219 -5
  646. package/dist/esm/requests/websocket.shared.schemas.js.map +1 -1
  647. package/dist/esm/resources/child-operations.shared.schemas.d.ts +56 -5
  648. package/dist/esm/resources/child-operations.shared.schemas.d.ts.map +1 -1
  649. package/dist/esm/resources/child-operations.shared.schemas.js +97 -5
  650. package/dist/esm/resources/child-operations.shared.schemas.js.map +1 -1
  651. package/dist/esm/resources/context-policy.shared.schemas.d.ts +20 -0
  652. package/dist/esm/resources/context-policy.shared.schemas.d.ts.map +1 -1
  653. package/dist/esm/resources/context-policy.shared.schemas.js +3 -0
  654. package/dist/esm/resources/context-policy.shared.schemas.js.map +1 -1
  655. package/dist/esm/resources/relationship-display.shared.schemas.d.ts.map +1 -1
  656. package/dist/esm/resources/resources-config.shared.factory.d.ts.map +1 -1
  657. package/dist/esm/resources/resources-config.shared.factory.js +498 -29
  658. package/dist/esm/resources/resources-config.shared.factory.js.map +1 -1
  659. package/dist/esm/resources/resources-config.shared.schemas.d.ts +623 -45
  660. package/dist/esm/resources/resources-config.shared.schemas.d.ts.map +1 -1
  661. package/dist/esm/resources/resources-config.shared.schemas.js +315 -22
  662. package/dist/esm/resources/resources-config.shared.schemas.js.map +1 -1
  663. package/dist/esm/resources/resources-registry.shared.core.definitions.d.ts.map +1 -1
  664. package/dist/esm/resources/resources-registry.shared.core.definitions.js +377 -69
  665. package/dist/esm/resources/resources-registry.shared.core.definitions.js.map +1 -1
  666. package/dist/esm/resources/resources-relationships.shared.factory.d.ts.map +1 -1
  667. package/dist/esm/resources/resources-relationships.shared.factory.js.map +1 -1
  668. package/dist/esm/resources/resources-serialization.shared.schemas.d.ts.map +1 -1
  669. package/dist/esm/resources/resources.shared.core.definitions.d.ts +19 -0
  670. package/dist/esm/resources/resources.shared.core.definitions.d.ts.map +1 -1
  671. package/dist/esm/resources/resources.shared.core.definitions.js +28 -0
  672. package/dist/esm/resources/resources.shared.core.definitions.js.map +1 -1
  673. package/dist/esm/resources/resources.shared.schemas.d.ts +256 -10
  674. package/dist/esm/resources/resources.shared.schemas.d.ts.map +1 -1
  675. package/dist/esm/resources/resources.shared.schemas.js +209 -9
  676. package/dist/esm/resources/resources.shared.schemas.js.map +1 -1
  677. package/dist/esm/resources/resources.shared.utils.d.ts +3 -2
  678. package/dist/esm/resources/resources.shared.utils.d.ts.map +1 -1
  679. package/dist/esm/resources/resources.shared.utils.js +38 -6
  680. package/dist/esm/resources/resources.shared.utils.js.map +1 -1
  681. package/dist/esm/resources/utils/collection-export.shared.utils.d.ts.map +1 -1
  682. package/dist/esm/resources/utils/composition-cascade-deletability.validation.d.ts +44 -12
  683. package/dist/esm/resources/utils/composition-cascade-deletability.validation.d.ts.map +1 -1
  684. package/dist/esm/resources/utils/composition-cascade-deletability.validation.js +46 -23
  685. package/dist/esm/resources/utils/composition-cascade-deletability.validation.js.map +1 -1
  686. package/dist/esm/resources/utils/composition-seedability.validation.d.ts.map +1 -1
  687. package/dist/esm/resources/utils/context-addressed-composition-singleton.shared.utils.d.ts.map +1 -1
  688. package/dist/esm/resources/utils/dependent-lifecycle-classification.validation.d.ts +61 -0
  689. package/dist/esm/resources/utils/dependent-lifecycle-classification.validation.d.ts.map +1 -0
  690. package/dist/esm/resources/utils/dependent-lifecycle-classification.validation.js +79 -0
  691. package/dist/esm/resources/utils/dependent-lifecycle-classification.validation.js.map +1 -0
  692. package/dist/esm/resources/utils/duplicate-relationship-registration.validation.d.ts.map +1 -1
  693. package/dist/esm/resources/utils/field-value-disclosure.utils.d.ts.map +1 -1
  694. package/dist/esm/resources/utils/field-value-disclosure.utils.js.map +1 -1
  695. package/dist/esm/resources/utils/initiator-stamped-field-satisfiability.validation.d.ts +60 -0
  696. package/dist/esm/resources/utils/initiator-stamped-field-satisfiability.validation.d.ts.map +1 -0
  697. package/dist/esm/resources/utils/initiator-stamped-field-satisfiability.validation.js +80 -0
  698. package/dist/esm/resources/utils/initiator-stamped-field-satisfiability.validation.js.map +1 -0
  699. package/dist/esm/resources/utils/persistence-adapter-discrimination.shared.utils.d.ts.map +1 -1
  700. package/dist/esm/resources/utils/populated-file-fields.shared.utils.d.ts +21 -0
  701. package/dist/esm/resources/utils/populated-file-fields.shared.utils.d.ts.map +1 -0
  702. package/dist/esm/resources/utils/populated-file-fields.shared.utils.js +159 -0
  703. package/dist/esm/resources/utils/populated-file-fields.shared.utils.js.map +1 -0
  704. package/dist/esm/resources/utils/repository-dto-builder.utils.d.ts.map +1 -1
  705. package/dist/esm/resources/utils/required-fk-fillability.validation.d.ts.map +1 -1
  706. package/dist/esm/resources/utils/resource-operation-type-guards.utils.d.ts.map +1 -1
  707. package/dist/esm/resources/utils/resource-polymorphism.factory.d.ts.map +1 -1
  708. package/dist/esm/resources/utils/resource-polymorphism.relationships.d.ts.map +1 -1
  709. package/dist/esm/resources/utils/resource-polymorphism.schemas.d.ts.map +1 -1
  710. package/dist/esm/resources/utils/resource-polymorphism.utils.d.ts.map +1 -1
  711. package/dist/esm/resources/utils/resource-subtree.utils.d.ts.map +1 -1
  712. package/dist/esm/resources/utils/resources-config-context-needs.utils.d.ts.map +1 -1
  713. package/dist/esm/resources/utils/resources-config-naming.utils.d.ts +15 -0
  714. package/dist/esm/resources/utils/resources-config-naming.utils.d.ts.map +1 -1
  715. package/dist/esm/resources/utils/resources-config-naming.utils.js +56 -11
  716. package/dist/esm/resources/utils/resources-config-naming.utils.js.map +1 -1
  717. package/dist/esm/resources/utils/resources-config-operations.dtos-builder.utils.d.ts +51 -1
  718. package/dist/esm/resources/utils/resources-config-operations.dtos-builder.utils.d.ts.map +1 -1
  719. package/dist/esm/resources/utils/resources-config-operations.dtos-builder.utils.js +210 -51
  720. package/dist/esm/resources/utils/resources-config-operations.dtos-builder.utils.js.map +1 -1
  721. package/dist/esm/resources/utils/resources-config-operations.path.utils.d.ts.map +1 -1
  722. package/dist/esm/resources/utils/resources-config-operations.urls-builder.utils.d.ts +34 -0
  723. package/dist/esm/resources/utils/resources-config-operations.urls-builder.utils.d.ts.map +1 -1
  724. package/dist/esm/resources/utils/resources-config-operations.urls-builder.utils.js +45 -1
  725. package/dist/esm/resources/utils/resources-config-operations.urls-builder.utils.js.map +1 -1
  726. package/dist/esm/resources/utils/resources-config-operations.utils.d.ts.map +1 -1
  727. package/dist/esm/resources/utils/resources-serialization.utils.d.ts.map +1 -1
  728. package/dist/esm/resources/utils/resources-summary.utils.d.ts.map +1 -1
  729. package/dist/esm/resources/utils/resources-summary.utils.js.map +1 -1
  730. package/dist/esm/resources/utils/schema-family-builder.utils.d.ts.map +1 -1
  731. package/dist/esm/resources/utils/schema-type-inference.utils.d.ts.map +1 -1
  732. package/dist/esm/resources/utils/schema-type-utils.d.ts.map +1 -1
  733. package/dist/esm/resources/utils/schema-variant-resolver.utils.d.ts.map +1 -1
  734. package/dist/esm/resources/utils/shared-persistence-collection.utils.d.ts +29 -0
  735. package/dist/esm/resources/utils/shared-persistence-collection.utils.d.ts.map +1 -1
  736. package/dist/esm/resources/utils/shared-persistence-collection.utils.js +30 -0
  737. package/dist/esm/resources/utils/shared-persistence-collection.utils.js.map +1 -1
  738. package/dist/esm/resources/utils/templatable-file-fields.shared.utils.d.ts.map +1 -1
  739. package/dist/esm/resources/utils/templatable-file-fields.shared.utils.js +49 -11
  740. package/dist/esm/resources/utils/templatable-file-fields.shared.utils.js.map +1 -1
  741. package/dist/esm/runtime/domain-module.shared.definitions.d.ts.map +1 -1
  742. package/dist/esm/runtime/domain-module.shared.definitions.js.map +1 -1
  743. package/dist/esm/runtime/execution-context.shared.schemas.d.ts.map +1 -1
  744. package/dist/esm/security/api-keys/api-keys-application.shared.resources-config.schemas.d.ts.map +1 -1
  745. package/dist/esm/security/api-keys/api-keys-application.shared.resources-config.schemas.js +4 -1
  746. package/dist/esm/security/api-keys/api-keys-application.shared.resources-config.schemas.js.map +1 -1
  747. package/dist/esm/security/api-keys/api-keys-organization.shared.resources-config.schemas.d.ts.map +1 -1
  748. package/dist/esm/security/api-keys/api-keys-organization.shared.resources-config.schemas.js +4 -1
  749. package/dist/esm/security/api-keys/api-keys-organization.shared.resources-config.schemas.js.map +1 -1
  750. package/dist/esm/security/api-keys/api-keys.shared.schemas.d.ts.map +1 -1
  751. package/dist/esm/security/authentications/anonymous-session/anonymous-session.shared.contract.d.ts.map +1 -1
  752. package/dist/esm/security/authentications/authentication.shared.dto.schemas.d.ts +128 -16
  753. package/dist/esm/security/authentications/authentication.shared.dto.schemas.d.ts.map +1 -1
  754. package/dist/esm/security/authentications/authentication.shared.dto.schemas.js +160 -6
  755. package/dist/esm/security/authentications/authentication.shared.dto.schemas.js.map +1 -1
  756. package/dist/esm/security/authentications/authentication.shared.schemas.d.ts +324 -9
  757. package/dist/esm/security/authentications/authentication.shared.schemas.d.ts.map +1 -1
  758. package/dist/esm/security/authentications/authentication.shared.schemas.js +411 -8
  759. package/dist/esm/security/authentications/authentication.shared.schemas.js.map +1 -1
  760. package/dist/esm/security/authentications/authentication.shared.utils.d.ts +87 -4
  761. package/dist/esm/security/authentications/authentication.shared.utils.d.ts.map +1 -1
  762. package/dist/esm/security/authentications/authentication.shared.utils.js +95 -6
  763. package/dist/esm/security/authentications/authentication.shared.utils.js.map +1 -1
  764. package/dist/esm/security/authentications/consumable-token.shared.schemas.d.ts +23 -1
  765. package/dist/esm/security/authentications/consumable-token.shared.schemas.d.ts.map +1 -1
  766. package/dist/esm/security/authentications/consumable-token.shared.schemas.js +23 -1
  767. package/dist/esm/security/authentications/consumable-token.shared.schemas.js.map +1 -1
  768. package/dist/esm/security/authentications/cross-frontend-handoff.shared.dto.schemas.d.ts +7 -1
  769. package/dist/esm/security/authentications/cross-frontend-handoff.shared.dto.schemas.d.ts.map +1 -1
  770. package/dist/esm/security/authentications/cross-frontend-handoff.shared.dto.schemas.js +7 -1
  771. package/dist/esm/security/authentications/cross-frontend-handoff.shared.dto.schemas.js.map +1 -1
  772. package/dist/esm/security/authentications/password-blocklist.shared.utils.d.ts +74 -0
  773. package/dist/esm/security/authentications/password-blocklist.shared.utils.d.ts.map +1 -0
  774. package/dist/esm/security/authentications/password-blocklist.shared.utils.js +122 -0
  775. package/dist/esm/security/authentications/password-blocklist.shared.utils.js.map +1 -0
  776. package/dist/esm/security/authentications/password-reset.shared.dto.schemas.d.ts.map +1 -1
  777. package/dist/esm/security/authentications/registration.shared.dto.schemas.d.ts +88 -2
  778. package/dist/esm/security/authentications/registration.shared.dto.schemas.d.ts.map +1 -1
  779. package/dist/esm/security/authentications/registration.shared.dto.schemas.js +149 -2
  780. package/dist/esm/security/authentications/registration.shared.dto.schemas.js.map +1 -1
  781. package/dist/esm/security/authentications/scim/scim-organization-unit-mapping.shared.d.ts +57 -11
  782. package/dist/esm/security/authentications/scim/scim-organization-unit-mapping.shared.d.ts.map +1 -1
  783. package/dist/esm/security/authentications/scim/scim-organization-unit-mapping.shared.js +44 -11
  784. package/dist/esm/security/authentications/scim/scim-organization-unit-mapping.shared.js.map +1 -1
  785. package/dist/esm/security/authentications/scim/scim-provisioning-config.shared.resources-config.schemas.d.ts.map +1 -1
  786. package/dist/esm/security/authentications/scim/scim-provisioning-config.shared.resources-config.schemas.js +20 -7
  787. package/dist/esm/security/authentications/scim/scim-provisioning-config.shared.resources-config.schemas.js.map +1 -1
  788. package/dist/esm/security/authentications/scim/scim-provisioning-config.shared.schemas.d.ts +16 -2
  789. package/dist/esm/security/authentications/scim/scim-provisioning-config.shared.schemas.d.ts.map +1 -1
  790. package/dist/esm/security/authentications/scim/scim-provisioning-config.shared.schemas.js +32 -2
  791. package/dist/esm/security/authentications/scim/scim-provisioning-config.shared.schemas.js.map +1 -1
  792. package/dist/esm/security/authentications/scim/scim-tokens.shared.resources-config.schemas.d.ts.map +1 -1
  793. package/dist/esm/security/authentications/scim/scim-tokens.shared.resources-config.schemas.js +7 -1
  794. package/dist/esm/security/authentications/scim/scim-tokens.shared.resources-config.schemas.js.map +1 -1
  795. package/dist/esm/security/authentications/scim/scim-tokens.shared.schemas.d.ts.map +1 -1
  796. package/dist/esm/security/authentications/siem/siem-delivery-dlq.shared.resources-config.schemas.d.ts.map +1 -1
  797. package/dist/esm/security/authentications/siem/siem-delivery-dlq.shared.resources-config.schemas.js +4 -1
  798. package/dist/esm/security/authentications/siem/siem-delivery-dlq.shared.resources-config.schemas.js.map +1 -1
  799. package/dist/esm/security/authentications/siem/siem-delivery-dlq.shared.schemas.d.ts.map +1 -1
  800. package/dist/esm/security/authentications/siem/siem-delivery-outbox.shared.resources-config.schemas.d.ts +27 -0
  801. package/dist/esm/security/authentications/siem/siem-delivery-outbox.shared.resources-config.schemas.d.ts.map +1 -0
  802. package/dist/esm/security/authentications/siem/siem-delivery-outbox.shared.resources-config.schemas.js +109 -0
  803. package/dist/esm/security/authentications/siem/siem-delivery-outbox.shared.resources-config.schemas.js.map +1 -0
  804. package/dist/esm/security/authentications/siem/siem-delivery-outbox.shared.schemas.d.ts +66 -0
  805. package/dist/esm/security/authentications/siem/siem-delivery-outbox.shared.schemas.d.ts.map +1 -0
  806. package/dist/esm/security/authentications/siem/siem-delivery-outbox.shared.schemas.js +107 -0
  807. package/dist/esm/security/authentications/siem/siem-delivery-outbox.shared.schemas.js.map +1 -0
  808. package/dist/esm/security/authentications/siem/siem-delivery-reliability-contract.shared.d.ts.map +1 -1
  809. package/dist/esm/security/authentications/siem/siem-delivery-reliability-contract.shared.js.map +1 -1
  810. package/dist/esm/security/authentications/siem/siem-export-config.shared.resources-config.schemas.d.ts +19 -0
  811. package/dist/esm/security/authentications/siem/siem-export-config.shared.resources-config.schemas.d.ts.map +1 -1
  812. package/dist/esm/security/authentications/siem/siem-export-config.shared.resources-config.schemas.js +50 -13
  813. package/dist/esm/security/authentications/siem/siem-export-config.shared.resources-config.schemas.js.map +1 -1
  814. package/dist/esm/security/authentications/siem/siem-export-config.shared.schemas.d.ts +18 -6
  815. package/dist/esm/security/authentications/siem/siem-export-config.shared.schemas.d.ts.map +1 -1
  816. package/dist/esm/security/authentications/siem/siem-export-config.shared.schemas.js +133 -4
  817. package/dist/esm/security/authentications/siem/siem-export-config.shared.schemas.js.map +1 -1
  818. package/dist/esm/security/authentications/sso/sso-config.shared.resources-config.schemas.d.ts +26 -0
  819. package/dist/esm/security/authentications/sso/sso-config.shared.resources-config.schemas.d.ts.map +1 -1
  820. package/dist/esm/security/authentications/sso/sso-config.shared.resources-config.schemas.js +46 -17
  821. package/dist/esm/security/authentications/sso/sso-config.shared.resources-config.schemas.js.map +1 -1
  822. package/dist/esm/security/authentications/sso/sso-config.shared.schemas.d.ts +0 -40
  823. package/dist/esm/security/authentications/sso/sso-config.shared.schemas.d.ts.map +1 -1
  824. package/dist/esm/security/authentications/sso/sso-config.shared.schemas.js +100 -26
  825. package/dist/esm/security/authentications/sso/sso-config.shared.schemas.js.map +1 -1
  826. package/dist/esm/security/authentications/sso/sso-connection.shared.resources-config.schemas.d.ts +9 -1
  827. package/dist/esm/security/authentications/sso/sso-connection.shared.resources-config.schemas.d.ts.map +1 -1
  828. package/dist/esm/security/authentications/sso/sso-connection.shared.resources-config.schemas.js +9 -1
  829. package/dist/esm/security/authentications/sso/sso-connection.shared.resources-config.schemas.js.map +1 -1
  830. package/dist/esm/security/authentications/sso/sso-connection.shared.schemas.d.ts +6 -2
  831. package/dist/esm/security/authentications/sso/sso-connection.shared.schemas.d.ts.map +1 -1
  832. package/dist/esm/security/authentications/sso/sso-connection.shared.schemas.js +76 -4
  833. package/dist/esm/security/authentications/sso/sso-connection.shared.schemas.js.map +1 -1
  834. package/dist/esm/security/authorizations/administrative-continuity.shared.schemas.d.ts +5 -4
  835. package/dist/esm/security/authorizations/administrative-continuity.shared.schemas.d.ts.map +1 -1
  836. package/dist/esm/security/authorizations/administrative-continuity.shared.schemas.js +5 -4
  837. package/dist/esm/security/authorizations/administrative-continuity.shared.schemas.js.map +1 -1
  838. package/dist/esm/security/authorizations/application-access-grants.shared.resources-config.schemas.d.ts +4 -0
  839. package/dist/esm/security/authorizations/application-access-grants.shared.resources-config.schemas.d.ts.map +1 -1
  840. package/dist/esm/security/authorizations/application-access-grants.shared.resources-config.schemas.js +8 -0
  841. package/dist/esm/security/authorizations/application-access-grants.shared.resources-config.schemas.js.map +1 -1
  842. package/dist/esm/security/authorizations/application-access-grants.shared.schemas.d.ts +44 -0
  843. package/dist/esm/security/authorizations/application-access-grants.shared.schemas.d.ts.map +1 -1
  844. package/dist/esm/security/authorizations/application-access-grants.shared.schemas.js +52 -0
  845. package/dist/esm/security/authorizations/application-access-grants.shared.schemas.js.map +1 -1
  846. package/dist/esm/security/authorizations/platform-access-grants.shared.resources-config.schemas.d.ts.map +1 -1
  847. package/dist/esm/security/authorizations/platform-access-grants.shared.resources-config.schemas.js.map +1 -1
  848. package/dist/esm/security/authorizations/platform-access-grants.shared.schemas.d.ts.map +1 -1
  849. package/dist/esm/security/authorizations/platform-access-grants.shared.schemas.js.map +1 -1
  850. package/dist/esm/security/authorizations/roles.shared.defaults.d.ts.map +1 -1
  851. package/dist/esm/security/authorizations/roles.shared.defaults.js +6 -0
  852. package/dist/esm/security/authorizations/roles.shared.defaults.js.map +1 -1
  853. package/dist/esm/security/authorizations/roles.shared.schemas.d.ts +14 -0
  854. package/dist/esm/security/authorizations/roles.shared.schemas.d.ts.map +1 -1
  855. package/dist/esm/security/authorizations/roles.shared.schemas.js +19 -0
  856. package/dist/esm/security/authorizations/roles.shared.schemas.js.map +1 -1
  857. package/dist/esm/security/authorizations/roles.shared.utils.d.ts.map +1 -1
  858. package/dist/esm/security/authorizations/roles.shared.utils.js +2 -0
  859. package/dist/esm/security/authorizations/roles.shared.utils.js.map +1 -1
  860. package/dist/esm/security/connected-accounts/provider-credentials-organization.shared.resources-config.schemas.d.ts +4 -1
  861. package/dist/esm/security/connected-accounts/provider-credentials-organization.shared.resources-config.schemas.d.ts.map +1 -1
  862. package/dist/esm/security/connected-accounts/provider-credentials-organization.shared.resources-config.schemas.js.map +1 -1
  863. package/dist/esm/security/connected-accounts/provider-credentials-user.shared.resources-config.schemas.d.ts +5 -2
  864. package/dist/esm/security/connected-accounts/provider-credentials-user.shared.resources-config.schemas.d.ts.map +1 -1
  865. package/dist/esm/security/connected-accounts/provider-credentials-user.shared.resources-config.schemas.js +13 -42
  866. package/dist/esm/security/connected-accounts/provider-credentials-user.shared.resources-config.schemas.js.map +1 -1
  867. package/dist/esm/security/connected-accounts/provider-credentials.shared.schemas.d.ts +201 -14
  868. package/dist/esm/security/connected-accounts/provider-credentials.shared.schemas.d.ts.map +1 -1
  869. package/dist/esm/security/connected-accounts/provider-credentials.shared.schemas.js +237 -49
  870. package/dist/esm/security/connected-accounts/provider-credentials.shared.schemas.js.map +1 -1
  871. package/dist/esm/security/oauth-clients/oauth-clients-application.shared.resources-config.schemas.d.ts +6 -3
  872. package/dist/esm/security/oauth-clients/oauth-clients-application.shared.resources-config.schemas.d.ts.map +1 -1
  873. package/dist/esm/security/oauth-clients/oauth-clients-application.shared.resources-config.schemas.js +74 -4
  874. package/dist/esm/security/oauth-clients/oauth-clients-application.shared.resources-config.schemas.js.map +1 -1
  875. package/dist/esm/security/oauth-clients/oauth-clients-organization.shared.resources-config.schemas.d.ts +5 -2
  876. package/dist/esm/security/oauth-clients/oauth-clients-organization.shared.resources-config.schemas.d.ts.map +1 -1
  877. package/dist/esm/security/oauth-clients/oauth-clients-organization.shared.resources-config.schemas.js +105 -3
  878. package/dist/esm/security/oauth-clients/oauth-clients-organization.shared.resources-config.schemas.js.map +1 -1
  879. package/dist/esm/security/oauth-clients/oauth-clients.shared.schemas.d.ts.map +1 -1
  880. package/dist/esm/security/oauth-clients/oauth-clients.shared.schemas.js.map +1 -1
  881. package/dist/esm/security/oauth-clients/oauth-consent-grants.shared.resources-config.schemas.d.ts.map +1 -1
  882. package/dist/esm/security/oauth-clients/oauth-consent-grants.shared.schemas.d.ts.map +1 -1
  883. package/dist/esm/security/oauth-clients/oauth-consent-grants.shared.schemas.js.map +1 -1
  884. package/dist/esm/security/oauth-clients/oauth-resource-server.shared.schemas.d.ts.map +1 -1
  885. package/dist/esm/security/outbound-target-control.shared.schemas.d.ts +67 -0
  886. package/dist/esm/security/outbound-target-control.shared.schemas.d.ts.map +1 -0
  887. package/dist/esm/security/outbound-target-control.shared.schemas.js +69 -0
  888. package/dist/esm/security/outbound-target-control.shared.schemas.js.map +1 -0
  889. package/dist/esm/systems-of-record/system-of-record-credential-kind.shared.d.ts +159 -0
  890. package/dist/esm/systems-of-record/system-of-record-credential-kind.shared.d.ts.map +1 -0
  891. package/dist/esm/systems-of-record/system-of-record-credential-kind.shared.js +164 -0
  892. package/dist/esm/systems-of-record/system-of-record-credential-kind.shared.js.map +1 -0
  893. package/dist/esm/systems-of-record/system-of-record-declaration.shared.schemas.d.ts +209 -0
  894. package/dist/esm/systems-of-record/system-of-record-declaration.shared.schemas.d.ts.map +1 -0
  895. package/dist/esm/systems-of-record/system-of-record-declaration.shared.schemas.js +150 -0
  896. package/dist/esm/systems-of-record/system-of-record-declaration.shared.schemas.js.map +1 -0
  897. package/dist/esm/systems-of-record/system-of-record-env.shared.d.ts +79 -0
  898. package/dist/esm/systems-of-record/system-of-record-env.shared.d.ts.map +1 -0
  899. package/dist/esm/systems-of-record/system-of-record-env.shared.js +116 -0
  900. package/dist/esm/systems-of-record/system-of-record-env.shared.js.map +1 -0
  901. package/dist/esm/systems-of-record/system-of-record-error-codes.shared.d.ts +145 -0
  902. package/dist/esm/systems-of-record/system-of-record-error-codes.shared.d.ts.map +1 -0
  903. package/dist/esm/systems-of-record/system-of-record-error-codes.shared.js +146 -0
  904. package/dist/esm/systems-of-record/system-of-record-error-codes.shared.js.map +1 -0
  905. package/dist/esm/systems-of-record/system-of-record-facet.shared.schemas.d.ts +478 -0
  906. package/dist/esm/systems-of-record/system-of-record-facet.shared.schemas.d.ts.map +1 -0
  907. package/dist/esm/systems-of-record/system-of-record-facet.shared.schemas.js +619 -0
  908. package/dist/esm/systems-of-record/system-of-record-facet.shared.schemas.js.map +1 -0
  909. package/dist/esm/systems-of-record/system-of-record-partition-assignments.shared.resources-config.schemas.d.ts +31 -0
  910. package/dist/esm/systems-of-record/system-of-record-partition-assignments.shared.resources-config.schemas.d.ts.map +1 -0
  911. package/dist/esm/systems-of-record/system-of-record-partition-assignments.shared.resources-config.schemas.js +232 -0
  912. package/dist/esm/systems-of-record/system-of-record-partition-assignments.shared.resources-config.schemas.js.map +1 -0
  913. package/dist/esm/systems-of-record/system-of-record-partition-assignments.shared.schemas.d.ts +127 -0
  914. package/dist/esm/systems-of-record/system-of-record-partition-assignments.shared.schemas.d.ts.map +1 -0
  915. package/dist/esm/systems-of-record/system-of-record-partition-assignments.shared.schemas.js +204 -0
  916. package/dist/esm/systems-of-record/system-of-record-partition-assignments.shared.schemas.js.map +1 -0
  917. package/dist/esm/testing/resource-config-builders.d.ts.map +1 -1
  918. package/dist/esm/testing/resource-config-builders.js +10 -4
  919. package/dist/esm/testing/resource-config-builders.js.map +1 -1
  920. package/dist/esm/testing.d.ts.map +1 -1
  921. package/dist/esm/users/anonymous-user-marketing-metadata.shared.schemas.d.ts +2 -1
  922. package/dist/esm/users/anonymous-user-marketing-metadata.shared.schemas.d.ts.map +1 -1
  923. package/dist/esm/users/anonymous-user-marketing-metadata.shared.schemas.js +2 -1
  924. package/dist/esm/users/anonymous-user-marketing-metadata.shared.schemas.js.map +1 -1
  925. package/dist/esm/users/anonymous-users.shared.resources-config.schemas.d.ts +139 -24
  926. package/dist/esm/users/anonymous-users.shared.resources-config.schemas.d.ts.map +1 -1
  927. package/dist/esm/users/anonymous-users.shared.resources-config.schemas.js +255 -0
  928. package/dist/esm/users/anonymous-users.shared.resources-config.schemas.js.map +1 -1
  929. package/dist/esm/users/anonymous-users.shared.schema.d.ts +5 -3
  930. package/dist/esm/users/anonymous-users.shared.schema.d.ts.map +1 -1
  931. package/dist/esm/users/anonymous-users.shared.schema.js +18 -1
  932. package/dist/esm/users/anonymous-users.shared.schema.js.map +1 -1
  933. package/dist/esm/users/inbound-contacts.shared.resources-config.schemas.d.ts +2 -1
  934. package/dist/esm/users/inbound-contacts.shared.resources-config.schemas.d.ts.map +1 -1
  935. package/dist/esm/users/inbound-contacts.shared.resources-config.schemas.js +23 -0
  936. package/dist/esm/users/inbound-contacts.shared.resources-config.schemas.js.map +1 -1
  937. package/dist/esm/users/inbound-contacts.shared.schemas.d.ts +2 -1
  938. package/dist/esm/users/inbound-contacts.shared.schemas.d.ts.map +1 -1
  939. package/dist/esm/users/user-consent-decision.shared.utils.d.ts +127 -0
  940. package/dist/esm/users/user-consent-decision.shared.utils.d.ts.map +1 -0
  941. package/dist/esm/users/user-consent-decision.shared.utils.js +189 -0
  942. package/dist/esm/users/user-consent-decision.shared.utils.js.map +1 -0
  943. package/dist/esm/users/user-credentials.shared.resources-config.schemas.d.ts.map +1 -1
  944. package/dist/esm/users/user-credentials.shared.schemas.d.ts.map +1 -1
  945. package/dist/esm/users/user-identity-links.shared.resources-config.schemas.d.ts +1 -0
  946. package/dist/esm/users/user-identity-links.shared.resources-config.schemas.d.ts.map +1 -1
  947. package/dist/esm/users/user-identity-links.shared.schemas.d.ts +1 -0
  948. package/dist/esm/users/user-identity-links.shared.schemas.d.ts.map +1 -1
  949. package/dist/esm/users/user-identity-links.shared.schemas.js +30 -0
  950. package/dist/esm/users/user-identity-links.shared.schemas.js.map +1 -1
  951. package/dist/esm/users/user-preferences-reset.shared.utils.d.ts +6 -6
  952. package/dist/esm/users/user-preferences-reset.shared.utils.d.ts.map +1 -1
  953. package/dist/esm/users/user-preferences-reset.shared.utils.js +6 -6
  954. package/dist/esm/users/user-preferences-reset.shared.utils.js.map +1 -1
  955. package/dist/esm/users/user-preferences.shared.resources-config.schemas.d.ts +74 -29
  956. package/dist/esm/users/user-preferences.shared.resources-config.schemas.d.ts.map +1 -1
  957. package/dist/esm/users/user-preferences.shared.resources-config.schemas.js +99 -0
  958. package/dist/esm/users/user-preferences.shared.resources-config.schemas.js.map +1 -1
  959. package/dist/esm/users/user-profiles.shared.resources-config.schemas.d.ts.map +1 -1
  960. package/dist/esm/users/user-profiles.shared.resources-config.schemas.js +25 -9
  961. package/dist/esm/users/user-profiles.shared.resources-config.schemas.js.map +1 -1
  962. package/dist/esm/users/user-self-preferences.shared.resources-config.schemas.d.ts +4 -4
  963. package/dist/esm/users/user-self-preferences.shared.resources-config.schemas.d.ts.map +1 -1
  964. package/dist/esm/users/user-self-preferences.shared.resources-config.schemas.js +12 -1
  965. package/dist/esm/users/user-self-preferences.shared.resources-config.schemas.js.map +1 -1
  966. package/dist/esm/users/user-self-profiles.shared.resources-config.schemas.d.ts.map +1 -1
  967. package/dist/esm/users/user-self.shared.resources-config.schemas.d.ts +1 -0
  968. package/dist/esm/users/user-self.shared.resources-config.schemas.d.ts.map +1 -1
  969. package/dist/esm/users/user-self.shared.resources-config.schemas.js +2 -2
  970. package/dist/esm/users/user-self.shared.resources-config.schemas.js.map +1 -1
  971. package/dist/esm/users/users.shared.resources-config.schemas.d.ts +1 -0
  972. package/dist/esm/users/users.shared.resources-config.schemas.d.ts.map +1 -1
  973. package/dist/esm/users/users.shared.resources-config.schemas.js +2 -2
  974. package/dist/esm/users/users.shared.resources-config.schemas.js.map +1 -1
  975. package/dist/esm/users/users.shared.schemas.d.ts +11 -9
  976. package/dist/esm/users/users.shared.schemas.d.ts.map +1 -1
  977. package/dist/esm/users/users.shared.schemas.js +68 -9
  978. package/dist/esm/users/users.shared.schemas.js.map +1 -1
  979. package/dist/tsconfig.build.tsbuildinfo +1 -1
  980. package/package.json +14 -35
  981. package/dist/esm/flows-actors/apps-blueprint/apps-blueprint-agent-personas.shared.enums.d.ts +0 -19
  982. package/dist/esm/flows-actors/apps-blueprint/apps-blueprint-agent-personas.shared.enums.d.ts.map +0 -1
  983. package/dist/esm/flows-actors/apps-blueprint/apps-blueprint-agent-personas.shared.enums.js +0 -35
  984. package/dist/esm/flows-actors/apps-blueprint/apps-blueprint-agent-personas.shared.enums.js.map +0 -1
  985. package/dist/esm/flows-actors/apps-blueprint/apps-blueprint.shared.schemas.d.ts +0 -213
  986. package/dist/esm/flows-actors/apps-blueprint/apps-blueprint.shared.schemas.d.ts.map +0 -1
  987. package/dist/esm/flows-actors/apps-blueprint/apps-blueprint.shared.schemas.js +0 -287
  988. package/dist/esm/flows-actors/apps-blueprint/apps-blueprint.shared.schemas.js.map +0 -1
  989. package/dist/esm/flows-actors/apps-blueprint/artifacts.apps-blueprint.shared.schemas.d.ts +0 -236
  990. package/dist/esm/flows-actors/apps-blueprint/artifacts.apps-blueprint.shared.schemas.d.ts.map +0 -1
  991. package/dist/esm/flows-actors/apps-blueprint/artifacts.apps-blueprint.shared.schemas.js +0 -212
  992. package/dist/esm/flows-actors/apps-blueprint/artifacts.apps-blueprint.shared.schemas.js.map +0 -1
  993. package/dist/esm/flows-actors/meta-workflows/actions.meta-workflows.shared.schemas.d.ts.map +0 -1
  994. package/dist/esm/flows-actors/meta-workflows/actions.meta-workflows.shared.schemas.js.map +0 -1
  995. package/dist/esm/flows-actors/meta-workflows/budget-authority.meta-workflows.shared.schemas.d.ts +0 -17
  996. package/dist/esm/flows-actors/meta-workflows/budget-authority.meta-workflows.shared.schemas.d.ts.map +0 -1
  997. package/dist/esm/flows-actors/meta-workflows/budget-authority.meta-workflows.shared.schemas.js +0 -31
  998. package/dist/esm/flows-actors/meta-workflows/budget-authority.meta-workflows.shared.schemas.js.map +0 -1
  999. package/dist/esm/flows-actors/meta-workflows/catalog.meta-workflows.shared.schemas.d.ts.map +0 -1
  1000. package/dist/esm/flows-actors/meta-workflows/catalog.meta-workflows.shared.schemas.js.map +0 -1
  1001. package/dist/esm/flows-actors/meta-workflows/context-selection.meta-workflows.shared.schemas.d.ts.map +0 -1
  1002. package/dist/esm/flows-actors/meta-workflows/context-selection.meta-workflows.shared.schemas.js.map +0 -1
  1003. package/dist/esm/flows-actors/meta-workflows/continuity-identifiers.meta-workflows.shared.schemas.d.ts +0 -28
  1004. package/dist/esm/flows-actors/meta-workflows/continuity-identifiers.meta-workflows.shared.schemas.d.ts.map +0 -1
  1005. package/dist/esm/flows-actors/meta-workflows/continuity-identifiers.meta-workflows.shared.schemas.js +0 -28
  1006. package/dist/esm/flows-actors/meta-workflows/continuity-identifiers.meta-workflows.shared.schemas.js.map +0 -1
  1007. package/dist/esm/flows-actors/meta-workflows/decisions.meta-workflows.shared.schemas.d.ts.map +0 -1
  1008. package/dist/esm/flows-actors/meta-workflows/decisions.meta-workflows.shared.schemas.js.map +0 -1
  1009. package/dist/esm/flows-actors/meta-workflows/execution-binding-common.meta-workflows.shared.schemas.d.ts +0 -100
  1010. package/dist/esm/flows-actors/meta-workflows/execution-binding-common.meta-workflows.shared.schemas.d.ts.map +0 -1
  1011. package/dist/esm/flows-actors/meta-workflows/execution-binding-common.meta-workflows.shared.schemas.js +0 -232
  1012. package/dist/esm/flows-actors/meta-workflows/execution-binding-common.meta-workflows.shared.schemas.js.map +0 -1
  1013. package/dist/esm/flows-actors/meta-workflows/execution-binding-vocabularies.meta-workflows.shared.schemas.d.ts +0 -29
  1014. package/dist/esm/flows-actors/meta-workflows/execution-binding-vocabularies.meta-workflows.shared.schemas.d.ts.map +0 -1
  1015. package/dist/esm/flows-actors/meta-workflows/execution-binding-vocabularies.meta-workflows.shared.schemas.js +0 -58
  1016. package/dist/esm/flows-actors/meta-workflows/execution-binding-vocabularies.meta-workflows.shared.schemas.js.map +0 -1
  1017. package/dist/esm/flows-actors/meta-workflows/portable-primitives.meta-workflows.shared.schemas.d.ts.map +0 -1
  1018. package/dist/esm/flows-actors/meta-workflows/portable-primitives.meta-workflows.shared.schemas.js.map +0 -1
  1019. package/dist/esm/flows-actors/task-continuity-binding.actors.shared.schemas.d.ts +0 -81
  1020. package/dist/esm/flows-actors/task-continuity-binding.actors.shared.schemas.d.ts.map +0 -1
  1021. package/dist/esm/flows-actors/task-continuity-binding.actors.shared.schemas.js +0 -82
  1022. package/dist/esm/flows-actors/task-continuity-binding.actors.shared.schemas.js.map +0 -1
  1023. package/dist/esm/flows-actors/utils/flow-actors.context-builder.apps-context.shared.utils.d.ts +0 -2
  1024. package/dist/esm/flows-actors/utils/flow-actors.context-builder.apps-context.shared.utils.d.ts.map +0 -1
  1025. package/dist/esm/flows-actors/utils/flow-actors.context-builder.apps-context.shared.utils.js +0 -1
  1026. package/dist/esm/flows-actors/utils/flow-actors.context-builder.apps-context.shared.utils.js.map +0 -1
  1027. /package/dist/esm/{flows-actors/meta-workflows → meta-workflows}/actions.meta-workflows.shared.schemas.d.ts +0 -0
  1028. /package/dist/esm/{flows-actors/meta-workflows → meta-workflows}/actions.meta-workflows.shared.schemas.js +0 -0
  1029. /package/dist/esm/{flows-actors/meta-workflows → meta-workflows}/catalog.meta-workflows.shared.schemas.d.ts +0 -0
  1030. /package/dist/esm/{flows-actors/meta-workflows → meta-workflows}/catalog.meta-workflows.shared.schemas.js +0 -0
  1031. /package/dist/esm/{flows-actors/meta-workflows → meta-workflows}/context-selection.meta-workflows.shared.schemas.d.ts +0 -0
  1032. /package/dist/esm/{flows-actors/meta-workflows → meta-workflows}/context-selection.meta-workflows.shared.schemas.js +0 -0
@@ -0,0 +1,526 @@
1
+ import { z } from "zod";
2
+ import { GovernedDocumentAcceptanceMode, GovernedDocumentClass, GovernedDocumentInteractionKind, GovernedDocumentIsoDateTimeSchema, GovernedDocumentRefSchema, GovernedDocumentReleaseApprovalState, GovernedDocumentReleaseIdentitySchema, GovernedDocumentPublicDocumentKind, governedDocumentReleaseIdentityKey, } from "./governed-documents.shared.schemas.js";
3
+ /**
4
+ * What it means for a person to have MET a governed document — the record whose absence was
5
+ * issue #54: *"nothing records which terms release a user accepted"*.
6
+ *
7
+ * ## Why this exists in `saas-models` and not beside the release composer
8
+ *
9
+ * `composeGovernedDocumentRelease` lives in `saas-specifications` because composing a release
10
+ * needs the candidate, the definition, the publication variants and the release policy — all
11
+ * app-creation artifacts. An INTERACTION needs none of them. It needs the release and nothing
12
+ * else, and its producer is the RUNTIME: measured 2026-09-12, neither `saas-backend-lib` nor
13
+ * `saas-frontend-lib` depends on `saas-specifications`, so a guard placed there could not be
14
+ * called from the only layer that will ever call it.
15
+ *
16
+ * ## It is a RECORD, not a receipt
17
+ *
18
+ * `GovernedDocumentInteractionReceipt` existed here until 2026-08-28 and was deleted with the
19
+ * rest of the sealed publication machine: it carried digests over canonical bytes, lived in a
20
+ * content-addressed store, and had never once run. Nothing of that returns. What binds this
21
+ * record to what the reader actually saw is the RELEASE IDENTITY — `documentRef` +
22
+ * `releaseId` + `releaseVersion` — which names a file in a commit, readable by anyone with the
23
+ * repository. That is the binding `.claude/rules/one-source-of-truth.md` Rule 0 admits, and it
24
+ * merges across branches, which a digest chain cannot.
25
+ *
26
+ * ## The subject is the AUDIT ACTOR, deliberately not a field here
27
+ *
28
+ * A record carrying its own `subjectRef` beside an audit envelope that already names the actor
29
+ * is two answers to one question, and they drift. The emitter binds this payload to the acting
30
+ * principal through the audit trail's own attribution, so *who* is answered once.
31
+ */
32
+ export var GovernedDocumentInteractionIssueKind;
33
+ (function (GovernedDocumentInteractionIssueKind) {
34
+ /**
35
+ * The release does not permit this interaction.
36
+ *
37
+ * Refuses, and this is the one place in this file that does. A privacy notice declares
38
+ * `NOTICE_DELIVERED` / `NOTICE_ACKNOWLEDGED`; recording a `CONTRACT_ACCEPTED` against it would
39
+ * assert that somebody entered a contract by reading a notice. The artifact would be FALSE, so
40
+ * the test in `.claude/rules/application-creation-directive.md` answers "fix the artifact" and
41
+ * a refusal is correct.
42
+ */
43
+ GovernedDocumentInteractionIssueKind["INTERACTION_KIND_NOT_PERMITTED"] = "INTERACTION_KIND_NOT_PERMITTED";
44
+ /**
45
+ * The release was not in force at the moment claimed.
46
+ *
47
+ * Also FALSE rather than unfinished: a record saying a person accepted a release before it took
48
+ * effect, or after it expired, describes an event that cannot have happened.
49
+ */
50
+ GovernedDocumentInteractionIssueKind["RELEASE_NOT_IN_FORCE"] = "RELEASE_NOT_IN_FORCE";
51
+ /**
52
+ * An acceptance mode was supplied for an interaction that nobody was ASKED to perform.
53
+ *
54
+ * FALSE rather than unfinished, which is why it refuses. {@link GovernedDocumentAcceptanceMode}
55
+ * names the notice an application gives before asking for assent — a sentence beside a button, an
56
+ * unticked box, or the document itself. Stamping one onto a `NOTICE_DELIVERED`, which the
57
+ * APPLICATION performs, or onto a `CONSENT_WITHDRAWN`, which nobody is invited to do, would claim
58
+ * a notice was given for an act that was never solicited.
59
+ *
60
+ * Which kinds admit a mode is settled once by {@link GOVERNED_DOCUMENT_INTERACTION_ADMITS_ACCEPTANCE_MODE}.
61
+ */
62
+ GovernedDocumentInteractionIssueKind["ACCEPTANCE_MODE_NOT_APPLICABLE"] = "ACCEPTANCE_MODE_NOT_APPLICABLE";
63
+ /** The composed record does not satisfy {@link GovernedDocumentInteractionSchema}. */
64
+ GovernedDocumentInteractionIssueKind["RECORD_INVALID"] = "RECORD_INVALID";
65
+ })(GovernedDocumentInteractionIssueKind || (GovernedDocumentInteractionIssueKind = {}));
66
+ /**
67
+ * TRUE statements about a coherent record whose surrounding WORKFLOW is unfinished.
68
+ *
69
+ * An advisory never stops the mechanism — see the issue/advisory split in
70
+ * `.claude/rules/application-creation-directive.md`. It travels with the record so the decision it
71
+ * bears on is taken where the consequence is, rather than by refusing here.
72
+ */
73
+ export var GovernedDocumentInteractionAdvisoryKind;
74
+ (function (GovernedDocumentInteractionAdvisoryKind) {
75
+ /**
76
+ * The release had not been approved when this interaction was recorded.
77
+ *
78
+ * The record is honest and the workflow is unfinished, so this MARKS rather than refuses — and
79
+ * the mark is carried on the record itself (`releaseApprovalState`) rather than only reported,
80
+ * because the question a reviewer will ask later is *was this approved AT THE TIME*, which
81
+ * nothing can reconstruct from a release that has since been approved.
82
+ *
83
+ * Where the refusal belongs instead is the READ that decides whether to show a person the
84
+ * document at all: `resolveEffectiveDocumentRelease(..., { requireApproved: true })`. That is a
85
+ * Gate 3 arming point per `one-source-of-truth.md` D5 — "an application may face a real user" —
86
+ * and it withholds an unapproved release from the surface, so no interaction with one is ever
87
+ * offered. Refusing HERE as well would only mean losing the evidence that it happened anyway.
88
+ */
89
+ GovernedDocumentInteractionAdvisoryKind["RELEASE_NOT_APPROVED"] = "RELEASE_NOT_APPROVED";
90
+ /**
91
+ * The act was solicited, and the record cannot say what notice preceded it.
92
+ *
93
+ * TRUE but unfinished: the interaction happened and every other field of the record stands. What
94
+ * is missing is the one thing that distinguishes a person who scrolled to the end of thirteen
95
+ * clauses from a person who pressed a button beside a sentence — so a reviewer reading this record
96
+ * learns only that a release id was accepted, which is the gap #1382 is about.
97
+ *
98
+ * It MARKS rather than refuses because the remedy is a surface declaring its mode, which is
99
+ * authoring work — `.claude/rules/application-creation-directive.md`: a required declaration whose
100
+ * absence stops the mechanism is the defect, not the guard. The social sign-up path (#1383) is the
101
+ * live instance, and this advisory is what makes its silence visible rather than indistinguishable
102
+ * from a form acceptance.
103
+ */
104
+ GovernedDocumentInteractionAdvisoryKind["ACCEPTANCE_MODE_NOT_RECORDED"] = "ACCEPTANCE_MODE_NOT_RECORDED";
105
+ })(GovernedDocumentInteractionAdvisoryKind || (GovernedDocumentInteractionAdvisoryKind = {}));
106
+ /**
107
+ * Which interactions an ACCEPTANCE MODE can describe — total over the vocabulary, so a kind added
108
+ * tomorrow is classified deliberately rather than inheriting whichever answer the code fell through
109
+ * to.
110
+ *
111
+ * The question each row answers is the same one: **was this person ASKED?**
112
+ * {@link GovernedDocumentAcceptanceMode} names the notice an application gives before soliciting
113
+ * assent, so it describes an act that was solicited and nothing else.
114
+ */
115
+ export const GOVERNED_DOCUMENT_INTERACTION_ADMITS_ACCEPTANCE_MODE = {
116
+ /** The APPLICATION acted. Nobody was asked anything, so no notice preceded it. */
117
+ [GovernedDocumentInteractionKind.NOTICE_DELIVERED]: false,
118
+ /** The person acted on an invitation to confirm they had seen it — the mode names that invitation. */
119
+ [GovernedDocumentInteractionKind.NOTICE_ACKNOWLEDGED]: true,
120
+ /** The canonical case: a registration surface asked for assent in one of the three shapes. */
121
+ [GovernedDocumentInteractionKind.CONTRACT_ACCEPTED]: true,
122
+ /** Assent to a purpose, solicited the same way and describable by the same vocabulary. */
123
+ [GovernedDocumentInteractionKind.CONSENT_GIVEN]: true,
124
+ /**
125
+ * A withdrawal is the person acting on their OWN initiative — nothing solicits it, and a mode
126
+ * claiming a notice preceded it would describe an invitation nobody extended. Withdrawal must be
127
+ * as easy as giving, which is a property of the surface that offers it rather than a notice given
128
+ * before it.
129
+ */
130
+ [GovernedDocumentInteractionKind.CONSENT_WITHDRAWN]: false,
131
+ };
132
+ /**
133
+ * One person, one governed-document release, one interaction, one instant.
134
+ *
135
+ * Every field but `interactionKind` and `occurredAt` is DERIVED from the release, for the same
136
+ * reason the release derives most of itself from the accepted definition: restating `locale`,
137
+ * `jurisdictionRefs` or `documentClass` here would create a second way to disagree with the
138
+ * release, and the disagreement would be invisible. They are copied onto the record rather than
139
+ * left to a join because a record must stay readable when the release file moves on — which is
140
+ * the whole point of binding an acceptance to a VERSION.
141
+ */
142
+ export const GovernedDocumentInteractionSchema = z.strictObject({
143
+ schemaVersion: z.literal(1),
144
+ interactionKind: z.enum(GovernedDocumentInteractionKind),
145
+ release: GovernedDocumentReleaseIdentitySchema,
146
+ documentClass: z.enum(GovernedDocumentClass),
147
+ locale: z.string().trim().min(2),
148
+ jurisdictionRefs: z.array(GovernedDocumentRefSchema),
149
+ /** The release's standing AT THE MOMENT OF THE INTERACTION. Not re-derivable later. */
150
+ releaseApprovalState: z.enum(GovernedDocumentReleaseApprovalState),
151
+ /**
152
+ * HOW the act was obtained — the notice the person was given before performing it.
153
+ *
154
+ * Without it the strongest statement an operator can make about a recorded acceptance is *"a
155
+ * release id was accepted"*, which is the same sentence for somebody who read the document to its
156
+ * end and somebody who pressed a button beside a link. Enforceability turns on exactly this
157
+ * distinction, so a consent record that cannot make it is evidence of the act and not of the
158
+ * assent (#1382).
159
+ *
160
+ * OPTIONAL, and its absence is a fact rather than a default: it means the surface that obtained
161
+ * the act did not say how it asked. `advisoryKinds` carries
162
+ * {@link GovernedDocumentInteractionAdvisoryKind.ACCEPTANCE_MODE_NOT_RECORDED} on exactly those
163
+ * records, so a silent surface reads as silent rather than as the weakest mode — which it would
164
+ * if a default were stamped here.
165
+ *
166
+ * Absent BY RULE, with no advisory, on the kinds
167
+ * {@link GOVERNED_DOCUMENT_INTERACTION_ADMITS_ACCEPTANCE_MODE} marks `false`.
168
+ */
169
+ acceptanceMode: z.enum(GovernedDocumentAcceptanceMode).optional(),
170
+ occurredAt: GovernedDocumentIsoDateTimeSchema,
171
+ });
172
+ /**
173
+ * The slice of a release that a CONSENT SURFACE and an INTERACTION RECORD both need — and it is
174
+ * browser-safe, which turned out to be a property rather than a compromise.
175
+ *
176
+ * {@link composeGovernedDocumentInteraction} reads `allowedInteractionKinds`, the effective
177
+ * interval, `approvalState`, `identity`, `documentClass`, `locale` and `jurisdictionRefs`. It never
178
+ * reads `governanceScope` or `approvalDecisions` — the two fields
179
+ * {@link projectGovernedDocumentPublicRelease} already withholds from public consumers as internal
180
+ * custody detail. So the fields the mechanism needs and the fields a browser may hold are the SAME
181
+ * SET, and one shape can travel the whole chain: the application authors it on
182
+ * `compliance.governedDocumentReleases`, the backend composes records from it, and the frontend
183
+ * decides from it whether to render a consent control at all.
184
+ *
185
+ * Distinct from `GovernedDocumentPublicReleaseProjection`, which is narrower still and answers a
186
+ * different question — how to ROUTE and DISPLAY a published document. It carries neither
187
+ * `allowedInteractionKinds` nor `approvalState`, so a consent surface cannot be built from it.
188
+ */
189
+ export const GovernedDocumentInteractionSurfaceSchema = z.strictObject({
190
+ schemaVersion: z.literal(1),
191
+ identity: GovernedDocumentReleaseIdentitySchema,
192
+ documentClass: z.enum(GovernedDocumentClass),
193
+ locale: z.string().trim().min(2),
194
+ jurisdictionRefs: z.array(GovernedDocumentRefSchema),
195
+ /** What a person may DO with this document. An empty array means "read only"; nothing may be recorded. */
196
+ allowedInteractionKinds: z.array(z.enum(GovernedDocumentInteractionKind)),
197
+ approvalState: z.enum(GovernedDocumentReleaseApprovalState),
198
+ effectiveAt: GovernedDocumentIsoDateTimeSchema,
199
+ expiresAt: GovernedDocumentIsoDateTimeSchema.optional(),
200
+ /**
201
+ * The interactions this release says a person must perform AGAIN, because it replaced an earlier
202
+ * release with a change that mattered (#1258, Step 2 / R7).
203
+ *
204
+ * Projected from `materialityDecision.requiredInteractionKinds` — the governance answer a
205
+ * superseding release already owes ("did the change matter enough that the audience must meet the
206
+ * document again?"). Only the KINDS travel: the decision identity is private custody detail and this
207
+ * shape reaches an unauthenticated browser. Empty for a first release and for a replacement judged
208
+ * immaterial — a typo fix does not re-ask anybody.
209
+ *
210
+ * `.default([])` so a surface generated before this field existed still parses, and means exactly
211
+ * what its absence meant then: nothing is renewed.
212
+ */
213
+ renewedInteractionKinds: z.array(z.enum(GovernedDocumentInteractionKind)).default([]),
214
+ });
215
+ /** Explicit allow-list projection from a composed release to what a consent surface may hold. */
216
+ export const projectGovernedDocumentInteractionSurface = (release) => GovernedDocumentInteractionSurfaceSchema.parse({
217
+ schemaVersion: 1,
218
+ identity: release.identity,
219
+ documentClass: release.documentClass,
220
+ locale: release.locale,
221
+ jurisdictionRefs: release.jurisdictionRefs,
222
+ allowedInteractionKinds: release.allowedInteractionKinds,
223
+ approvalState: release.approvalState,
224
+ effectiveAt: release.effectiveAt,
225
+ ...(release.expiresAt ? { expiresAt: release.expiresAt } : {}),
226
+ renewedInteractionKinds: release.materialityDecision?.requiredInteractionKinds ?? [],
227
+ });
228
+ /**
229
+ * Is this release in force at that instant?
230
+ *
231
+ * ONE implementation, used by {@link composeGovernedDocumentInteraction} here and by
232
+ * `resolveEffectiveDocumentRelease` in `saas-specifications` — which depends on this package, so
233
+ * the read side and the record side cannot disagree about what "in force" means. They did, briefly:
234
+ * writing the record's guard reproduced the interval comparison, and two copies of a half-open
235
+ * interval is exactly the shape where one of them ends up with `<=`.
236
+ *
237
+ * HALF-OPEN — `[effectiveAt, expiresAt)`. A release takes effect at the instant it names, and the
238
+ * one that replaces it takes effect at the instant the old one expires, so the boundary belongs to
239
+ * exactly one of them. An unparsable instant is NOT in force: it is not a time.
240
+ */
241
+ export function governedDocumentReleaseIsInForce(release, at) {
242
+ const instant = Date.parse(at);
243
+ if (Number.isNaN(instant))
244
+ return false;
245
+ if (instant < Date.parse(release.effectiveAt))
246
+ return false;
247
+ return release.expiresAt === undefined || instant < Date.parse(release.expiresAt);
248
+ }
249
+ /**
250
+ * Whether an application shows, and asks people to accept, governed documents nobody has approved.
251
+ *
252
+ * ONE switch for every surface that puts a governed document in front of a person: the public page
253
+ * (`/privacy`, `/terms`), the registration acceptance control, the first-session acceptance gate, the
254
+ * consent panel's privacy-notice link, the backend's owed-acceptance derivation and the notice-delivery
255
+ * record. It is read from the application's configuration (`compliance.governedDocumentApprovalGate`)
256
+ * through {@link requiresApprovedGovernedDocuments}, never passed per call site, so the page and the
257
+ * acceptance surfaces cannot be armed separately (#1565). Armed on the page alone, `/terms` would answer
258
+ * "unavailable" while sign-up asked people to accept those same terms.
259
+ *
260
+ * What it does NOT govern is the RECORD of an act that happened: `recordGovernedDocumentAcceptances`
261
+ * records what a person submitted, and marks an unapproved release with `RELEASE_NOT_APPROVED` rather
262
+ * than dropping it, because refusing there would only lose the evidence.
263
+ *
264
+ * This is the gate point `.claude/rules/one-source-of-truth.md` D5 keeps MARKED: arming it is part of
265
+ * Gate 3's membership test ("an application may face a real user").
266
+ */
267
+ export var GovernedDocumentApprovalGate;
268
+ (function (GovernedDocumentApprovalGate) {
269
+ /**
270
+ * The framework default, and the posture while an application is being built: every release in
271
+ * force is shown and asked for, whatever its approval state. An unapproved release still says so
272
+ * (`approvalState` travels with it, and a record of an interaction with it carries
273
+ * `RELEASE_NOT_APPROVED`), so nothing unapproved is ever presented as approved — it is only not
274
+ * withheld.
275
+ */
276
+ GovernedDocumentApprovalGate["UNARMED"] = "unarmed";
277
+ /**
278
+ * Nothing unapproved reaches a person. An unapproved release is neither shown nor asked for, and no
279
+ * draft stands in for a document that has no approved release. Arm it when the application faces
280
+ * real users.
281
+ *
282
+ * With no approved release of a contractual document, sign-up asks for nothing. Whether an
283
+ * application should be allowed to go live in that state is part of Gate 3's arming decision, not of
284
+ * this switch.
285
+ */
286
+ GovernedDocumentApprovalGate["ARMED"] = "armed";
287
+ })(GovernedDocumentApprovalGate || (GovernedDocumentApprovalGate = {}));
288
+ /**
289
+ * Whether the application's configuration withholds unapproved governed documents — the ONE reading of
290
+ * {@link GovernedDocumentApprovalGate} every serving and asking surface goes through.
291
+ *
292
+ * Takes the configuration's `compliance` section (or nothing) rather than a boolean, so a call site
293
+ * cannot supply its own answer. An absent section, or an absent member, is the schema default: unarmed.
294
+ *
295
+ * assurance-control: WILDO.PRIVACY.CONSENT_RECORD — once armed, no person is shown or asked to accept a
296
+ * governed document that has not been approved, on any surface.
297
+ */
298
+ export function requiresApprovedGovernedDocuments(compliance) {
299
+ return compliance?.governedDocumentApprovalGate === GovernedDocumentApprovalGate.ARMED;
300
+ }
301
+ /**
302
+ * Every release in force at that instant — what a registration surface asks when it needs to know
303
+ * which documents a person is meeting right now.
304
+ *
305
+ * Deliberately NOT the same question as `resolveEffectiveDocumentRelease`, which picks the ONE
306
+ * winning release for a given document, locale and jurisdiction set. This one spans documents and
307
+ * is total over what the application declared, so a document added to the config tomorrow is
308
+ * delivered without anyone editing a list.
309
+ *
310
+ * `requireApproved` drops releases nobody has approved. A surface that SHOWS or ASKS for a document
311
+ * passes {@link requiresApprovedGovernedDocuments}; a recorder of an act that already happened passes
312
+ * nothing.
313
+ */
314
+ export function selectGovernedDocumentReleasesInForce(releases, at, options) {
315
+ const requireApproved = options?.requireApproved ?? false;
316
+ return releases.filter((release) => governedDocumentReleaseIsInForce(release, at)
317
+ && (!requireApproved || release.approvalState === GovernedDocumentReleaseApprovalState.APPROVED));
318
+ }
319
+ /** Why an acceptance is owed. Two different messages to the person, so two members. */
320
+ export var GovernedDocumentAcceptanceOwedReason;
321
+ (function (GovernedDocumentAcceptanceOwedReason) {
322
+ /** They have never accepted any release of this document — a stale sign-up form, or an older account. */
323
+ GovernedDocumentAcceptanceOwedReason["NEVER_ACCEPTED"] = "NEVER_ACCEPTED";
324
+ /** A release replaced the one they accepted with a change judged to require acceptance again. */
325
+ GovernedDocumentAcceptanceOwedReason["MATERIALLY_CHANGED"] = "MATERIALLY_CHANGED";
326
+ })(GovernedDocumentAcceptanceOwedReason || (GovernedDocumentAcceptanceOwedReason = {}));
327
+ /**
328
+ * Which documents a person owes an acceptance of, at an instant (#1258, Step 2 / R7).
329
+ *
330
+ * TOTAL over what the application declared: every in-force release that permits `CONTRACT_ACCEPTED`
331
+ * is considered, so a document added to the configuration tomorrow is owed by everyone the next time
332
+ * they arrive, with no list to maintain (`.claude/rules/derive-before-you-ask.md` rule 3).
333
+ *
334
+ * ## What counts as having accepted it
335
+ *
336
+ * Any release of the DOCUMENT — the join is `documentRef`, never `releaseId`. A release is one locale
337
+ * and jurisdiction pair, so keying on it would re-ask everyone who changed language: accepting the
338
+ * French terms is accepting the terms.
339
+ *
340
+ * ## When an earlier acceptance stops counting
341
+ *
342
+ * Only when a release of the document says so — its `renewedInteractionKinds` includes
343
+ * `CONTRACT_ACCEPTED`, projected from the materiality decision that replacement owed. Then an acceptance
344
+ * counts only if it happened at or after that release took effect. Compared on TIME, not on
345
+ * `releaseVersion`, because a version is counted per variant and comparing one variant's number with
346
+ * another's means nothing.
347
+ *
348
+ * ## The material change need not still be IN FORCE — it is transitive across replacements
349
+ *
350
+ * A replacement takes effect at the instant its predecessor expires, so only the NEWEST release is ever in
351
+ * force. Reading materiality from the in-force releases alone would therefore forget it: accept v1 in
352
+ * January, v2 changes the terms materially in March, v3 fixes a typo in June — and in July only v3 is in
353
+ * force, its renewal set is empty, and a person who never accepted v2's change is told they owe nothing.
354
+ * So the latest material change is taken over EVERY declared release of the document that took effect at or
355
+ * before `at`, expired or not. A release that takes effect AFTER `at` has not happened yet and never counts.
356
+ *
357
+ * What the application must keep for this to hold: the superseded releases stay declared. They do — the
358
+ * releases are recorded as data and only ever appended to.
359
+ *
360
+ * ## With the approval gate armed
361
+ *
362
+ * `requireApproved` ({@link requiresApprovedGovernedDocuments}) owes only APPROVED releases: a person is
363
+ * never asked to accept what the public page would refuse to show. A material change still counts from
364
+ * every declared release, approved or not, because the approved release that follows carries it.
365
+ *
366
+ * A pure function of its inputs: it reads nothing and writes nothing.
367
+ */
368
+ export function governedDocumentAcceptancesOwed(input) {
369
+ const acceptable = selectGovernedDocumentReleasesInForce(input.releases, input.at, { requireApproved: input.requireApproved })
370
+ .filter((release) => release.allowedInteractionKinds.includes(GovernedDocumentInteractionKind.CONTRACT_ACCEPTED));
371
+ const byDocument = new Map();
372
+ for (const release of acceptable) {
373
+ const documentRef = release.identity.document.documentRef;
374
+ byDocument.set(documentRef, [...(byDocument.get(documentRef) ?? []), release]);
375
+ }
376
+ const atMs = Date.parse(input.at);
377
+ const owed = [];
378
+ for (const [documentRef, releases] of byDocument) {
379
+ const acceptedAtMs = input.accepted
380
+ .filter((record) => record.documentRef === documentRef)
381
+ .map((record) => new Date(record.acceptedAt).getTime())
382
+ .filter((ms) => !Number.isNaN(ms));
383
+ if (acceptedAtMs.length === 0) {
384
+ owed.push({ documentRef, reason: GovernedDocumentAcceptanceOwedReason.NEVER_ACCEPTED, releases });
385
+ continue;
386
+ }
387
+ const latestAcceptance = Math.max(...acceptedAtMs);
388
+ const latestMaterialChange = Math.max(...input.releases
389
+ .filter((release) => release.identity.document.documentRef === documentRef
390
+ && release.allowedInteractionKinds.includes(GovernedDocumentInteractionKind.CONTRACT_ACCEPTED)
391
+ && release.renewedInteractionKinds.includes(GovernedDocumentInteractionKind.CONTRACT_ACCEPTED)
392
+ && Date.parse(release.effectiveAt) <= atMs)
393
+ .map((release) => Date.parse(release.effectiveAt)), Number.NEGATIVE_INFINITY);
394
+ if (latestMaterialChange > latestAcceptance) {
395
+ owed.push({ documentRef, reason: GovernedDocumentAcceptanceOwedReason.MATERIALLY_CHANGED, releases });
396
+ }
397
+ }
398
+ return owed;
399
+ }
400
+ /**
401
+ * Compose the record of one interaction, refusing what would be false and marking what is merely
402
+ * unfinished.
403
+ *
404
+ * Pure: it reads the release and the two decided values, and writes nothing. The caller decides
405
+ * where the record goes — today, an auditable event.
406
+ */
407
+ export function composeGovernedDocumentInteraction(composition) {
408
+ const { release, interactionKind, acceptanceMode, occurredAt } = composition;
409
+ const issues = [];
410
+ const advisories = [];
411
+ const releaseKey = governedDocumentReleaseIdentityKey(release.identity);
412
+ if (!release.allowedInteractionKinds.includes(interactionKind)) {
413
+ issues.push({
414
+ kind: GovernedDocumentInteractionIssueKind.INTERACTION_KIND_NOT_PERMITTED,
415
+ message: `${releaseKey} permits ${release.allowedInteractionKinds.join(", ") || "no interaction"}, so ${interactionKind} `
416
+ + "cannot be recorded against it.",
417
+ });
418
+ }
419
+ if (!governedDocumentReleaseIsInForce(release, occurredAt)) {
420
+ issues.push({
421
+ kind: GovernedDocumentInteractionIssueKind.RELEASE_NOT_IN_FORCE,
422
+ message: `${releaseKey} is in force from ${release.effectiveAt}${release.expiresAt ? ` until ${release.expiresAt}` : ""}, `
423
+ + `so nobody can have interacted with it at ${occurredAt}.`,
424
+ });
425
+ }
426
+ const admitsAcceptanceMode = GOVERNED_DOCUMENT_INTERACTION_ADMITS_ACCEPTANCE_MODE[interactionKind];
427
+ if (acceptanceMode !== undefined && !admitsAcceptanceMode) {
428
+ issues.push({
429
+ kind: GovernedDocumentInteractionIssueKind.ACCEPTANCE_MODE_NOT_APPLICABLE,
430
+ message: `Nobody is asked to perform a ${interactionKind}, so recording it as obtained by ${acceptanceMode} would `
431
+ + `claim a notice was given for an act that was never solicited (${releaseKey}).`,
432
+ });
433
+ }
434
+ if (acceptanceMode === undefined && admitsAcceptanceMode) {
435
+ advisories.push({
436
+ kind: GovernedDocumentInteractionAdvisoryKind.ACCEPTANCE_MODE_NOT_RECORDED,
437
+ message: `The surface that obtained this ${interactionKind} with ${releaseKey} did not say how it asked, so the record `
438
+ + "cannot distinguish a document read to its end from a sentence beside a button.",
439
+ });
440
+ }
441
+ if (release.approvalState === GovernedDocumentReleaseApprovalState.UNAPPROVED) {
442
+ advisories.push({
443
+ kind: GovernedDocumentInteractionAdvisoryKind.RELEASE_NOT_APPROVED,
444
+ message: `${releaseKey} had not been approved when this ${interactionKind} was recorded. The record stands and says so; `
445
+ + "withholding an unapproved release from a real reader is the read-side gate (`requireApproved`), armed at Gate 3.",
446
+ });
447
+ }
448
+ if (issues.length > 0)
449
+ return { interaction: undefined, issues, advisories };
450
+ const parsed = GovernedDocumentInteractionSchema.safeParse({
451
+ schemaVersion: 1,
452
+ interactionKind,
453
+ release: release.identity,
454
+ documentClass: release.documentClass,
455
+ locale: release.locale,
456
+ jurisdictionRefs: release.jurisdictionRefs,
457
+ releaseApprovalState: release.approvalState,
458
+ ...(acceptanceMode !== undefined ? { acceptanceMode } : {}),
459
+ occurredAt,
460
+ });
461
+ if (!parsed.success) {
462
+ return {
463
+ interaction: undefined,
464
+ issues: [
465
+ {
466
+ kind: GovernedDocumentInteractionIssueKind.RECORD_INVALID,
467
+ message: `The composed interaction with ${releaseKey} is not a valid record: ${parsed.error.issues.map((issue) => issue.message).join("; ")}`,
468
+ },
469
+ ],
470
+ advisories,
471
+ };
472
+ }
473
+ return { interaction: parsed.data, issues: [], advisories };
474
+ }
475
+ /**
476
+ * The ONE public document to render for a governed-document ref at an instant, or `undefined`.
477
+ *
478
+ * Total over what the application declared, so a document added to the configuration tomorrow is
479
+ * served without anyone editing a list — the same shape as
480
+ * {@link selectGovernedDocumentReleasesInForce}, and for the same reason.
481
+ *
482
+ * `requireApproved` **IS THE GATE POINT**.
483
+ *
484
+ * It defaults to `false` — deliberately, and this is the posture recorded in
485
+ * `.claude/rules/one-source-of-truth.md` D5: critical gate points stay MARKED in every mechanism so
486
+ * they can be switched on when the posture changes, and under the current YOLO posture they notify
487
+ * and proceed. Arming it is part of **Gate 3**'s membership test ("an application may face a real
488
+ * user") — the posture ends where a real user begins, by definition rather than by anyone
489
+ * remembering. A caller serving a page to the public passes `true`; a caller previewing what the
490
+ * lane drafted passes nothing.
491
+ *
492
+ * When several releases of one document are in force the LATEST EFFECTIVE wins, and ties break on
493
+ * the higher `releaseVersion`. Two in force at once is an authoring mistake rather than a state to
494
+ * refuse on a read path: refusing would take the page down over an overlap a reader cannot see,
495
+ * which is worse than showing the newer of two documents the publisher approved.
496
+ *
497
+ * ## The draft fallback, and its two limits (#968 decision 5)
498
+ *
499
+ * A document the application has drafted and never released is served as its UNRELEASED DRAFT, so
500
+ * neither a missing approval nor a missing release ever leaves a page with nothing — the page marks it
501
+ * as a draft. The fallback applies only when the application holds NO release of that document:
502
+ *
503
+ * - a release that exists but is not in force (scheduled, or expired) is a date, not an absence, and
504
+ * showing the draft in its place would present text the application already decided to replace;
505
+ * - with the gate ARMED there is no fallback at all — "serve nothing unapproved to a real reader" has
506
+ * no answer less approved than a draft.
507
+ */
508
+ export function resolveInForcePublicDocument(documents, documentRef, at, options) {
509
+ const requireApproved = options?.requireApproved ?? false;
510
+ const released = documents.filter((document) => document.kind === GovernedDocumentPublicDocumentKind.RELEASED && document.release.identity.document.documentRef === documentRef);
511
+ const candidates = released.filter((document) => governedDocumentReleaseIsInForce(document.release, at)
512
+ && (!requireApproved || document.approvalState === GovernedDocumentReleaseApprovalState.APPROVED));
513
+ if (candidates.length === 0) {
514
+ if (released.length > 0 || requireApproved)
515
+ return undefined;
516
+ return documents.find((document) => document.kind === GovernedDocumentPublicDocumentKind.UNRELEASED_DRAFT && document.documentRef === documentRef);
517
+ }
518
+ return candidates.reduce((winner, candidate) => {
519
+ const winnerEffective = Date.parse(winner.release.effectiveAt);
520
+ const candidateEffective = Date.parse(candidate.release.effectiveAt);
521
+ if (candidateEffective !== winnerEffective)
522
+ return candidateEffective > winnerEffective ? candidate : winner;
523
+ return candidate.release.identity.releaseVersion > winner.release.identity.releaseVersion ? candidate : winner;
524
+ });
525
+ }
526
+ //# sourceMappingURL=governed-document-interactions.shared.schemas.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"governed-document-interactions.shared.schemas.js","sourceRoot":"","sources":["../../../../../src/compliance/documents/governed-document-interactions.shared.schemas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EACL,8BAA8B,EAC9B,qBAAqB,EACrB,+BAA+B,EAC/B,iCAAiC,EACjC,yBAAyB,EACzB,oCAAoC,EACpC,qCAAqC,EACrC,kCAAkC,EAClC,kCAAkC,GAInC,MAAM,qCAAqC,CAAC;AAE7C;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AACH,MAAM,CAAN,IAAY,oCAgCX;AAhCD,WAAY,oCAAoC;IAC9C;;;;;;;;OAQG;IACH,yGAAiE,CAAA;IACjE;;;;;OAKG;IACH,qFAA6C,CAAA;IAC7C;;;;;;;;;;OAUG;IACH,yGAAiE,CAAA;IACjE,sFAAsF;IACtF,yEAAiC,CAAA;AACnC,CAAC,EAhCW,oCAAoC,KAApC,oCAAoC,QAgC/C;AAOD;;;;;;GAMG;AACH,MAAM,CAAN,IAAY,uCA+BX;AA/BD,WAAY,uCAAuC;IACjD;;;;;;;;;;;;;OAaG;IACH,wFAA6C,CAAA;IAC7C;;;;;;;;;;;;;OAaG;IACH,wGAA6D,CAAA;AAC/D,CAAC,EA/BW,uCAAuC,KAAvC,uCAAuC,QA+BlD;AAOD;;;;;;;;GAQG;AACH,MAAM,CAAC,MAAM,oDAAoD,GAA+D;IAC9H,kFAAkF;IAClF,CAAC,+BAA+B,CAAC,gBAAgB,CAAC,EAAE,KAAK;IACzD,sGAAsG;IACtG,CAAC,+BAA+B,CAAC,mBAAmB,CAAC,EAAE,IAAI;IAC3D,8FAA8F;IAC9F,CAAC,+BAA+B,CAAC,iBAAiB,CAAC,EAAE,IAAI;IACz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AC,OAAO,CAAC,QAAQ,CAAC,cAAc,GAAG,MAAM,CAAC,OAAO,CAAC,QAAQ,CAAC,cAAc,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,MAAM,CAAC;IACjH,CAAC,CAAC,CAAC;AACL,CAAC","sourcesContent":["import { z } from \"zod\";\n\nimport {\n GovernedDocumentAcceptanceMode,\n GovernedDocumentClass,\n GovernedDocumentInteractionKind,\n GovernedDocumentIsoDateTimeSchema,\n GovernedDocumentRefSchema,\n GovernedDocumentReleaseApprovalState,\n GovernedDocumentReleaseIdentitySchema,\n GovernedDocumentPublicDocumentKind,\n governedDocumentReleaseIdentityKey,\n type GovernedDocumentPublicDocument,\n type GovernedDocumentReleasedPublicDocument,\n type GovernedDocumentRelease,\n} from \"./governed-documents.shared.schemas\";\n\n/**\n * What it means for a person to have MET a governed document — the record whose absence was\n * issue #54: *\"nothing records which terms release a user accepted\"*.\n *\n * ## Why this exists in `saas-models` and not beside the release composer\n *\n * `composeGovernedDocumentRelease` lives in `saas-specifications` because composing a release\n * needs the candidate, the definition, the publication variants and the release policy — all\n * app-creation artifacts. An INTERACTION needs none of them. It needs the release and nothing\n * else, and its producer is the RUNTIME: measured 2026-09-12, neither `saas-backend-lib` nor\n * `saas-frontend-lib` depends on `saas-specifications`, so a guard placed there could not be\n * called from the only layer that will ever call it.\n *\n * ## It is a RECORD, not a receipt\n *\n * `GovernedDocumentInteractionReceipt` existed here until 2026-08-28 and was deleted with the\n * rest of the sealed publication machine: it carried digests over canonical bytes, lived in a\n * content-addressed store, and had never once run. Nothing of that returns. What binds this\n * record to what the reader actually saw is the RELEASE IDENTITY — `documentRef` +\n * `releaseId` + `releaseVersion` — which names a file in a commit, readable by anyone with the\n * repository. That is the binding `.claude/rules/one-source-of-truth.md` Rule 0 admits, and it\n * merges across branches, which a digest chain cannot.\n *\n * ## The subject is the AUDIT ACTOR, deliberately not a field here\n *\n * A record carrying its own `subjectRef` beside an audit envelope that already names the actor\n * is two answers to one question, and they drift. The emitter binds this payload to the acting\n * principal through the audit trail's own attribution, so *who* is answered once.\n */\nexport enum GovernedDocumentInteractionIssueKind {\n /**\n * The release does not permit this interaction.\n *\n * Refuses, and this is the one place in this file that does. A privacy notice declares\n * `NOTICE_DELIVERED` / `NOTICE_ACKNOWLEDGED`; recording a `CONTRACT_ACCEPTED` against it would\n * assert that somebody entered a contract by reading a notice. The artifact would be FALSE, so\n * the test in `.claude/rules/application-creation-directive.md` answers \"fix the artifact\" and\n * a refusal is correct.\n */\n INTERACTION_KIND_NOT_PERMITTED = \"INTERACTION_KIND_NOT_PERMITTED\",\n /**\n * The release was not in force at the moment claimed.\n *\n * Also FALSE rather than unfinished: a record saying a person accepted a release before it took\n * effect, or after it expired, describes an event that cannot have happened.\n */\n RELEASE_NOT_IN_FORCE = \"RELEASE_NOT_IN_FORCE\",\n /**\n * An acceptance mode was supplied for an interaction that nobody was ASKED to perform.\n *\n * FALSE rather than unfinished, which is why it refuses. {@link GovernedDocumentAcceptanceMode}\n * names the notice an application gives before asking for assent — a sentence beside a button, an\n * unticked box, or the document itself. Stamping one onto a `NOTICE_DELIVERED`, which the\n * APPLICATION performs, or onto a `CONSENT_WITHDRAWN`, which nobody is invited to do, would claim\n * a notice was given for an act that was never solicited.\n *\n * Which kinds admit a mode is settled once by {@link GOVERNED_DOCUMENT_INTERACTION_ADMITS_ACCEPTANCE_MODE}.\n */\n ACCEPTANCE_MODE_NOT_APPLICABLE = \"ACCEPTANCE_MODE_NOT_APPLICABLE\",\n /** The composed record does not satisfy {@link GovernedDocumentInteractionSchema}. */\n RECORD_INVALID = \"RECORD_INVALID\",\n}\n\nexport interface GovernedDocumentInteractionIssue {\n readonly kind: GovernedDocumentInteractionIssueKind;\n readonly message: string;\n}\n\n/**\n * TRUE statements about a coherent record whose surrounding WORKFLOW is unfinished.\n *\n * An advisory never stops the mechanism — see the issue/advisory split in\n * `.claude/rules/application-creation-directive.md`. It travels with the record so the decision it\n * bears on is taken where the consequence is, rather than by refusing here.\n */\nexport enum GovernedDocumentInteractionAdvisoryKind {\n /**\n * The release had not been approved when this interaction was recorded.\n *\n * The record is honest and the workflow is unfinished, so this MARKS rather than refuses — and\n * the mark is carried on the record itself (`releaseApprovalState`) rather than only reported,\n * because the question a reviewer will ask later is *was this approved AT THE TIME*, which\n * nothing can reconstruct from a release that has since been approved.\n *\n * Where the refusal belongs instead is the READ that decides whether to show a person the\n * document at all: `resolveEffectiveDocumentRelease(..., { requireApproved: true })`. That is a\n * Gate 3 arming point per `one-source-of-truth.md` D5 — \"an application may face a real user\" —\n * and it withholds an unapproved release from the surface, so no interaction with one is ever\n * offered. Refusing HERE as well would only mean losing the evidence that it happened anyway.\n */\n RELEASE_NOT_APPROVED = \"RELEASE_NOT_APPROVED\",\n /**\n * The act was solicited, and the record cannot say what notice preceded it.\n *\n * TRUE but unfinished: the interaction happened and every other field of the record stands. What\n * is missing is the one thing that distinguishes a person who scrolled to the end of thirteen\n * clauses from a person who pressed a button beside a sentence — so a reviewer reading this record\n * learns only that a release id was accepted, which is the gap #1382 is about.\n *\n * It MARKS rather than refuses because the remedy is a surface declaring its mode, which is\n * authoring work — `.claude/rules/application-creation-directive.md`: a required declaration whose\n * absence stops the mechanism is the defect, not the guard. The social sign-up path (#1383) is the\n * live instance, and this advisory is what makes its silence visible rather than indistinguishable\n * from a form acceptance.\n */\n ACCEPTANCE_MODE_NOT_RECORDED = \"ACCEPTANCE_MODE_NOT_RECORDED\",\n}\n\nexport interface GovernedDocumentInteractionAdvisory {\n readonly kind: GovernedDocumentInteractionAdvisoryKind;\n readonly message: string;\n}\n\n/**\n * Which interactions an ACCEPTANCE MODE can describe — total over the vocabulary, so a kind added\n * tomorrow is classified deliberately rather than inheriting whichever answer the code fell through\n * to.\n *\n * The question each row answers is the same one: **was this person ASKED?**\n * {@link GovernedDocumentAcceptanceMode} names the notice an application gives before soliciting\n * assent, so it describes an act that was solicited and nothing else.\n */\nexport const GOVERNED_DOCUMENT_INTERACTION_ADMITS_ACCEPTANCE_MODE: Readonly<Record<GovernedDocumentInteractionKind, boolean>> = {\n /** The APPLICATION acted. Nobody was asked anything, so no notice preceded it. */\n [GovernedDocumentInteractionKind.NOTICE_DELIVERED]: false,\n /** The person acted on an invitation to confirm they had seen it — the mode names that invitation. */\n [GovernedDocumentInteractionKind.NOTICE_ACKNOWLEDGED]: true,\n /** The canonical case: a registration surface asked for assent in one of the three shapes. */\n [GovernedDocumentInteractionKind.CONTRACT_ACCEPTED]: true,\n /** Assent to a purpose, solicited the same way and describable by the same vocabulary. */\n [GovernedDocumentInteractionKind.CONSENT_GIVEN]: true,\n /**\n * A withdrawal is the person acting on their OWN initiative — nothing solicits it, and a mode\n * claiming a notice preceded it would describe an invitation nobody extended. Withdrawal must be\n * as easy as giving, which is a property of the surface that offers it rather than a notice given\n * before it.\n */\n [GovernedDocumentInteractionKind.CONSENT_WITHDRAWN]: false,\n};\n\n/**\n * One person, one governed-document release, one interaction, one instant.\n *\n * Every field but `interactionKind` and `occurredAt` is DERIVED from the release, for the same\n * reason the release derives most of itself from the accepted definition: restating `locale`,\n * `jurisdictionRefs` or `documentClass` here would create a second way to disagree with the\n * release, and the disagreement would be invisible. They are copied onto the record rather than\n * left to a join because a record must stay readable when the release file moves on — which is\n * the whole point of binding an acceptance to a VERSION.\n */\nexport const GovernedDocumentInteractionSchema = z.strictObject({\n schemaVersion: z.literal(1),\n interactionKind: z.enum(GovernedDocumentInteractionKind),\n release: GovernedDocumentReleaseIdentitySchema,\n documentClass: z.enum(GovernedDocumentClass),\n locale: z.string().trim().min(2),\n jurisdictionRefs: z.array(GovernedDocumentRefSchema),\n /** The release's standing AT THE MOMENT OF THE INTERACTION. Not re-derivable later. */\n releaseApprovalState: z.enum(GovernedDocumentReleaseApprovalState),\n /**\n * HOW the act was obtained — the notice the person was given before performing it.\n *\n * Without it the strongest statement an operator can make about a recorded acceptance is *\"a\n * release id was accepted\"*, which is the same sentence for somebody who read the document to its\n * end and somebody who pressed a button beside a link. Enforceability turns on exactly this\n * distinction, so a consent record that cannot make it is evidence of the act and not of the\n * assent (#1382).\n *\n * OPTIONAL, and its absence is a fact rather than a default: it means the surface that obtained\n * the act did not say how it asked. `advisoryKinds` carries\n * {@link GovernedDocumentInteractionAdvisoryKind.ACCEPTANCE_MODE_NOT_RECORDED} on exactly those\n * records, so a silent surface reads as silent rather than as the weakest mode — which it would\n * if a default were stamped here.\n *\n * Absent BY RULE, with no advisory, on the kinds\n * {@link GOVERNED_DOCUMENT_INTERACTION_ADMITS_ACCEPTANCE_MODE} marks `false`.\n */\n acceptanceMode: z.enum(GovernedDocumentAcceptanceMode).optional(),\n occurredAt: GovernedDocumentIsoDateTimeSchema,\n});\nexport type GovernedDocumentInteraction = z.infer<typeof GovernedDocumentInteractionSchema>;\n\n\n/**\n * The slice of a release that a CONSENT SURFACE and an INTERACTION RECORD both need — and it is\n * browser-safe, which turned out to be a property rather than a compromise.\n *\n * {@link composeGovernedDocumentInteraction} reads `allowedInteractionKinds`, the effective\n * interval, `approvalState`, `identity`, `documentClass`, `locale` and `jurisdictionRefs`. It never\n * reads `governanceScope` or `approvalDecisions` — the two fields\n * {@link projectGovernedDocumentPublicRelease} already withholds from public consumers as internal\n * custody detail. So the fields the mechanism needs and the fields a browser may hold are the SAME\n * SET, and one shape can travel the whole chain: the application authors it on\n * `compliance.governedDocumentReleases`, the backend composes records from it, and the frontend\n * decides from it whether to render a consent control at all.\n *\n * Distinct from `GovernedDocumentPublicReleaseProjection`, which is narrower still and answers a\n * different question — how to ROUTE and DISPLAY a published document. It carries neither\n * `allowedInteractionKinds` nor `approvalState`, so a consent surface cannot be built from it.\n */\nexport const GovernedDocumentInteractionSurfaceSchema = z.strictObject({\n schemaVersion: z.literal(1),\n identity: GovernedDocumentReleaseIdentitySchema,\n documentClass: z.enum(GovernedDocumentClass),\n locale: z.string().trim().min(2),\n jurisdictionRefs: z.array(GovernedDocumentRefSchema),\n /** What a person may DO with this document. An empty array means \"read only\"; nothing may be recorded. */\n allowedInteractionKinds: z.array(z.enum(GovernedDocumentInteractionKind)),\n approvalState: z.enum(GovernedDocumentReleaseApprovalState),\n effectiveAt: GovernedDocumentIsoDateTimeSchema,\n expiresAt: GovernedDocumentIsoDateTimeSchema.optional(),\n /**\n * The interactions this release says a person must perform AGAIN, because it replaced an earlier\n * release with a change that mattered (#1258, Step 2 / R7).\n *\n * Projected from `materialityDecision.requiredInteractionKinds` — the governance answer a\n * superseding release already owes (\"did the change matter enough that the audience must meet the\n * document again?\"). Only the KINDS travel: the decision identity is private custody detail and this\n * shape reaches an unauthenticated browser. Empty for a first release and for a replacement judged\n * immaterial — a typo fix does not re-ask anybody.\n *\n * `.default([])` so a surface generated before this field existed still parses, and means exactly\n * what its absence meant then: nothing is renewed.\n */\n renewedInteractionKinds: z.array(z.enum(GovernedDocumentInteractionKind)).default([]),\n});\nexport type GovernedDocumentInteractionSurface = z.infer<typeof GovernedDocumentInteractionSurfaceSchema>;\n\n/** Explicit allow-list projection from a composed release to what a consent surface may hold. */\nexport const projectGovernedDocumentInteractionSurface = (release: GovernedDocumentRelease): GovernedDocumentInteractionSurface =>\n GovernedDocumentInteractionSurfaceSchema.parse({\n schemaVersion: 1,\n identity: release.identity,\n documentClass: release.documentClass,\n locale: release.locale,\n jurisdictionRefs: release.jurisdictionRefs,\n allowedInteractionKinds: release.allowedInteractionKinds,\n approvalState: release.approvalState,\n effectiveAt: release.effectiveAt,\n ...(release.expiresAt ? { expiresAt: release.expiresAt } : {}),\n renewedInteractionKinds: release.materialityDecision?.requiredInteractionKinds ?? [],\n });\n\n\n/**\n * Is this release in force at that instant?\n *\n * ONE implementation, used by {@link composeGovernedDocumentInteraction} here and by\n * `resolveEffectiveDocumentRelease` in `saas-specifications` — which depends on this package, so\n * the read side and the record side cannot disagree about what \"in force\" means. They did, briefly:\n * writing the record's guard reproduced the interval comparison, and two copies of a half-open\n * interval is exactly the shape where one of them ends up with `<=`.\n *\n * HALF-OPEN — `[effectiveAt, expiresAt)`. A release takes effect at the instant it names, and the\n * one that replaces it takes effect at the instant the old one expires, so the boundary belongs to\n * exactly one of them. An unparsable instant is NOT in force: it is not a time.\n */\nexport function governedDocumentReleaseIsInForce(\n release: { readonly effectiveAt: string; readonly expiresAt?: string },\n at: string,\n): boolean {\n const instant = Date.parse(at);\n if (Number.isNaN(instant)) return false;\n if (instant < Date.parse(release.effectiveAt)) return false;\n return release.expiresAt === undefined || instant < Date.parse(release.expiresAt);\n}\n\n/**\n * Whether an application shows, and asks people to accept, governed documents nobody has approved.\n *\n * ONE switch for every surface that puts a governed document in front of a person: the public page\n * (`/privacy`, `/terms`), the registration acceptance control, the first-session acceptance gate, the\n * consent panel's privacy-notice link, the backend's owed-acceptance derivation and the notice-delivery\n * record. It is read from the application's configuration (`compliance.governedDocumentApprovalGate`)\n * through {@link requiresApprovedGovernedDocuments}, never passed per call site, so the page and the\n * acceptance surfaces cannot be armed separately (#1565). Armed on the page alone, `/terms` would answer\n * \"unavailable\" while sign-up asked people to accept those same terms.\n *\n * What it does NOT govern is the RECORD of an act that happened: `recordGovernedDocumentAcceptances`\n * records what a person submitted, and marks an unapproved release with `RELEASE_NOT_APPROVED` rather\n * than dropping it, because refusing there would only lose the evidence.\n *\n * This is the gate point `.claude/rules/one-source-of-truth.md` D5 keeps MARKED: arming it is part of\n * Gate 3's membership test (\"an application may face a real user\").\n */\nexport enum GovernedDocumentApprovalGate {\n /**\n * The framework default, and the posture while an application is being built: every release in\n * force is shown and asked for, whatever its approval state. An unapproved release still says so\n * (`approvalState` travels with it, and a record of an interaction with it carries\n * `RELEASE_NOT_APPROVED`), so nothing unapproved is ever presented as approved — it is only not\n * withheld.\n */\n UNARMED = \"unarmed\",\n /**\n * Nothing unapproved reaches a person. An unapproved release is neither shown nor asked for, and no\n * draft stands in for a document that has no approved release. Arm it when the application faces\n * real users.\n *\n * With no approved release of a contractual document, sign-up asks for nothing. Whether an\n * application should be allowed to go live in that state is part of Gate 3's arming decision, not of\n * this switch.\n */\n ARMED = \"armed\",\n}\n\n/**\n * Whether the application's configuration withholds unapproved governed documents — the ONE reading of\n * {@link GovernedDocumentApprovalGate} every serving and asking surface goes through.\n *\n * Takes the configuration's `compliance` section (or nothing) rather than a boolean, so a call site\n * cannot supply its own answer. An absent section, or an absent member, is the schema default: unarmed.\n *\n * assurance-control: WILDO.PRIVACY.CONSENT_RECORD — once armed, no person is shown or asked to accept a\n * governed document that has not been approved, on any surface.\n */\nexport function requiresApprovedGovernedDocuments(\n compliance: { readonly governedDocumentApprovalGate?: GovernedDocumentApprovalGate } | undefined,\n): boolean {\n return compliance?.governedDocumentApprovalGate === GovernedDocumentApprovalGate.ARMED;\n}\n\n/**\n * Every release in force at that instant — what a registration surface asks when it needs to know\n * which documents a person is meeting right now.\n *\n * Deliberately NOT the same question as `resolveEffectiveDocumentRelease`, which picks the ONE\n * winning release for a given document, locale and jurisdiction set. This one spans documents and\n * is total over what the application declared, so a document added to the config tomorrow is\n * delivered without anyone editing a list.\n *\n * `requireApproved` drops releases nobody has approved. A surface that SHOWS or ASKS for a document\n * passes {@link requiresApprovedGovernedDocuments}; a recorder of an act that already happened passes\n * nothing.\n */\nexport function selectGovernedDocumentReleasesInForce(\n releases: readonly GovernedDocumentInteractionSurface[],\n at: string,\n options?: { readonly requireApproved?: boolean },\n): readonly GovernedDocumentInteractionSurface[] {\n const requireApproved = options?.requireApproved ?? false;\n return releases.filter((release) =>\n governedDocumentReleaseIsInForce(release, at)\n && (!requireApproved || release.approvalState === GovernedDocumentReleaseApprovalState.APPROVED));\n}\n\n/** One accepted release as the owed-acceptance derivation reads it — the persisted row's relevant slice. */\nexport interface GovernedDocumentAcceptanceRecord {\n readonly documentRef: string;\n readonly acceptedAt: Date | string;\n}\n\n/**\n * One document a person owes an acceptance of, and why.\n *\n * `releases` is every in-force variant of it — the obligation belongs to the document, not to a locale.\n *\n * What today's surfaces DO with that list, stated plainly because the natural reading is wrong: the\n * registration screen and the acceptance gate present EVERY variant listed and record an acceptance of\n * each, rather than choosing the one in the person's language. Choosing by locale is a refinement neither\n * surface makes yet; an application publishing one variant per document — every dogfood application —\n * never meets the difference.\n */\nexport interface GovernedDocumentAcceptanceOwed {\n readonly documentRef: string;\n readonly reason: GovernedDocumentAcceptanceOwedReason;\n readonly releases: readonly GovernedDocumentInteractionSurface[];\n}\n\n/** Why an acceptance is owed. Two different messages to the person, so two members. */\nexport enum GovernedDocumentAcceptanceOwedReason {\n /** They have never accepted any release of this document — a stale sign-up form, or an older account. */\n NEVER_ACCEPTED = \"NEVER_ACCEPTED\",\n /** A release replaced the one they accepted with a change judged to require acceptance again. */\n MATERIALLY_CHANGED = \"MATERIALLY_CHANGED\",\n}\n\n/**\n * Which documents a person owes an acceptance of, at an instant (#1258, Step 2 / R7).\n *\n * TOTAL over what the application declared: every in-force release that permits `CONTRACT_ACCEPTED`\n * is considered, so a document added to the configuration tomorrow is owed by everyone the next time\n * they arrive, with no list to maintain (`.claude/rules/derive-before-you-ask.md` rule 3).\n *\n * ## What counts as having accepted it\n *\n * Any release of the DOCUMENT — the join is `documentRef`, never `releaseId`. A release is one locale\n * and jurisdiction pair, so keying on it would re-ask everyone who changed language: accepting the\n * French terms is accepting the terms.\n *\n * ## When an earlier acceptance stops counting\n *\n * Only when a release of the document says so — its `renewedInteractionKinds` includes\n * `CONTRACT_ACCEPTED`, projected from the materiality decision that replacement owed. Then an acceptance\n * counts only if it happened at or after that release took effect. Compared on TIME, not on\n * `releaseVersion`, because a version is counted per variant and comparing one variant's number with\n * another's means nothing.\n *\n * ## The material change need not still be IN FORCE — it is transitive across replacements\n *\n * A replacement takes effect at the instant its predecessor expires, so only the NEWEST release is ever in\n * force. Reading materiality from the in-force releases alone would therefore forget it: accept v1 in\n * January, v2 changes the terms materially in March, v3 fixes a typo in June — and in July only v3 is in\n * force, its renewal set is empty, and a person who never accepted v2's change is told they owe nothing.\n * So the latest material change is taken over EVERY declared release of the document that took effect at or\n * before `at`, expired or not. A release that takes effect AFTER `at` has not happened yet and never counts.\n *\n * What the application must keep for this to hold: the superseded releases stay declared. They do — the\n * releases are recorded as data and only ever appended to.\n *\n * ## With the approval gate armed\n *\n * `requireApproved` ({@link requiresApprovedGovernedDocuments}) owes only APPROVED releases: a person is\n * never asked to accept what the public page would refuse to show. A material change still counts from\n * every declared release, approved or not, because the approved release that follows carries it.\n *\n * A pure function of its inputs: it reads nothing and writes nothing.\n */\nexport function governedDocumentAcceptancesOwed(input: {\n readonly releases: readonly GovernedDocumentInteractionSurface[];\n readonly accepted: readonly GovernedDocumentAcceptanceRecord[];\n readonly at: string;\n readonly requireApproved?: boolean;\n}): readonly GovernedDocumentAcceptanceOwed[] {\n const acceptable = selectGovernedDocumentReleasesInForce(input.releases, input.at, { requireApproved: input.requireApproved })\n .filter((release) => release.allowedInteractionKinds.includes(GovernedDocumentInteractionKind.CONTRACT_ACCEPTED));\n\n const byDocument = new Map<string, GovernedDocumentInteractionSurface[]>();\n for (const release of acceptable) {\n const documentRef = release.identity.document.documentRef;\n byDocument.set(documentRef, [...(byDocument.get(documentRef) ?? []), release]);\n }\n\n const atMs = Date.parse(input.at);\n const owed: GovernedDocumentAcceptanceOwed[] = [];\n for (const [documentRef, releases] of byDocument) {\n const acceptedAtMs = input.accepted\n .filter((record) => record.documentRef === documentRef)\n .map((record) => new Date(record.acceptedAt).getTime())\n .filter((ms) => !Number.isNaN(ms));\n if (acceptedAtMs.length === 0) {\n owed.push({ documentRef, reason: GovernedDocumentAcceptanceOwedReason.NEVER_ACCEPTED, releases });\n continue;\n }\n const latestAcceptance = Math.max(...acceptedAtMs);\n const latestMaterialChange = Math.max(\n ...input.releases\n .filter((release) => release.identity.document.documentRef === documentRef\n && release.allowedInteractionKinds.includes(GovernedDocumentInteractionKind.CONTRACT_ACCEPTED)\n && release.renewedInteractionKinds.includes(GovernedDocumentInteractionKind.CONTRACT_ACCEPTED)\n && Date.parse(release.effectiveAt) <= atMs)\n .map((release) => Date.parse(release.effectiveAt)),\n Number.NEGATIVE_INFINITY,\n );\n if (latestMaterialChange > latestAcceptance) {\n owed.push({ documentRef, reason: GovernedDocumentAcceptanceOwedReason.MATERIALLY_CHANGED, releases });\n }\n }\n return owed;\n}\n\nexport interface GovernedDocumentInteractionComposition {\n /**\n * The release the person actually met. Supplies class, locale, jurisdictions and permitted kinds.\n *\n * Typed as the SURFACE rather than the full release so the same call works from the runtime, which\n * only ever holds the surface. A full `GovernedDocumentRelease` is structurally assignable, so a\n * caller that has one passes it unchanged.\n *\n * `renewedInteractionKinds` is OMITTED from the requirement: it answers \"must the person do this\n * again?\", which is what the OWED derivation reads, and composing a record of one act never does. It\n * is a projection a full release does not carry under that name, so requiring it here would have\n * quietly ended the assignability the paragraph above promises — the surface still satisfies this\n * type, because an extra field is not a missing one.\n */\n readonly release: Omit<GovernedDocumentInteractionSurface, 'renewedInteractionKinds'>;\n /** What the person did. Must be one the release permits. */\n readonly interactionKind: GovernedDocumentInteractionKind;\n /**\n * The notice the surface gave before soliciting the act, when the surface declares one.\n *\n * The CALLER supplies it, and the caller that should is the one holding the application's own\n * configuration — never the client whose act is being recorded. A mode travelling in from the\n * browser would be the party whose assent is in question grading the notice it was given.\n *\n * Omitted when the surface does not declare a mode, which is recorded as an advisory rather than\n * defaulted. Supplying one for a kind that admits none is an ISSUE, because it would be false.\n */\n readonly acceptanceMode?: GovernedDocumentAcceptanceMode;\n /** When they did it. Must fall inside the release's effective interval. */\n readonly occurredAt: string;\n}\n\nexport interface GovernedDocumentInteractionCompositionResult {\n /** Absent only when `issues` is non-empty. An advisory never withholds the record. */\n readonly interaction: GovernedDocumentInteraction | undefined;\n readonly issues: readonly GovernedDocumentInteractionIssue[];\n readonly advisories: readonly GovernedDocumentInteractionAdvisory[];\n}\n\n/**\n * Compose the record of one interaction, refusing what would be false and marking what is merely\n * unfinished.\n *\n * Pure: it reads the release and the two decided values, and writes nothing. The caller decides\n * where the record goes — today, an auditable event.\n */\nexport function composeGovernedDocumentInteraction(\n composition: GovernedDocumentInteractionComposition,\n): GovernedDocumentInteractionCompositionResult {\n const { release, interactionKind, acceptanceMode, occurredAt } = composition;\n const issues: GovernedDocumentInteractionIssue[] = [];\n const advisories: GovernedDocumentInteractionAdvisory[] = [];\n const releaseKey = governedDocumentReleaseIdentityKey(release.identity);\n\n if (!release.allowedInteractionKinds.includes(interactionKind)) {\n issues.push({\n kind: GovernedDocumentInteractionIssueKind.INTERACTION_KIND_NOT_PERMITTED,\n message:\n `${releaseKey} permits ${release.allowedInteractionKinds.join(\", \") || \"no interaction\"}, so ${interactionKind} `\n + \"cannot be recorded against it.\",\n });\n }\n\n if (!governedDocumentReleaseIsInForce(release, occurredAt)) {\n issues.push({\n kind: GovernedDocumentInteractionIssueKind.RELEASE_NOT_IN_FORCE,\n message:\n `${releaseKey} is in force from ${release.effectiveAt}${release.expiresAt ? ` until ${release.expiresAt}` : \"\"}, `\n + `so nobody can have interacted with it at ${occurredAt}.`,\n });\n }\n\n const admitsAcceptanceMode = GOVERNED_DOCUMENT_INTERACTION_ADMITS_ACCEPTANCE_MODE[interactionKind];\n if (acceptanceMode !== undefined && !admitsAcceptanceMode) {\n issues.push({\n kind: GovernedDocumentInteractionIssueKind.ACCEPTANCE_MODE_NOT_APPLICABLE,\n message:\n `Nobody is asked to perform a ${interactionKind}, so recording it as obtained by ${acceptanceMode} would `\n + `claim a notice was given for an act that was never solicited (${releaseKey}).`,\n });\n }\n if (acceptanceMode === undefined && admitsAcceptanceMode) {\n advisories.push({\n kind: GovernedDocumentInteractionAdvisoryKind.ACCEPTANCE_MODE_NOT_RECORDED,\n message:\n `The surface that obtained this ${interactionKind} with ${releaseKey} did not say how it asked, so the record `\n + \"cannot distinguish a document read to its end from a sentence beside a button.\",\n });\n }\n\n if (release.approvalState === GovernedDocumentReleaseApprovalState.UNAPPROVED) {\n advisories.push({\n kind: GovernedDocumentInteractionAdvisoryKind.RELEASE_NOT_APPROVED,\n message:\n `${releaseKey} had not been approved when this ${interactionKind} was recorded. The record stands and says so; `\n + \"withholding an unapproved release from a real reader is the read-side gate (`requireApproved`), armed at Gate 3.\",\n });\n }\n\n if (issues.length > 0) return { interaction: undefined, issues, advisories };\n\n const parsed = GovernedDocumentInteractionSchema.safeParse({\n schemaVersion: 1,\n interactionKind,\n release: release.identity,\n documentClass: release.documentClass,\n locale: release.locale,\n jurisdictionRefs: release.jurisdictionRefs,\n releaseApprovalState: release.approvalState,\n ...(acceptanceMode !== undefined ? { acceptanceMode } : {}),\n occurredAt,\n });\n if (!parsed.success) {\n return {\n interaction: undefined,\n issues: [\n {\n kind: GovernedDocumentInteractionIssueKind.RECORD_INVALID,\n message: `The composed interaction with ${releaseKey} is not a valid record: ${parsed.error.issues.map((issue) => issue.message).join(\"; \")}`,\n },\n ],\n advisories,\n };\n }\n return { interaction: parsed.data, issues: [], advisories };\n}\n\n/**\n * The ONE public document to render for a governed-document ref at an instant, or `undefined`.\n *\n * Total over what the application declared, so a document added to the configuration tomorrow is\n * served without anyone editing a list — the same shape as\n * {@link selectGovernedDocumentReleasesInForce}, and for the same reason.\n *\n * `requireApproved` **IS THE GATE POINT**.\n *\n * It defaults to `false` — deliberately, and this is the posture recorded in\n * `.claude/rules/one-source-of-truth.md` D5: critical gate points stay MARKED in every mechanism so\n * they can be switched on when the posture changes, and under the current YOLO posture they notify\n * and proceed. Arming it is part of **Gate 3**'s membership test (\"an application may face a real\n * user\") — the posture ends where a real user begins, by definition rather than by anyone\n * remembering. A caller serving a page to the public passes `true`; a caller previewing what the\n * lane drafted passes nothing.\n *\n * When several releases of one document are in force the LATEST EFFECTIVE wins, and ties break on\n * the higher `releaseVersion`. Two in force at once is an authoring mistake rather than a state to\n * refuse on a read path: refusing would take the page down over an overlap a reader cannot see,\n * which is worse than showing the newer of two documents the publisher approved.\n *\n * ## The draft fallback, and its two limits (#968 decision 5)\n *\n * A document the application has drafted and never released is served as its UNRELEASED DRAFT, so\n * neither a missing approval nor a missing release ever leaves a page with nothing — the page marks it\n * as a draft. The fallback applies only when the application holds NO release of that document:\n *\n * - a release that exists but is not in force (scheduled, or expired) is a date, not an absence, and\n * showing the draft in its place would present text the application already decided to replace;\n * - with the gate ARMED there is no fallback at all — \"serve nothing unapproved to a real reader\" has\n * no answer less approved than a draft.\n */\nexport function resolveInForcePublicDocument(\n documents: readonly GovernedDocumentPublicDocument[],\n documentRef: string,\n at: string,\n options?: { readonly requireApproved?: boolean },\n): GovernedDocumentPublicDocument | undefined {\n const requireApproved = options?.requireApproved ?? false;\n const released = documents.filter((document): document is GovernedDocumentReleasedPublicDocument =>\n document.kind === GovernedDocumentPublicDocumentKind.RELEASED && document.release.identity.document.documentRef === documentRef);\n const candidates = released.filter((document) =>\n governedDocumentReleaseIsInForce(document.release, at)\n && (!requireApproved || document.approvalState === GovernedDocumentReleaseApprovalState.APPROVED));\n if (candidates.length === 0) {\n if (released.length > 0 || requireApproved) return undefined;\n return documents.find((document) =>\n document.kind === GovernedDocumentPublicDocumentKind.UNRELEASED_DRAFT && document.documentRef === documentRef);\n }\n return candidates.reduce((winner, candidate) => {\n const winnerEffective = Date.parse(winner.release.effectiveAt);\n const candidateEffective = Date.parse(candidate.release.effectiveAt);\n if (candidateEffective !== winnerEffective) return candidateEffective > winnerEffective ? candidate : winner;\n return candidate.release.identity.releaseVersion > winner.release.identity.releaseVersion ? candidate : winner;\n });\n}\n"]}