@wildo-ai/saas-models 1.1.9 → 1.1.10

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 (936) hide show
  1. package/dist/esm/_inspect.d.ts.map +1 -1
  2. package/dist/esm/_inspect.js.map +1 -1
  3. package/dist/esm/applications/application-metadata.shared.resources-config.schemas.d.ts.map +1 -1
  4. package/dist/esm/applications/application-metadata.shared.resources-config.schemas.js.map +1 -1
  5. package/dist/esm/applications/application-subject.shared.schemas.d.ts.map +1 -1
  6. package/dist/esm/applications/application-subject.shared.schemas.js.map +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.map +1 -1
  9. package/dist/esm/applications/applications-context.schemas.d.ts +68 -2
  10. package/dist/esm/applications/applications-context.schemas.d.ts.map +1 -1
  11. package/dist/esm/applications/applications-context.schemas.js.map +1 -1
  12. package/dist/esm/applications/applications.shared.resources-config.schemas.d.ts.map +1 -1
  13. package/dist/esm/applications/applications.shared.resources-config.schemas.js.map +1 -1
  14. package/dist/esm/applications/applications.shared.schemas.d.ts.map +1 -1
  15. package/dist/esm/applications/applications.shared.schemas.js.map +1 -1
  16. package/dist/esm/billing/billing-account.shared.resources-config.schemas.d.ts.map +1 -1
  17. package/dist/esm/billing/billing-account.shared.resources-config.schemas.js.map +1 -1
  18. package/dist/esm/billing/billing-account.shared.schemas.d.ts.map +1 -1
  19. package/dist/esm/billing/billing-account.shared.schemas.js.map +1 -1
  20. package/dist/esm/billing/billing-configuration.shared.schemas.d.ts.map +1 -1
  21. package/dist/esm/billing/billing-configuration.shared.schemas.js.map +1 -1
  22. package/dist/esm/billing/billing-enums.shared.schemas.d.ts.map +1 -1
  23. package/dist/esm/billing/billing-enums.shared.schemas.js.map +1 -1
  24. package/dist/esm/billing/billing-types.shared.schemas.d.ts.map +1 -1
  25. package/dist/esm/billing/billing-types.shared.schemas.js.map +1 -1
  26. package/dist/esm/billing/credit-pool.shared.resources-config.schemas.d.ts.map +1 -1
  27. package/dist/esm/billing/credit-pool.shared.resources-config.schemas.js.map +1 -1
  28. package/dist/esm/billing/credit-pool.shared.schemas.d.ts.map +1 -1
  29. package/dist/esm/billing/credit-pool.shared.schemas.js.map +1 -1
  30. package/dist/esm/billing/invoice-ref.shared.resources-config.schemas.d.ts.map +1 -1
  31. package/dist/esm/billing/invoice-ref.shared.resources-config.schemas.js.map +1 -1
  32. package/dist/esm/billing/invoice-ref.shared.schemas.d.ts.map +1 -1
  33. package/dist/esm/billing/invoice-ref.shared.schemas.js.map +1 -1
  34. package/dist/esm/billing/price.shared.resources-config.schemas.d.ts.map +1 -1
  35. package/dist/esm/billing/price.shared.resources-config.schemas.js.map +1 -1
  36. package/dist/esm/billing/price.shared.schemas.d.ts.map +1 -1
  37. package/dist/esm/billing/price.shared.schemas.js.map +1 -1
  38. package/dist/esm/billing/product-behavior-policy.shared.schemas.d.ts.map +1 -1
  39. package/dist/esm/billing/product-behavior-policy.shared.schemas.js.map +1 -1
  40. package/dist/esm/billing/product-definition.shared.schemas.d.ts.map +1 -1
  41. package/dist/esm/billing/product-definition.shared.schemas.js.map +1 -1
  42. package/dist/esm/billing/product.shared.resources-config.schemas.d.ts.map +1 -1
  43. package/dist/esm/billing/product.shared.resources-config.schemas.js.map +1 -1
  44. package/dist/esm/billing/product.shared.schemas.d.ts.map +1 -1
  45. package/dist/esm/billing/product.shared.schemas.js.map +1 -1
  46. package/dist/esm/billing/promotions.shared.resources-config.schemas.d.ts.map +1 -1
  47. package/dist/esm/billing/promotions.shared.resources-config.schemas.js.map +1 -1
  48. package/dist/esm/billing/promotions.shared.schemas.d.ts.map +1 -1
  49. package/dist/esm/billing/promotions.shared.schemas.js.map +1 -1
  50. package/dist/esm/billing/public-pricing-catalog.shared.atoms.d.ts.map +1 -1
  51. package/dist/esm/billing/public-pricing-catalog.shared.atoms.js.map +1 -1
  52. package/dist/esm/billing/public-pricing-catalog.shared.d.ts.map +1 -1
  53. package/dist/esm/billing/public-pricing-catalog.shared.js.map +1 -1
  54. package/dist/esm/billing/referral-reward.shared.schemas.d.ts.map +1 -1
  55. package/dist/esm/billing/referral-reward.shared.schemas.js.map +1 -1
  56. package/dist/esm/billing/referral.shared.resources-config.schemas.d.ts.map +1 -1
  57. package/dist/esm/billing/referral.shared.resources-config.schemas.js.map +1 -1
  58. package/dist/esm/billing/referral.shared.schemas.d.ts.map +1 -1
  59. package/dist/esm/billing/referral.shared.schemas.js.map +1 -1
  60. package/dist/esm/billing/subscription.shared.resources-config.schemas.d.ts.map +1 -1
  61. package/dist/esm/billing/subscription.shared.resources-config.schemas.js.map +1 -1
  62. package/dist/esm/billing/subscription.shared.schemas.d.ts.map +1 -1
  63. package/dist/esm/billing/subscription.shared.schemas.js.map +1 -1
  64. package/dist/esm/billing/usage-flush-evidence.shared.schemas.d.ts.map +1 -1
  65. package/dist/esm/billing/usage-flush-evidence.shared.schemas.js.map +1 -1
  66. package/dist/esm/billing/usage-record.shared.resources-config.schemas.d.ts.map +1 -1
  67. package/dist/esm/billing/usage-record.shared.resources-config.schemas.js.map +1 -1
  68. package/dist/esm/billing/usage-record.shared.schemas.d.ts.map +1 -1
  69. package/dist/esm/billing/usage-record.shared.schemas.js.map +1 -1
  70. package/dist/esm/charts/aggregation-query.shared.schemas.d.ts.map +1 -1
  71. package/dist/esm/charts/aggregation-query.shared.schemas.js.map +1 -1
  72. package/dist/esm/charts/aggregation.shared.definitions.d.ts.map +1 -1
  73. package/dist/esm/charts/aggregation.shared.definitions.js.map +1 -1
  74. package/dist/esm/charts/chart-definition-builder.shared.d.ts.map +1 -1
  75. package/dist/esm/charts/chart-definition-builder.shared.js.map +1 -1
  76. package/dist/esm/companion/artifact-placement.shared.definitions.d.ts.map +1 -1
  77. package/dist/esm/companion/artifact-placement.shared.definitions.js.map +1 -1
  78. package/dist/esm/companion/provider-discovery.shared.schemas.d.ts.map +1 -1
  79. package/dist/esm/companion/provider-discovery.shared.schemas.js.map +1 -1
  80. package/dist/esm/companion/shared-library-companion.shared.definitions.d.ts.map +1 -1
  81. package/dist/esm/companion/shared-library-companion.shared.definitions.js.map +1 -1
  82. package/dist/esm/companion-exports.d.ts.map +1 -1
  83. package/dist/esm/companion-exports.js.map +1 -1
  84. package/dist/esm/compliance/audit-trails/application-audit-logs.shared.resources-config.schemas.d.ts +1 -1
  85. package/dist/esm/compliance/audit-trails/application-audit-logs.shared.resources-config.schemas.d.ts.map +1 -1
  86. package/dist/esm/compliance/audit-trails/application-audit-logs.shared.resources-config.schemas.js +5 -2
  87. package/dist/esm/compliance/audit-trails/application-audit-logs.shared.resources-config.schemas.js.map +1 -1
  88. package/dist/esm/compliance/audit-trails/audit-actor.shared.schemas.d.ts.map +1 -1
  89. package/dist/esm/compliance/audit-trails/audit-actor.shared.schemas.js.map +1 -1
  90. package/dist/esm/compliance/audit-trails/audit-event-classification.shared.d.ts +28 -0
  91. package/dist/esm/compliance/audit-trails/audit-event-classification.shared.d.ts.map +1 -0
  92. package/dist/esm/compliance/audit-trails/audit-event-classification.shared.js +30 -0
  93. package/dist/esm/compliance/audit-trails/audit-event-classification.shared.js.map +1 -0
  94. package/dist/esm/compliance/audit-trails/audit-export-projection.shared.schemas.d.ts.map +1 -1
  95. package/dist/esm/compliance/audit-trails/audit-export-projection.shared.schemas.js.map +1 -1
  96. package/dist/esm/compliance/audit-trails/audit-log-sink.shared.schemas.d.ts.map +1 -1
  97. package/dist/esm/compliance/audit-trails/audit-log-sink.shared.schemas.js.map +1 -1
  98. package/dist/esm/compliance/audit-trails/audit-logs.shared.resources-config.schemas.d.ts +1 -1
  99. package/dist/esm/compliance/audit-trails/audit-logs.shared.resources-config.schemas.d.ts.map +1 -1
  100. package/dist/esm/compliance/audit-trails/audit-logs.shared.resources-config.schemas.js +2 -1
  101. package/dist/esm/compliance/audit-trails/audit-logs.shared.resources-config.schemas.js.map +1 -1
  102. package/dist/esm/compliance/audit-trails/audit-trail-config.shared.schemas.d.ts +20 -0
  103. package/dist/esm/compliance/audit-trails/audit-trail-config.shared.schemas.d.ts.map +1 -1
  104. package/dist/esm/compliance/audit-trails/audit-trail-config.shared.schemas.js +40 -0
  105. package/dist/esm/compliance/audit-trails/audit-trail-config.shared.schemas.js.map +1 -1
  106. package/dist/esm/compliance/audit-trails/auditable-events.shared.schema.d.ts +1 -14
  107. package/dist/esm/compliance/audit-trails/auditable-events.shared.schema.d.ts.map +1 -1
  108. package/dist/esm/compliance/audit-trails/auditable-events.shared.schema.js +1 -16
  109. package/dist/esm/compliance/audit-trails/auditable-events.shared.schema.js.map +1 -1
  110. package/dist/esm/compliance/audit-trails/security-audit-event-envelope.shared.schema.d.ts +17 -4
  111. package/dist/esm/compliance/audit-trails/security-audit-event-envelope.shared.schema.d.ts.map +1 -1
  112. package/dist/esm/compliance/audit-trails/security-audit-event-envelope.shared.schema.js +25 -5
  113. package/dist/esm/compliance/audit-trails/security-audit-event-envelope.shared.schema.js.map +1 -1
  114. package/dist/esm/compliance/data-classification/data-classification.shared.schemas.d.ts.map +1 -1
  115. package/dist/esm/compliance/data-classification/data-classification.shared.schemas.js.map +1 -1
  116. package/dist/esm/compliance/documents/governed-document-interactions.shared.schemas.d.ts.map +1 -1
  117. package/dist/esm/compliance/documents/governed-document-interactions.shared.schemas.js.map +1 -1
  118. package/dist/esm/compliance/documents/governed-documents.shared.schemas.d.ts +0 -50
  119. package/dist/esm/compliance/documents/governed-documents.shared.schemas.d.ts.map +1 -1
  120. package/dist/esm/compliance/documents/governed-documents.shared.schemas.js +4 -51
  121. package/dist/esm/compliance/documents/governed-documents.shared.schemas.js.map +1 -1
  122. package/dist/esm/compliance/documents/public-governed-documents.shared.d.ts +67 -0
  123. package/dist/esm/compliance/documents/public-governed-documents.shared.d.ts.map +1 -0
  124. package/dist/esm/compliance/documents/public-governed-documents.shared.js +69 -0
  125. package/dist/esm/compliance/documents/public-governed-documents.shared.js.map +1 -0
  126. package/dist/esm/compliance/documents/user-governed-document-acceptances.shared.resources-config.schemas.d.ts.map +1 -1
  127. package/dist/esm/compliance/documents/user-governed-document-acceptances.shared.resources-config.schemas.js.map +1 -1
  128. package/dist/esm/compliance/documents/user-governed-document-acceptances.shared.schemas.d.ts.map +1 -1
  129. package/dist/esm/compliance/documents/user-governed-document-acceptances.shared.schemas.js.map +1 -1
  130. package/dist/esm/compliance/privacy/ai-use-posture.shared.schemas.d.ts.map +1 -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.map +1 -1
  133. package/dist/esm/compliance/privacy/capability-consent-purposes.shared.utils.js.map +1 -1
  134. package/dist/esm/compliance/privacy/client-storage.shared.schemas.d.ts.map +1 -1
  135. package/dist/esm/compliance/privacy/client-storage.shared.schemas.js.map +1 -1
  136. package/dist/esm/compliance/privacy/consent-gate-vocabulary.shared.schemas.d.ts.map +1 -1
  137. package/dist/esm/compliance/privacy/consent-gate-vocabulary.shared.schemas.js.map +1 -1
  138. package/dist/esm/compliance/privacy/consent-purposes.shared.d.ts.map +1 -1
  139. package/dist/esm/compliance/privacy/consent-purposes.shared.js.map +1 -1
  140. package/dist/esm/compliance/privacy/data-subject-rights.shared.schemas.d.ts.map +1 -1
  141. package/dist/esm/compliance/privacy/data-subject-rights.shared.schemas.js +1 -1
  142. package/dist/esm/compliance/privacy/data-subject-rights.shared.schemas.js.map +1 -1
  143. package/dist/esm/compliance/privacy/impersonalization-scrub.shared.utils.d.ts.map +1 -1
  144. package/dist/esm/compliance/privacy/impersonalization-scrub.shared.utils.js.map +1 -1
  145. package/dist/esm/compliance/privacy/impersonalization.shared.schemas.d.ts.map +1 -1
  146. package/dist/esm/compliance/privacy/impersonalization.shared.schemas.js.map +1 -1
  147. package/dist/esm/compliance/privacy/jurisdiction-containment.shared.d.ts +32 -0
  148. package/dist/esm/compliance/privacy/jurisdiction-containment.shared.d.ts.map +1 -0
  149. package/dist/esm/compliance/privacy/jurisdiction-containment.shared.js +46 -0
  150. package/dist/esm/compliance/privacy/jurisdiction-containment.shared.js.map +1 -0
  151. package/dist/esm/compliance/privacy/legal-hold-subject-attribution.shared.utils.d.ts.map +1 -1
  152. package/dist/esm/compliance/privacy/legal-hold-subject-attribution.shared.utils.js.map +1 -1
  153. package/dist/esm/compliance/privacy/legal-holds.shared.resources-config.schemas.d.ts.map +1 -1
  154. package/dist/esm/compliance/privacy/legal-holds.shared.resources-config.schemas.js.map +1 -1
  155. package/dist/esm/compliance/privacy/legal-holds.shared.schemas.d.ts.map +1 -1
  156. package/dist/esm/compliance/privacy/legal-holds.shared.schemas.js.map +1 -1
  157. package/dist/esm/compliance/privacy/legal-notice-obligation.shared.d.ts +47 -0
  158. package/dist/esm/compliance/privacy/legal-notice-obligation.shared.d.ts.map +1 -0
  159. package/dist/esm/compliance/privacy/legal-notice-obligation.shared.js +54 -0
  160. package/dist/esm/compliance/privacy/legal-notice-obligation.shared.js.map +1 -0
  161. package/dist/esm/compliance/privacy/legal-notice.shared.d.ts +105 -0
  162. package/dist/esm/compliance/privacy/legal-notice.shared.d.ts.map +1 -0
  163. package/dist/esm/compliance/privacy/legal-notice.shared.js +112 -0
  164. package/dist/esm/compliance/privacy/legal-notice.shared.js.map +1 -0
  165. package/dist/esm/compliance/privacy/operating-jurisdictions.shared.schemas.d.ts +1 -27
  166. package/dist/esm/compliance/privacy/operating-jurisdictions.shared.schemas.d.ts.map +1 -1
  167. package/dist/esm/compliance/privacy/operating-jurisdictions.shared.schemas.js +2 -41
  168. package/dist/esm/compliance/privacy/operating-jurisdictions.shared.schemas.js.map +1 -1
  169. package/dist/esm/compliance/privacy/operator-compliance-identity.shared.schemas.d.ts +51 -0
  170. package/dist/esm/compliance/privacy/operator-compliance-identity.shared.schemas.d.ts.map +1 -1
  171. package/dist/esm/compliance/privacy/operator-compliance-identity.shared.schemas.js +65 -0
  172. package/dist/esm/compliance/privacy/operator-compliance-identity.shared.schemas.js.map +1 -1
  173. package/dist/esm/compliance/privacy/personal-data-category.shared.schemas.d.ts.map +1 -1
  174. package/dist/esm/compliance/privacy/personal-data-category.shared.schemas.js.map +1 -1
  175. package/dist/esm/compliance/privacy/personal-data-declaration.shared.utils.d.ts.map +1 -1
  176. package/dist/esm/compliance/privacy/personal-data-declaration.shared.utils.js.map +1 -1
  177. package/dist/esm/compliance/privacy/privacy.shared.schemas.d.ts.map +1 -1
  178. package/dist/esm/compliance/privacy/privacy.shared.schemas.js.map +1 -1
  179. package/dist/esm/compliance/privacy/provider-capability-disclosure.shared.schemas.d.ts.map +1 -1
  180. package/dist/esm/compliance/privacy/provider-capability-disclosure.shared.schemas.js.map +1 -1
  181. package/dist/esm/compliance/privacy/purpose-ref.shared.schemas.d.ts.map +1 -1
  182. package/dist/esm/compliance/privacy/purpose-ref.shared.schemas.js.map +1 -1
  183. package/dist/esm/compliance/privacy/redaction.shared.schemas.d.ts.map +1 -1
  184. package/dist/esm/compliance/privacy/redaction.shared.schemas.js.map +1 -1
  185. package/dist/esm/compliance/privacy/retention-binding.shared.utils.d.ts.map +1 -1
  186. package/dist/esm/compliance/privacy/retention-binding.shared.utils.js.map +1 -1
  187. package/dist/esm/compliance/privacy/retention-enforcement-records.shared.resources-config.schemas.d.ts.map +1 -1
  188. package/dist/esm/compliance/privacy/retention-enforcement-records.shared.resources-config.schemas.js.map +1 -1
  189. package/dist/esm/compliance/privacy/retention-enforcement-records.shared.schemas.d.ts +8 -8
  190. package/dist/esm/compliance/privacy/retention-enforcement-records.shared.schemas.d.ts.map +1 -1
  191. package/dist/esm/compliance/privacy/retention-enforcement-records.shared.schemas.js.map +1 -1
  192. package/dist/esm/compliance/privacy/retention-schedule.shared.schemas.d.ts.map +1 -1
  193. package/dist/esm/compliance/privacy/retention-schedule.shared.schemas.js.map +1 -1
  194. package/dist/esm/compliance/privacy/retention-scope-deleted.shared.utils.d.ts.map +1 -1
  195. package/dist/esm/compliance/privacy/retention-scope-deleted.shared.utils.js.map +1 -1
  196. package/dist/esm/compliance/privacy/sharing.shared.schemas.d.ts.map +1 -1
  197. package/dist/esm/compliance/privacy/sharing.shared.schemas.js.map +1 -1
  198. package/dist/esm/compliance/privacy/subject-data-recipients.shared.schemas.d.ts.map +1 -1
  199. package/dist/esm/compliance/privacy/subject-data-recipients.shared.schemas.js.map +1 -1
  200. package/dist/esm/compliance/privacy/subject-erasure-lane-evidence.shared.schemas.d.ts.map +1 -1
  201. package/dist/esm/compliance/privacy/subject-erasure-lane-evidence.shared.schemas.js.map +1 -1
  202. package/dist/esm/compliance/privacy/subject-erasure.shared.schemas.d.ts.map +1 -1
  203. package/dist/esm/compliance/privacy/subject-erasure.shared.schemas.js.map +1 -1
  204. package/dist/esm/compliance/privacy/subject-export-render.shared.utils.d.ts.map +1 -1
  205. package/dist/esm/compliance/privacy/subject-export-render.shared.utils.js.map +1 -1
  206. package/dist/esm/compliance/privacy/subject-export.shared.schemas.d.ts.map +1 -1
  207. package/dist/esm/compliance/privacy/subject-export.shared.schemas.js.map +1 -1
  208. package/dist/esm/compliance/review-cadence.shared.schemas.d.ts.map +1 -1
  209. package/dist/esm/compliance/review-cadence.shared.schemas.js.map +1 -1
  210. package/dist/esm/compliance/risk-posture.shared.schemas.d.ts.map +1 -1
  211. package/dist/esm/compliance/risk-posture.shared.schemas.js.map +1 -1
  212. package/dist/esm/config/analytics-value-moments.shared.schemas.d.ts.map +1 -1
  213. package/dist/esm/config/analytics-value-moments.shared.schemas.js.map +1 -1
  214. package/dist/esm/config/app-configuration-shared.shared.schemas.d.ts +63 -1
  215. package/dist/esm/config/app-configuration-shared.shared.schemas.d.ts.map +1 -1
  216. package/dist/esm/config/app-configuration-shared.shared.schemas.js +11 -0
  217. package/dist/esm/config/app-configuration-shared.shared.schemas.js.map +1 -1
  218. package/dist/esm/config/app-frontend-type.shared.schemas.d.ts.map +1 -1
  219. package/dist/esm/config/app-frontend-type.shared.schemas.js.map +1 -1
  220. package/dist/esm/config/auth-config-resolution.shared.utils.d.ts.map +1 -1
  221. package/dist/esm/config/auth-config-resolution.shared.utils.js.map +1 -1
  222. package/dist/esm/config/brand-assets.shared.schemas.d.ts.map +1 -1
  223. package/dist/esm/config/brand-assets.shared.schemas.js.map +1 -1
  224. package/dist/esm/config/configuration-validation.shared.schemas.d.ts.map +1 -1
  225. package/dist/esm/config/configuration-validation.shared.schemas.js.map +1 -1
  226. package/dist/esm/config/entity-identity-config.shared.schemas.d.ts.map +1 -1
  227. package/dist/esm/config/entity-identity-config.shared.schemas.js.map +1 -1
  228. package/dist/esm/config/frontend/chart-definition.shared.schemas.d.ts +16 -16
  229. package/dist/esm/config/frontend/chart-definition.shared.schemas.d.ts.map +1 -1
  230. package/dist/esm/config/frontend/chart-definition.shared.schemas.js.map +1 -1
  231. package/dist/esm/config/frontend/chart-registration-alignment.shared.d.ts.map +1 -1
  232. package/dist/esm/config/frontend/chart-registration-alignment.shared.js.map +1 -1
  233. package/dist/esm/config/frontend/navigation.shared.schemas.d.ts.map +1 -1
  234. package/dist/esm/config/frontend/navigation.shared.schemas.js.map +1 -1
  235. package/dist/esm/config/frontend/onboarding.shared.schemas.d.ts.map +1 -1
  236. package/dist/esm/config/frontend/onboarding.shared.schemas.js.map +1 -1
  237. package/dist/esm/config/postgresql.shared.schemas.d.ts.map +1 -1
  238. package/dist/esm/config/postgresql.shared.schemas.js.map +1 -1
  239. package/dist/esm/config/registration-acquisition-policy.shared.utils.d.ts.map +1 -1
  240. package/dist/esm/config/registration-acquisition-policy.shared.utils.js.map +1 -1
  241. package/dist/esm/config-authoring.entry.d.ts.map +1 -1
  242. package/dist/esm/config-authoring.entry.js.map +1 -1
  243. package/dist/esm/crdt/crdt-merge.shared.utils.d.ts.map +1 -1
  244. package/dist/esm/crdt/crdt-merge.shared.utils.js.map +1 -1
  245. package/dist/esm/data-seeding/data-seeding-config.shared.schemas.d.ts.map +1 -1
  246. package/dist/esm/data-seeding/data-seeding-config.shared.schemas.js.map +1 -1
  247. package/dist/esm/errors/caught-error-description.shared.utils.d.ts +5 -1
  248. package/dist/esm/errors/caught-error-description.shared.utils.d.ts.map +1 -1
  249. package/dist/esm/errors/caught-error-description.shared.utils.js +48 -4
  250. package/dist/esm/errors/caught-error-description.shared.utils.js.map +1 -1
  251. package/dist/esm/errors/errors.custom-message-ref.shared.definitions.d.ts.map +1 -1
  252. package/dist/esm/errors/errors.custom-message-ref.shared.definitions.js.map +1 -1
  253. package/dist/esm/errors/errors.shared.definitions.d.ts.map +1 -1
  254. package/dist/esm/errors/errors.shared.definitions.js.map +1 -1
  255. package/dist/esm/errors/errors.shared.schemas.d.ts.map +1 -1
  256. package/dist/esm/errors/errors.shared.schemas.js.map +1 -1
  257. package/dist/esm/errors/errors.shared.utils.d.ts.map +1 -1
  258. package/dist/esm/errors/errors.shared.utils.js.map +1 -1
  259. package/dist/esm/errors/resource-access-forbidden.shared.error.d.ts.map +1 -1
  260. package/dist/esm/errors/resource-access-forbidden.shared.error.js.map +1 -1
  261. package/dist/esm/errors/thrown-value-description.shared.utils.d.ts.map +1 -1
  262. package/dist/esm/errors/thrown-value-description.shared.utils.js.map +1 -1
  263. package/dist/esm/errors/zod-issue-formatting.shared.utils.d.ts.map +1 -1
  264. package/dist/esm/errors/zod-issue-formatting.shared.utils.js.map +1 -1
  265. package/dist/esm/exports/tabular-csv.shared.utils.d.ts.map +1 -1
  266. package/dist/esm/exports/tabular-csv.shared.utils.js.map +1 -1
  267. package/dist/esm/external-data/external-data-pipeline-description.shared.d.ts.map +1 -1
  268. package/dist/esm/external-data/external-data-pipeline-description.shared.js.map +1 -1
  269. package/dist/esm/external-data/external-data-pipeline-pass-mode.shared.d.ts.map +1 -1
  270. package/dist/esm/external-data/external-data-pipeline-pass-mode.shared.js.map +1 -1
  271. package/dist/esm/external-data/external-data-pipeline.shared.schemas.d.ts.map +1 -1
  272. package/dist/esm/external-data/external-data-pipeline.shared.schemas.js.map +1 -1
  273. package/dist/esm/external-data/external-data-provenance.shared.d.ts.map +1 -1
  274. package/dist/esm/external-data/external-data-provenance.shared.js.map +1 -1
  275. package/dist/esm/external-data.exports.d.ts.map +1 -1
  276. package/dist/esm/external-data.exports.js.map +1 -1
  277. package/dist/esm/external-providers/compose-provider-registry.shared.d.ts.map +1 -1
  278. package/dist/esm/external-providers/compose-provider-registry.shared.js.map +1 -1
  279. package/dist/esm/external-providers/engine-capabilities.shared.schemas.d.ts.map +1 -1
  280. package/dist/esm/external-providers/engine-capabilities.shared.schemas.js.map +1 -1
  281. package/dist/esm/external-providers/engine-capability-resolution-mode.shared.d.ts.map +1 -1
  282. package/dist/esm/external-providers/engine-capability-resolution-mode.shared.js.map +1 -1
  283. package/dist/esm/external-providers/engine-capability-surface.shared.d.ts.map +1 -1
  284. package/dist/esm/external-providers/engine-capability-surface.shared.js.map +1 -1
  285. package/dist/esm/external-providers/external-providers.shared.schemas.d.ts.map +1 -1
  286. package/dist/esm/external-providers/external-providers.shared.schemas.js.map +1 -1
  287. package/dist/esm/external-providers/frontend-bootstrap.shared.schemas.d.ts +34 -1
  288. package/dist/esm/external-providers/frontend-bootstrap.shared.schemas.d.ts.map +1 -1
  289. package/dist/esm/external-providers/frontend-bootstrap.shared.schemas.js.map +1 -1
  290. package/dist/esm/external-providers/frontend-capability-public-config.shared.schemas.d.ts.map +1 -1
  291. package/dist/esm/external-providers/frontend-capability-public-config.shared.schemas.js.map +1 -1
  292. package/dist/esm/external-providers/frontend-capability-runtime.shared.types.d.ts.map +1 -1
  293. package/dist/esm/external-providers/frontend-capability-runtime.shared.types.js.map +1 -1
  294. package/dist/esm/external-providers/frontend-provider-entry.shared.schemas.d.ts.map +1 -1
  295. package/dist/esm/external-providers/frontend-provider-entry.shared.schemas.js.map +1 -1
  296. package/dist/esm/external-providers/frontend-provider-public-config.shared.d.ts.map +1 -1
  297. package/dist/esm/external-providers/frontend-provider-public-config.shared.js.map +1 -1
  298. package/dist/esm/external-providers/model-cost-accounting-config.shared.schemas.d.ts.map +1 -1
  299. package/dist/esm/external-providers/model-cost-accounting-config.shared.schemas.js.map +1 -1
  300. package/dist/esm/external-providers/provider-address-lookup-contract.shared.types.d.ts.map +1 -1
  301. package/dist/esm/external-providers/provider-address-lookup-contract.shared.types.js.map +1 -1
  302. package/dist/esm/external-providers/provider-augmentation-opt-ins.shared.schemas.d.ts.map +1 -1
  303. package/dist/esm/external-providers/provider-augmentation-opt-ins.shared.schemas.js.map +1 -1
  304. package/dist/esm/external-providers/provider-authentication-assurance.shared.schemas.d.ts.map +1 -1
  305. package/dist/esm/external-providers/provider-authentication-assurance.shared.schemas.js.map +1 -1
  306. package/dist/esm/external-providers/provider-browser-operations.shared.schemas.d.ts.map +1 -1
  307. package/dist/esm/external-providers/provider-browser-operations.shared.schemas.js.map +1 -1
  308. package/dist/esm/external-providers/provider-capability.shared.schemas.d.ts.map +1 -1
  309. package/dist/esm/external-providers/provider-capability.shared.schemas.js.map +1 -1
  310. package/dist/esm/external-providers/provider-compliance-profile.shared.schemas.d.ts.map +1 -1
  311. package/dist/esm/external-providers/provider-compliance-profile.shared.schemas.js.map +1 -1
  312. package/dist/esm/external-providers/provider-frontend-component-contract.shared.types.d.ts.map +1 -1
  313. package/dist/esm/external-providers/provider-frontend-component-contract.shared.types.js.map +1 -1
  314. package/dist/esm/external-providers/provider-frontend-surface.shared.schemas.d.ts.map +1 -1
  315. package/dist/esm/external-providers/provider-frontend-surface.shared.schemas.js.map +1 -1
  316. package/dist/esm/external-providers/provider-metadata.shared.schemas.d.ts.map +1 -1
  317. package/dist/esm/external-providers/provider-metadata.shared.schemas.js.map +1 -1
  318. package/dist/esm/external-providers/provider-package-allow-list.shared.schemas.d.ts.map +1 -1
  319. package/dist/esm/external-providers/provider-package-allow-list.shared.schemas.js.map +1 -1
  320. package/dist/esm/external-providers/provider-protocol.shared.schemas.d.ts.map +1 -1
  321. package/dist/esm/external-providers/provider-protocol.shared.schemas.js.map +1 -1
  322. package/dist/esm/external-providers/provider-scope-reauthorization.shared.schemas.d.ts.map +1 -1
  323. package/dist/esm/external-providers/provider-scope-reauthorization.shared.schemas.js.map +1 -1
  324. package/dist/esm/external-providers/provider-shared-connections.shared.schemas.d.ts.map +1 -1
  325. package/dist/esm/external-providers/provider-shared-connections.shared.schemas.js.map +1 -1
  326. package/dist/esm/external-providers/provider-tier-rule.shared.utils.d.ts.map +1 -1
  327. package/dist/esm/external-providers/provider-tier-rule.shared.utils.js.map +1 -1
  328. package/dist/esm/external-providers/provider-usage-cost.shared.d.ts.map +1 -1
  329. package/dist/esm/external-providers/provider-usage-cost.shared.js.map +1 -1
  330. package/dist/esm/external-providers/provider-usage-pricing.example.d.ts.map +1 -1
  331. package/dist/esm/external-providers/provider-usage-pricing.example.js.map +1 -1
  332. package/dist/esm/external-providers/provider-usage-pricing.shared.schemas.d.ts.map +1 -1
  333. package/dist/esm/external-providers/provider-usage-pricing.shared.schemas.js.map +1 -1
  334. package/dist/esm/features/application-features.shared.resources-config.schemas.d.ts.map +1 -1
  335. package/dist/esm/features/application-features.shared.resources-config.schemas.js.map +1 -1
  336. package/dist/esm/features/connected-feature.example.d.ts.map +1 -1
  337. package/dist/esm/features/connected-feature.example.js.map +1 -1
  338. package/dist/esm/features/core-feature-definitions.shared.d.ts.map +1 -1
  339. package/dist/esm/features/core-feature-definitions.shared.js.map +1 -1
  340. package/dist/esm/features/feature-builders.shared.d.ts.map +1 -1
  341. package/dist/esm/features/feature-builders.shared.js.map +1 -1
  342. package/dist/esm/features/feature-definition.shared.schemas.d.ts.map +1 -1
  343. package/dist/esm/features/feature-definition.shared.schemas.js.map +1 -1
  344. package/dist/esm/features/feature-registry.shared.d.ts.map +1 -1
  345. package/dist/esm/features/feature-registry.shared.js.map +1 -1
  346. package/dist/esm/features/feature-resolution.shared.schemas.d.ts.map +1 -1
  347. package/dist/esm/features/feature-resolution.shared.schemas.js.map +1 -1
  348. package/dist/esm/features/scope-features.shared.schemas.d.ts.map +1 -1
  349. package/dist/esm/features/scope-features.shared.schemas.js.map +1 -1
  350. package/dist/esm/features/user-features.shared.resources-config.schemas.d.ts.map +1 -1
  351. package/dist/esm/features/user-features.shared.resources-config.schemas.js.map +1 -1
  352. package/dist/esm/files/file-remote-reference-link.shared.schemas.d.ts.map +1 -1
  353. package/dist/esm/files/file-remote-reference-link.shared.schemas.js.map +1 -1
  354. package/dist/esm/files/file-upload-grant.shared.schemas.d.ts.map +1 -1
  355. package/dist/esm/files/file-upload-grant.shared.schemas.js.map +1 -1
  356. package/dist/esm/files/files.shared.resources-config.schemas.d.ts.map +1 -1
  357. package/dist/esm/files/files.shared.resources-config.schemas.js.map +1 -1
  358. package/dist/esm/files/files.shared.schemas.d.ts.map +1 -1
  359. package/dist/esm/files/files.shared.schemas.js.map +1 -1
  360. package/dist/esm/files/files.shared.utils.d.ts.map +1 -1
  361. package/dist/esm/files/files.shared.utils.js.map +1 -1
  362. package/dist/esm/flows-actors/a2a-push-delivery-log.shared.resources-config.schemas.d.ts.map +1 -1
  363. package/dist/esm/flows-actors/a2a-push-delivery-log.shared.resources-config.schemas.js.map +1 -1
  364. package/dist/esm/flows-actors/a2a-push-delivery-log.shared.schemas.d.ts.map +1 -1
  365. package/dist/esm/flows-actors/a2a-push-delivery-log.shared.schemas.js.map +1 -1
  366. package/dist/esm/flows-actors/a2a-token-budget-state.shared.resources-config.schemas.d.ts.map +1 -1
  367. package/dist/esm/flows-actors/a2a-token-budget-state.shared.resources-config.schemas.js.map +1 -1
  368. package/dist/esm/flows-actors/a2a-token-budget-state.shared.schemas.d.ts.map +1 -1
  369. package/dist/esm/flows-actors/a2a-token-budget-state.shared.schemas.js.map +1 -1
  370. package/dist/esm/flows-actors/actors.shared.schemas.d.ts.map +1 -1
  371. package/dist/esm/flows-actors/actors.shared.schemas.js.map +1 -1
  372. package/dist/esm/flows-actors/agent-traceability.shared.schemas.d.ts.map +1 -1
  373. package/dist/esm/flows-actors/agent-traceability.shared.schemas.js.map +1 -1
  374. package/dist/esm/flows-actors/agent-work-decisions.shared.resources-config.schemas.d.ts.map +1 -1
  375. package/dist/esm/flows-actors/agent-work-decisions.shared.resources-config.schemas.js.map +1 -1
  376. package/dist/esm/flows-actors/agent-work-decisions.shared.schemas.d.ts.map +1 -1
  377. package/dist/esm/flows-actors/agent-work-decisions.shared.schemas.js.map +1 -1
  378. package/dist/esm/flows-actors/agents.shared.schemas.d.ts.map +1 -1
  379. package/dist/esm/flows-actors/agents.shared.schemas.js.map +1 -1
  380. package/dist/esm/flows-actors/autonomous-agents.shared.schemas.d.ts.map +1 -1
  381. package/dist/esm/flows-actors/autonomous-agents.shared.schemas.js.map +1 -1
  382. package/dist/esm/flows-actors/deliberation.shared.schemas.d.ts +2 -1
  383. package/dist/esm/flows-actors/deliberation.shared.schemas.d.ts.map +1 -1
  384. package/dist/esm/flows-actors/deliberation.shared.schemas.js +2 -1
  385. package/dist/esm/flows-actors/deliberation.shared.schemas.js.map +1 -1
  386. package/dist/esm/flows-actors/execution-plan-readiness.shared.utils.d.ts.map +1 -1
  387. package/dist/esm/flows-actors/execution-plan-readiness.shared.utils.js.map +1 -1
  388. package/dist/esm/flows-actors/flows-actors-execution.shared.resources-config.schemas.d.ts.map +1 -1
  389. package/dist/esm/flows-actors/flows-actors-execution.shared.resources-config.schemas.js.map +1 -1
  390. package/dist/esm/flows-actors/flows-actors-execution.shared.schemas.d.ts.map +1 -1
  391. package/dist/esm/flows-actors/flows-actors-execution.shared.schemas.js.map +1 -1
  392. package/dist/esm/flows-actors/flows-actors-task.shared.resources-config.schemas.d.ts.map +1 -1
  393. package/dist/esm/flows-actors/flows-actors-task.shared.resources-config.schemas.js.map +1 -1
  394. package/dist/esm/flows-actors/flows-actors-task.shared.schemas.d.ts.map +1 -1
  395. package/dist/esm/flows-actors/flows-actors-task.shared.schemas.js.map +1 -1
  396. package/dist/esm/flows-actors/flows-actors.commons.shared.schemas.d.ts.map +1 -1
  397. package/dist/esm/flows-actors/flows-actors.commons.shared.schemas.js.map +1 -1
  398. package/dist/esm/flows-actors/flows-actors.configuration.shared.schemas.d.ts.map +1 -1
  399. package/dist/esm/flows-actors/flows-actors.configuration.shared.schemas.js.map +1 -1
  400. package/dist/esm/flows-actors/flows-actors.frontend.shared.schemas.d.ts.map +1 -1
  401. package/dist/esm/flows-actors/flows-actors.frontend.shared.schemas.js.map +1 -1
  402. package/dist/esm/flows-actors/flows-actors.io.shared.schemas.d.ts.map +1 -1
  403. package/dist/esm/flows-actors/flows-actors.io.shared.schemas.js.map +1 -1
  404. package/dist/esm/flows-actors/flows-actors.system.shared.definitions.d.ts.map +1 -1
  405. package/dist/esm/flows-actors/flows-actors.system.shared.definitions.js.map +1 -1
  406. package/dist/esm/flows-actors/flows-actors.system.shared.schemas.d.ts.map +1 -1
  407. package/dist/esm/flows-actors/flows-actors.system.shared.schemas.js.map +1 -1
  408. package/dist/esm/flows-actors/flows.shared.schemas.d.ts.map +1 -1
  409. package/dist/esm/flows-actors/flows.shared.schemas.js.map +1 -1
  410. package/dist/esm/flows-actors/human-decision.shared.schemas.d.ts.map +1 -1
  411. package/dist/esm/flows-actors/human-decision.shared.schemas.js.map +1 -1
  412. package/dist/esm/flows-actors/mcp-servers.shared.schemas.d.ts.map +1 -1
  413. package/dist/esm/flows-actors/mcp-servers.shared.schemas.js.map +1 -1
  414. package/dist/esm/flows-actors/model-call-attributions.shared.resources-config.schemas.d.ts.map +1 -1
  415. package/dist/esm/flows-actors/model-call-attributions.shared.resources-config.schemas.js.map +1 -1
  416. package/dist/esm/flows-actors/model-call-attributions.shared.schemas.d.ts.map +1 -1
  417. package/dist/esm/flows-actors/model-call-attributions.shared.schemas.js.map +1 -1
  418. package/dist/esm/flows-actors/model-cost-period-aggregates.shared.resources-config.schemas.d.ts.map +1 -1
  419. package/dist/esm/flows-actors/model-cost-period-aggregates.shared.resources-config.schemas.js.map +1 -1
  420. package/dist/esm/flows-actors/model-cost-period-aggregates.shared.schemas.d.ts.map +1 -1
  421. package/dist/esm/flows-actors/model-cost-period-aggregates.shared.schemas.js.map +1 -1
  422. package/dist/esm/flows-actors/model-cost-summary.shared.schemas.d.ts.map +1 -1
  423. package/dist/esm/flows-actors/model-cost-summary.shared.schemas.js.map +1 -1
  424. package/dist/esm/flows-actors/prompt-ir.shared.schemas.d.ts.map +1 -1
  425. package/dist/esm/flows-actors/prompt-ir.shared.schemas.js.map +1 -1
  426. package/dist/esm/flows-actors/provider-call-records.shared.resources-config.schemas.d.ts.map +1 -1
  427. package/dist/esm/flows-actors/provider-call-records.shared.resources-config.schemas.js.map +1 -1
  428. package/dist/esm/flows-actors/provider-call-records.shared.schemas.d.ts.map +1 -1
  429. package/dist/esm/flows-actors/provider-call-records.shared.schemas.js.map +1 -1
  430. package/dist/esm/flows-actors/review-deadlines.shared.schemas.d.ts.map +1 -1
  431. package/dist/esm/flows-actors/review-deadlines.shared.schemas.js.map +1 -1
  432. package/dist/esm/flows-actors/tasks.actors.shared.schemas.d.ts.map +1 -1
  433. package/dist/esm/flows-actors/tasks.actors.shared.schemas.js.map +1 -1
  434. package/dist/esm/flows-actors/work-attribution.shared.schemas.d.ts.map +1 -1
  435. package/dist/esm/flows-actors/work-attribution.shared.schemas.js.map +1 -1
  436. package/dist/esm/frontend-definitions/frontend-notification-custom-message-ref.definitions.d.ts.map +1 -1
  437. package/dist/esm/frontend-definitions/frontend-notification-custom-message-ref.definitions.js.map +1 -1
  438. package/dist/esm/frontend-definitions/settings-destination-ref.definitions.d.ts.map +1 -1
  439. package/dist/esm/frontend-definitions/settings-destination-ref.definitions.js.map +1 -1
  440. package/dist/esm/guidance/guidance-flow.shared.schemas.d.ts.map +1 -1
  441. package/dist/esm/guidance/guidance-flow.shared.schemas.js.map +1 -1
  442. package/dist/esm/guidance/guidance-state.shared.resources-config.schemas.d.ts.map +1 -1
  443. package/dist/esm/guidance/guidance-state.shared.resources-config.schemas.js.map +1 -1
  444. package/dist/esm/guidance/guidance-state.shared.schemas.d.ts.map +1 -1
  445. package/dist/esm/guidance/guidance-state.shared.schemas.js.map +1 -1
  446. package/dist/esm/guidance/guidance-state.shared.utils.d.ts.map +1 -1
  447. package/dist/esm/guidance/guidance-state.shared.utils.js.map +1 -1
  448. package/dist/esm/guidance/lifecycle-config.shared.schemas.d.ts +2 -2
  449. package/dist/esm/guidance/lifecycle-config.shared.schemas.d.ts.map +1 -1
  450. package/dist/esm/guidance/lifecycle-config.shared.schemas.js.map +1 -1
  451. package/dist/esm/guidance/lifecycle-state.shared.resources-config.schemas.d.ts.map +1 -1
  452. package/dist/esm/guidance/lifecycle-state.shared.resources-config.schemas.js.map +1 -1
  453. package/dist/esm/guidance/lifecycle-state.shared.schemas.d.ts.map +1 -1
  454. package/dist/esm/guidance/lifecycle-state.shared.schemas.js.map +1 -1
  455. package/dist/esm/guidance/milestone-builders.shared.d.ts.map +1 -1
  456. package/dist/esm/guidance/milestone-builders.shared.js.map +1 -1
  457. package/dist/esm/guidance/milestone-definition.shared.schemas.d.ts.map +1 -1
  458. package/dist/esm/guidance/milestone-definition.shared.schemas.js.map +1 -1
  459. package/dist/esm/guidance/progression-presentation.shared.schemas.d.ts.map +1 -1
  460. package/dist/esm/guidance/progression-presentation.shared.schemas.js.map +1 -1
  461. package/dist/esm/guidance/progression-state.shared.resources-config.schemas.d.ts.map +1 -1
  462. package/dist/esm/guidance/progression-state.shared.resources-config.schemas.js.map +1 -1
  463. package/dist/esm/guidance/progression-state.shared.schemas.d.ts.map +1 -1
  464. package/dist/esm/guidance/progression-state.shared.schemas.js.map +1 -1
  465. package/dist/esm/http-api-binding/http-api-binding-id.shared.utils.d.ts.map +1 -1
  466. package/dist/esm/http-api-binding/http-api-binding-id.shared.utils.js.map +1 -1
  467. package/dist/esm/http-api-binding/http-api-binding.shared.schemas.d.ts.map +1 -1
  468. package/dist/esm/http-api-binding/http-api-binding.shared.schemas.js.map +1 -1
  469. package/dist/esm/http-api-binding/http-api-erasure-stance.shared.d.ts.map +1 -1
  470. package/dist/esm/http-api-binding/http-api-erasure-stance.shared.js.map +1 -1
  471. package/dist/esm/http-api-binding/http-api-rest-write-operations.shared.schemas.d.ts.map +1 -1
  472. package/dist/esm/http-api-binding/http-api-rest-write-operations.shared.schemas.js.map +1 -1
  473. package/dist/esm/http-api-binding/http-api-transport-dialect.shared.d.ts.map +1 -1
  474. package/dist/esm/http-api-binding/http-api-transport-dialect.shared.js.map +1 -1
  475. package/dist/esm/http-api-binding/read-through-engine-anchors.shared.d.ts.map +1 -1
  476. package/dist/esm/http-api-binding/read-through-engine-anchors.shared.js.map +1 -1
  477. package/dist/esm/i18n/application-config-vocabulary.shared.d.ts.map +1 -1
  478. package/dist/esm/i18n/application-config-vocabulary.shared.js.map +1 -1
  479. package/dist/esm/i18n/engine-open-vocabulary-values.shared.d.ts.map +1 -1
  480. package/dist/esm/i18n/engine-open-vocabulary-values.shared.js.map +1 -1
  481. package/dist/esm/i18n/engine-open-vocabulary.shared.d.ts.map +1 -1
  482. package/dist/esm/i18n/engine-open-vocabulary.shared.js.map +1 -1
  483. package/dist/esm/i18n/interpolate-label-params.shared.utils.d.ts.map +1 -1
  484. package/dist/esm/i18n/interpolate-label-params.shared.utils.js.map +1 -1
  485. package/dist/esm/i18n/labelling.dto.shared.schemas.d.ts.map +1 -1
  486. package/dist/esm/i18n/labelling.dto.shared.schemas.js.map +1 -1
  487. package/dist/esm/inbound/conversation-threads.shared.resources-config.schemas.d.ts.map +1 -1
  488. package/dist/esm/inbound/conversation-threads.shared.resources-config.schemas.js.map +1 -1
  489. package/dist/esm/inbound/conversation-threads.shared.schemas.d.ts.map +1 -1
  490. package/dist/esm/inbound/conversation-threads.shared.schemas.js.map +1 -1
  491. package/dist/esm/inbound/inbound-channels.shared.schemas.d.ts.map +1 -1
  492. package/dist/esm/inbound/inbound-channels.shared.schemas.js.map +1 -1
  493. package/dist/esm/inbound/inbound-delivery.shared.resources-config.schemas.d.ts.map +1 -1
  494. package/dist/esm/inbound/inbound-delivery.shared.resources-config.schemas.js.map +1 -1
  495. package/dist/esm/inbound/inbound-delivery.shared.schemas.d.ts.map +1 -1
  496. package/dist/esm/inbound/inbound-delivery.shared.schemas.js.map +1 -1
  497. package/dist/esm/inbound/inbound-endpoint-env.shared.d.ts.map +1 -1
  498. package/dist/esm/inbound/inbound-endpoint-env.shared.js.map +1 -1
  499. package/dist/esm/index.d.ts +5 -0
  500. package/dist/esm/index.d.ts.map +1 -1
  501. package/dist/esm/index.js +5 -0
  502. package/dist/esm/index.js.map +1 -1
  503. package/dist/esm/meta-workflows/actions.meta-workflows.shared.schemas.d.ts.map +1 -1
  504. package/dist/esm/meta-workflows/actions.meta-workflows.shared.schemas.js.map +1 -1
  505. package/dist/esm/meta-workflows/catalog.meta-workflows.shared.schemas.d.ts.map +1 -1
  506. package/dist/esm/meta-workflows/catalog.meta-workflows.shared.schemas.js.map +1 -1
  507. package/dist/esm/meta-workflows/coding-tasks.meta-workflows.shared.schemas.d.ts.map +1 -1
  508. package/dist/esm/meta-workflows/coding-tasks.meta-workflows.shared.schemas.js.map +1 -1
  509. package/dist/esm/meta-workflows/context-selection.meta-workflows.shared.schemas.d.ts.map +1 -1
  510. package/dist/esm/meta-workflows/context-selection.meta-workflows.shared.schemas.js.map +1 -1
  511. package/dist/esm/meta-workflows/decisions.meta-workflows.shared.schemas.d.ts.map +1 -1
  512. package/dist/esm/meta-workflows/decisions.meta-workflows.shared.schemas.js.map +1 -1
  513. package/dist/esm/meta-workflows/elicitation-depth.meta-workflows.shared.schemas.d.ts.map +1 -1
  514. package/dist/esm/meta-workflows/elicitation-depth.meta-workflows.shared.schemas.js.map +1 -1
  515. package/dist/esm/meta-workflows/orchestration.meta-workflows.shared.schemas.d.ts +13 -1
  516. package/dist/esm/meta-workflows/orchestration.meta-workflows.shared.schemas.d.ts.map +1 -1
  517. package/dist/esm/meta-workflows/orchestration.meta-workflows.shared.schemas.js +21 -1
  518. package/dist/esm/meta-workflows/orchestration.meta-workflows.shared.schemas.js.map +1 -1
  519. package/dist/esm/meta-workflows/portable-primitives.meta-workflows.shared.schemas.d.ts.map +1 -1
  520. package/dist/esm/meta-workflows/portable-primitives.meta-workflows.shared.schemas.js.map +1 -1
  521. package/dist/esm/meta-workflows.exports.d.ts.map +1 -1
  522. package/dist/esm/meta-workflows.exports.js.map +1 -1
  523. package/dist/esm/monitoring/monitoring.shared.schemas.d.ts.map +1 -1
  524. package/dist/esm/monitoring/monitoring.shared.schemas.js.map +1 -1
  525. package/dist/esm/notifications/email/email-context.shared.schemas.d.ts.map +1 -1
  526. package/dist/esm/notifications/email/email-context.shared.schemas.js.map +1 -1
  527. package/dist/esm/notifications/email/email-submission.shared.enums.d.ts.map +1 -1
  528. package/dist/esm/notifications/email/email-submission.shared.enums.js.map +1 -1
  529. package/dist/esm/notifications/email/email-template-registry.shared.schemas.d.ts.map +1 -1
  530. package/dist/esm/notifications/email/email-template-registry.shared.schemas.js.map +1 -1
  531. package/dist/esm/notifications/email/email-template.shared.enums.d.ts.map +1 -1
  532. package/dist/esm/notifications/email/email-template.shared.enums.js.map +1 -1
  533. package/dist/esm/notifications/inbound-email/inbound-email.shared.resources-config.schemas.d.ts.map +1 -1
  534. package/dist/esm/notifications/inbound-email/inbound-email.shared.resources-config.schemas.js.map +1 -1
  535. package/dist/esm/notifications/inbound-email/inbound-email.shared.schemas.d.ts.map +1 -1
  536. package/dist/esm/notifications/inbound-email/inbound-email.shared.schemas.js.map +1 -1
  537. package/dist/esm/notifications/m2m/m2m-webhook-delivery-contract.shared.d.ts.map +1 -1
  538. package/dist/esm/notifications/m2m/m2m-webhook-delivery-contract.shared.js.map +1 -1
  539. package/dist/esm/notifications/m2m/m2m-webhook-delivery-log.shared.resources-config.schemas.d.ts.map +1 -1
  540. package/dist/esm/notifications/m2m/m2m-webhook-delivery-log.shared.resources-config.schemas.js.map +1 -1
  541. package/dist/esm/notifications/m2m/m2m-webhook-delivery-log.shared.schemas.d.ts.map +1 -1
  542. package/dist/esm/notifications/m2m/m2m-webhook-delivery-log.shared.schemas.js.map +1 -1
  543. package/dist/esm/notifications/m2m/webhook-config.shared.resources-config.schemas.d.ts.map +1 -1
  544. package/dist/esm/notifications/m2m/webhook-config.shared.resources-config.schemas.js.map +1 -1
  545. package/dist/esm/notifications/m2m/webhook-config.shared.schemas.d.ts.map +1 -1
  546. package/dist/esm/notifications/m2m/webhook-config.shared.schemas.js.map +1 -1
  547. package/dist/esm/notifications/notification-badges.core.definitions.d.ts.map +1 -1
  548. package/dist/esm/notifications/notification-badges.core.definitions.js.map +1 -1
  549. package/dist/esm/notifications/notification-badges.schemas.d.ts.map +1 -1
  550. package/dist/esm/notifications/notification-badges.schemas.js.map +1 -1
  551. package/dist/esm/notifications/notification-badges.shared.resources-config.schemas.d.ts.map +1 -1
  552. package/dist/esm/notifications/notification-badges.shared.resources-config.schemas.js.map +1 -1
  553. package/dist/esm/notifications/notifications.shared.schemas.d.ts +5 -3
  554. package/dist/esm/notifications/notifications.shared.schemas.d.ts.map +1 -1
  555. package/dist/esm/notifications/notifications.shared.schemas.js +5 -3
  556. package/dist/esm/notifications/notifications.shared.schemas.js.map +1 -1
  557. package/dist/esm/organizations/application-owner-organization.shared.schemas.d.ts.map +1 -1
  558. package/dist/esm/organizations/application-owner-organization.shared.schemas.js.map +1 -1
  559. package/dist/esm/organizations/organization-features.shared.resources-config.schemas.d.ts.map +1 -1
  560. package/dist/esm/organizations/organization-features.shared.resources-config.schemas.js.map +1 -1
  561. package/dist/esm/organizations/organization-features.shared.schemas.d.ts.map +1 -1
  562. package/dist/esm/organizations/organization-features.shared.schemas.js.map +1 -1
  563. package/dist/esm/organizations/organization-members.shared.resources-config.schemas.d.ts.map +1 -1
  564. package/dist/esm/organizations/organization-members.shared.resources-config.schemas.js.map +1 -1
  565. package/dist/esm/organizations/organization-members.shared.schemas.d.ts.map +1 -1
  566. package/dist/esm/organizations/organization-members.shared.schemas.js.map +1 -1
  567. package/dist/esm/organizations/organization-notifications.shared.resources-config.schemas.d.ts.map +1 -1
  568. package/dist/esm/organizations/organization-notifications.shared.resources-config.schemas.js.map +1 -1
  569. package/dist/esm/organizations/organization-notifications.shared.schemas.d.ts.map +1 -1
  570. package/dist/esm/organizations/organization-notifications.shared.schemas.js.map +1 -1
  571. package/dist/esm/organizations/organization-preferences.shared.resources-config.schemas.d.ts.map +1 -1
  572. package/dist/esm/organizations/organization-preferences.shared.resources-config.schemas.js.map +1 -1
  573. package/dist/esm/organizations/organization-preferences.shared.schemas.d.ts.map +1 -1
  574. package/dist/esm/organizations/organization-preferences.shared.schemas.js.map +1 -1
  575. package/dist/esm/organizations/organization-profile.shared.resources-config.schemas.d.ts.map +1 -1
  576. package/dist/esm/organizations/organization-profile.shared.resources-config.schemas.js.map +1 -1
  577. package/dist/esm/organizations/organization-profile.shared.schemas.d.ts.map +1 -1
  578. package/dist/esm/organizations/organization-profile.shared.schemas.js.map +1 -1
  579. package/dist/esm/organizations/organization-unit-inheritance.shared.d.ts.map +1 -1
  580. package/dist/esm/organizations/organization-unit-inheritance.shared.js.map +1 -1
  581. package/dist/esm/organizations/organization-unit-members.shared.resources-config.schemas.d.ts.map +1 -1
  582. package/dist/esm/organizations/organization-unit-members.shared.resources-config.schemas.js.map +1 -1
  583. package/dist/esm/organizations/organization-unit-members.shared.schemas.d.ts.map +1 -1
  584. package/dist/esm/organizations/organization-unit-members.shared.schemas.js.map +1 -1
  585. package/dist/esm/organizations/organization-unit-narrowing-decision.shared.d.ts.map +1 -1
  586. package/dist/esm/organizations/organization-unit-narrowing-decision.shared.js.map +1 -1
  587. package/dist/esm/organizations/organization-unit-narrowing.example.d.ts.map +1 -1
  588. package/dist/esm/organizations/organization-unit-narrowing.example.js.map +1 -1
  589. package/dist/esm/organizations/organization-unit-narrowing.shared.d.ts.map +1 -1
  590. package/dist/esm/organizations/organization-unit-narrowing.shared.js.map +1 -1
  591. package/dist/esm/organizations/organization-units.shared.path.d.ts.map +1 -1
  592. package/dist/esm/organizations/organization-units.shared.path.js.map +1 -1
  593. package/dist/esm/organizations/organization-units.shared.resources-config.schemas.d.ts.map +1 -1
  594. package/dist/esm/organizations/organization-units.shared.resources-config.schemas.js.map +1 -1
  595. package/dist/esm/organizations/organization-units.shared.schemas.d.ts.map +1 -1
  596. package/dist/esm/organizations/organization-units.shared.schemas.js.map +1 -1
  597. package/dist/esm/organizations/organizations.shared.resources-config.schemas.d.ts.map +1 -1
  598. package/dist/esm/organizations/organizations.shared.resources-config.schemas.js.map +1 -1
  599. package/dist/esm/organizations/organizations.shared.schemas.d.ts.map +1 -1
  600. package/dist/esm/organizations/organizations.shared.schemas.js.map +1 -1
  601. package/dist/esm/organizations/service-provider-activity-feed.shared.resources-config.schemas.d.ts.map +1 -1
  602. package/dist/esm/organizations/service-provider-activity-feed.shared.resources-config.schemas.js.map +1 -1
  603. package/dist/esm/organizations/service-provider-activity-feed.shared.schemas.d.ts.map +1 -1
  604. package/dist/esm/organizations/service-provider-activity-feed.shared.schemas.js.map +1 -1
  605. package/dist/esm/organizations/service-provider-capability-grants.shared.resources-config.schemas.d.ts.map +1 -1
  606. package/dist/esm/organizations/service-provider-capability-grants.shared.resources-config.schemas.js.map +1 -1
  607. package/dist/esm/organizations/service-provider-capability-grants.shared.schemas.d.ts.map +1 -1
  608. package/dist/esm/organizations/service-provider-capability-grants.shared.schemas.js.map +1 -1
  609. package/dist/esm/organizations/service-provider-client-controls.shared.schemas.d.ts.map +1 -1
  610. package/dist/esm/organizations/service-provider-client-controls.shared.schemas.js.map +1 -1
  611. package/dist/esm/organizations/service-provider-relationships.shared.resources-config.schemas.d.ts.map +1 -1
  612. package/dist/esm/organizations/service-provider-relationships.shared.resources-config.schemas.js.map +1 -1
  613. package/dist/esm/organizations/service-provider-relationships.shared.schemas.d.ts.map +1 -1
  614. package/dist/esm/organizations/service-provider-relationships.shared.schemas.js.map +1 -1
  615. package/dist/esm/organizations/tenant-teardown-config.shared.schemas.d.ts.map +1 -1
  616. package/dist/esm/organizations/tenant-teardown-config.shared.schemas.js.map +1 -1
  617. package/dist/esm/provider-registration-runtime.exports.d.ts.map +1 -1
  618. package/dist/esm/provider-registration-runtime.exports.js.map +1 -1
  619. package/dist/esm/public-runtime/index.d.ts +13 -0
  620. package/dist/esm/public-runtime/index.d.ts.map +1 -1
  621. package/dist/esm/public-runtime/index.js +13 -0
  622. package/dist/esm/public-runtime/index.js.map +1 -1
  623. package/dist/esm/queue/jobs.shared.resources-config.schemas.d.ts.map +1 -1
  624. package/dist/esm/queue/jobs.shared.resources-config.schemas.js.map +1 -1
  625. package/dist/esm/queue/jobs.shared.schemas.d.ts +1 -1
  626. package/dist/esm/queue/jobs.shared.schemas.d.ts.map +1 -1
  627. package/dist/esm/queue/jobs.shared.schemas.js.map +1 -1
  628. package/dist/esm/queue/jobs.shared.utils.d.ts.map +1 -1
  629. package/dist/esm/queue/jobs.shared.utils.js.map +1 -1
  630. package/dist/esm/queue/queues.shared.schemas.d.ts.map +1 -1
  631. package/dist/esm/queue/queues.shared.schemas.js.map +1 -1
  632. package/dist/esm/queue/queues.shared.utils.d.ts.map +1 -1
  633. package/dist/esm/queue/queues.shared.utils.js.map +1 -1
  634. package/dist/esm/queue/rabbitmq-queue-args.shared.d.ts.map +1 -1
  635. package/dist/esm/queue/rabbitmq-queue-args.shared.js.map +1 -1
  636. package/dist/esm/rag/rag-retrieval-health.shared.d.ts.map +1 -1
  637. package/dist/esm/rag/rag-retrieval-health.shared.js.map +1 -1
  638. package/dist/esm/requests/header-keys.shared.d.ts.map +1 -1
  639. package/dist/esm/requests/header-keys.shared.js.map +1 -1
  640. package/dist/esm/requests/http-requests.shared.d.ts.map +1 -1
  641. package/dist/esm/requests/http-requests.shared.js.map +1 -1
  642. package/dist/esm/requests/idempotency-key.shared.d.ts.map +1 -1
  643. package/dist/esm/requests/idempotency-key.shared.js.map +1 -1
  644. package/dist/esm/requests/manual-controllers-routes-documentation.d.ts.map +1 -1
  645. package/dist/esm/requests/manual-controllers-routes-documentation.js.map +1 -1
  646. package/dist/esm/requests/manual-controllers-routes-urls.d.ts.map +1 -1
  647. package/dist/esm/requests/manual-controllers-routes-urls.js.map +1 -1
  648. package/dist/esm/requests/rate-limits.shared.schemas.d.ts.map +1 -1
  649. package/dist/esm/requests/rate-limits.shared.schemas.js.map +1 -1
  650. package/dist/esm/requests/websocket.shared.schemas.d.ts +2 -2
  651. package/dist/esm/requests/websocket.shared.schemas.d.ts.map +1 -1
  652. package/dist/esm/requests/websocket.shared.schemas.js.map +1 -1
  653. package/dist/esm/resources/child-operations.shared.schemas.d.ts.map +1 -1
  654. package/dist/esm/resources/child-operations.shared.schemas.js.map +1 -1
  655. package/dist/esm/resources/collection-query-parameters.shared.d.ts.map +1 -1
  656. package/dist/esm/resources/collection-query-parameters.shared.js.map +1 -1
  657. package/dist/esm/resources/context-policy.shared.schemas.d.ts.map +1 -1
  658. package/dist/esm/resources/context-policy.shared.schemas.js.map +1 -1
  659. package/dist/esm/resources/embedded-resource-mark.shared.utils.d.ts.map +1 -1
  660. package/dist/esm/resources/embedded-resource-mark.shared.utils.js.map +1 -1
  661. package/dist/esm/resources/relationship-display.shared.schemas.d.ts.map +1 -1
  662. package/dist/esm/resources/relationship-display.shared.schemas.js.map +1 -1
  663. package/dist/esm/resources/resource-status-lifecycle.example.d.ts +100 -0
  664. package/dist/esm/resources/resource-status-lifecycle.example.d.ts.map +1 -0
  665. package/dist/esm/resources/resource-status-lifecycle.example.js +156 -0
  666. package/dist/esm/resources/resource-status-lifecycle.example.js.map +1 -0
  667. package/dist/esm/resources/resources-config.shared.factory.d.ts +25 -1
  668. package/dist/esm/resources/resources-config.shared.factory.d.ts.map +1 -1
  669. package/dist/esm/resources/resources-config.shared.factory.js +31 -8
  670. package/dist/esm/resources/resources-config.shared.factory.js.map +1 -1
  671. package/dist/esm/resources/resources-config.shared.schemas.d.ts +33 -0
  672. package/dist/esm/resources/resources-config.shared.schemas.d.ts.map +1 -1
  673. package/dist/esm/resources/resources-config.shared.schemas.js.map +1 -1
  674. package/dist/esm/resources/resources-registry.shared.core.definitions.d.ts.map +1 -1
  675. package/dist/esm/resources/resources-registry.shared.core.definitions.js.map +1 -1
  676. package/dist/esm/resources/resources-relationships.shared.factory.d.ts.map +1 -1
  677. package/dist/esm/resources/resources-relationships.shared.factory.js.map +1 -1
  678. package/dist/esm/resources/resources-serialization.shared.schemas.d.ts.map +1 -1
  679. package/dist/esm/resources/resources-serialization.shared.schemas.js.map +1 -1
  680. package/dist/esm/resources/resources.shared.core.definitions.d.ts.map +1 -1
  681. package/dist/esm/resources/resources.shared.core.definitions.js.map +1 -1
  682. package/dist/esm/resources/resources.shared.schemas.d.ts.map +1 -1
  683. package/dist/esm/resources/resources.shared.schemas.js.map +1 -1
  684. package/dist/esm/resources/resources.shared.utils.d.ts.map +1 -1
  685. package/dist/esm/resources/resources.shared.utils.js.map +1 -1
  686. package/dist/esm/resources/utils/collection-export.shared.utils.d.ts.map +1 -1
  687. package/dist/esm/resources/utils/collection-export.shared.utils.js.map +1 -1
  688. package/dist/esm/resources/utils/composition-cascade-deletability.validation.d.ts.map +1 -1
  689. package/dist/esm/resources/utils/composition-cascade-deletability.validation.js.map +1 -1
  690. package/dist/esm/resources/utils/composition-seedability.validation.d.ts.map +1 -1
  691. package/dist/esm/resources/utils/composition-seedability.validation.js.map +1 -1
  692. package/dist/esm/resources/utils/context-addressed-composition-singleton.shared.utils.d.ts.map +1 -1
  693. package/dist/esm/resources/utils/context-addressed-composition-singleton.shared.utils.js.map +1 -1
  694. package/dist/esm/resources/utils/dependent-lifecycle-classification.validation.d.ts.map +1 -1
  695. package/dist/esm/resources/utils/dependent-lifecycle-classification.validation.js.map +1 -1
  696. package/dist/esm/resources/utils/duplicate-relationship-registration.validation.d.ts.map +1 -1
  697. package/dist/esm/resources/utils/duplicate-relationship-registration.validation.js.map +1 -1
  698. package/dist/esm/resources/utils/field-value-disclosure.utils.d.ts.map +1 -1
  699. package/dist/esm/resources/utils/field-value-disclosure.utils.js.map +1 -1
  700. package/dist/esm/resources/utils/http-api-write-declaration.shared.utils.d.ts.map +1 -1
  701. package/dist/esm/resources/utils/http-api-write-declaration.shared.utils.js.map +1 -1
  702. package/dist/esm/resources/utils/initiator-stamped-field-satisfiability.validation.d.ts.map +1 -1
  703. package/dist/esm/resources/utils/initiator-stamped-field-satisfiability.validation.js.map +1 -1
  704. package/dist/esm/resources/utils/no-subject-data-stance-coherence.shared.utils.d.ts.map +1 -1
  705. package/dist/esm/resources/utils/no-subject-data-stance-coherence.shared.utils.js.map +1 -1
  706. package/dist/esm/resources/utils/persistence-adapter-discrimination.shared.utils.d.ts.map +1 -1
  707. package/dist/esm/resources/utils/persistence-adapter-discrimination.shared.utils.js.map +1 -1
  708. package/dist/esm/resources/utils/populated-file-fields.shared.utils.d.ts.map +1 -1
  709. package/dist/esm/resources/utils/populated-file-fields.shared.utils.js.map +1 -1
  710. package/dist/esm/resources/utils/repository-dto-builder.utils.d.ts.map +1 -1
  711. package/dist/esm/resources/utils/repository-dto-builder.utils.js.map +1 -1
  712. package/dist/esm/resources/utils/request-schema-field-carriage.shared.utils.d.ts.map +1 -1
  713. package/dist/esm/resources/utils/request-schema-field-carriage.shared.utils.js.map +1 -1
  714. package/dist/esm/resources/utils/required-fk-fillability.validation.d.ts.map +1 -1
  715. package/dist/esm/resources/utils/required-fk-fillability.validation.js.map +1 -1
  716. package/dist/esm/resources/utils/resource-operation-type-guards.utils.d.ts.map +1 -1
  717. package/dist/esm/resources/utils/resource-operation-type-guards.utils.js.map +1 -1
  718. package/dist/esm/resources/utils/resource-polymorphism.factory.d.ts.map +1 -1
  719. package/dist/esm/resources/utils/resource-polymorphism.factory.js.map +1 -1
  720. package/dist/esm/resources/utils/resource-polymorphism.relationships.d.ts.map +1 -1
  721. package/dist/esm/resources/utils/resource-polymorphism.relationships.js.map +1 -1
  722. package/dist/esm/resources/utils/resource-polymorphism.schemas.d.ts.map +1 -1
  723. package/dist/esm/resources/utils/resource-polymorphism.schemas.js.map +1 -1
  724. package/dist/esm/resources/utils/resource-polymorphism.utils.d.ts.map +1 -1
  725. package/dist/esm/resources/utils/resource-polymorphism.utils.js.map +1 -1
  726. package/dist/esm/resources/utils/resource-subtree.utils.d.ts.map +1 -1
  727. package/dist/esm/resources/utils/resource-subtree.utils.js.map +1 -1
  728. package/dist/esm/resources/utils/resources-config-context-needs.utils.d.ts.map +1 -1
  729. package/dist/esm/resources/utils/resources-config-context-needs.utils.js.map +1 -1
  730. package/dist/esm/resources/utils/resources-config-naming.utils.d.ts.map +1 -1
  731. package/dist/esm/resources/utils/resources-config-naming.utils.js.map +1 -1
  732. package/dist/esm/resources/utils/resources-config-operations.dtos-builder.utils.d.ts.map +1 -1
  733. package/dist/esm/resources/utils/resources-config-operations.dtos-builder.utils.js.map +1 -1
  734. package/dist/esm/resources/utils/resources-config-operations.path.utils.d.ts.map +1 -1
  735. package/dist/esm/resources/utils/resources-config-operations.path.utils.js.map +1 -1
  736. package/dist/esm/resources/utils/resources-config-operations.urls-builder.utils.d.ts.map +1 -1
  737. package/dist/esm/resources/utils/resources-config-operations.urls-builder.utils.js.map +1 -1
  738. package/dist/esm/resources/utils/resources-config-operations.utils.d.ts.map +1 -1
  739. package/dist/esm/resources/utils/resources-config-operations.utils.js.map +1 -1
  740. package/dist/esm/resources/utils/resources-serialization.utils.d.ts.map +1 -1
  741. package/dist/esm/resources/utils/resources-serialization.utils.js.map +1 -1
  742. package/dist/esm/resources/utils/resources-summary.utils.d.ts.map +1 -1
  743. package/dist/esm/resources/utils/resources-summary.utils.js.map +1 -1
  744. package/dist/esm/resources/utils/schema-family-builder.utils.d.ts.map +1 -1
  745. package/dist/esm/resources/utils/schema-family-builder.utils.js.map +1 -1
  746. package/dist/esm/resources/utils/schema-type-inference.utils.d.ts.map +1 -1
  747. package/dist/esm/resources/utils/schema-type-inference.utils.js.map +1 -1
  748. package/dist/esm/resources/utils/schema-type-utils.d.ts.map +1 -1
  749. package/dist/esm/resources/utils/schema-type-utils.js.map +1 -1
  750. package/dist/esm/resources/utils/schema-variant-resolver.utils.d.ts.map +1 -1
  751. package/dist/esm/resources/utils/schema-variant-resolver.utils.js.map +1 -1
  752. package/dist/esm/resources/utils/shared-persistence-collection.utils.d.ts.map +1 -1
  753. package/dist/esm/resources/utils/shared-persistence-collection.utils.js.map +1 -1
  754. package/dist/esm/resources/utils/templatable-file-fields.shared.utils.d.ts.map +1 -1
  755. package/dist/esm/resources/utils/templatable-file-fields.shared.utils.js.map +1 -1
  756. package/dist/esm/resources/work-unit.shared.schemas.d.ts.map +1 -1
  757. package/dist/esm/resources/work-unit.shared.schemas.js.map +1 -1
  758. package/dist/esm/runtime/domain-module.shared.definitions.d.ts.map +1 -1
  759. package/dist/esm/runtime/domain-module.shared.definitions.js.map +1 -1
  760. package/dist/esm/runtime/execution-context.shared.schemas.d.ts.map +1 -1
  761. package/dist/esm/runtime/execution-context.shared.schemas.js.map +1 -1
  762. package/dist/esm/runtime/runtime.shared.schemas.d.ts.map +1 -1
  763. package/dist/esm/runtime/runtime.shared.schemas.js.map +1 -1
  764. package/dist/esm/security/api-keys/api-keys-application.shared.resources-config.schemas.d.ts.map +1 -1
  765. package/dist/esm/security/api-keys/api-keys-application.shared.resources-config.schemas.js.map +1 -1
  766. package/dist/esm/security/api-keys/api-keys-organization.shared.resources-config.schemas.d.ts.map +1 -1
  767. package/dist/esm/security/api-keys/api-keys-organization.shared.resources-config.schemas.js.map +1 -1
  768. package/dist/esm/security/api-keys/api-keys.shared.schemas.d.ts.map +1 -1
  769. package/dist/esm/security/api-keys/api-keys.shared.schemas.js.map +1 -1
  770. package/dist/esm/security/authentications/anonymous-session/anonymous-session.shared.contract.d.ts.map +1 -1
  771. package/dist/esm/security/authentications/anonymous-session/anonymous-session.shared.contract.js.map +1 -1
  772. package/dist/esm/security/authentications/authentication.shared.dto.schemas.d.ts.map +1 -1
  773. package/dist/esm/security/authentications/authentication.shared.dto.schemas.js.map +1 -1
  774. package/dist/esm/security/authentications/authentication.shared.schemas.d.ts.map +1 -1
  775. package/dist/esm/security/authentications/authentication.shared.schemas.js.map +1 -1
  776. package/dist/esm/security/authentications/authentication.shared.utils.d.ts.map +1 -1
  777. package/dist/esm/security/authentications/authentication.shared.utils.js.map +1 -1
  778. package/dist/esm/security/authentications/consumable-token.shared.schemas.d.ts.map +1 -1
  779. package/dist/esm/security/authentications/consumable-token.shared.schemas.js.map +1 -1
  780. package/dist/esm/security/authentications/cross-frontend-handoff.shared.dto.schemas.d.ts.map +1 -1
  781. package/dist/esm/security/authentications/cross-frontend-handoff.shared.dto.schemas.js.map +1 -1
  782. package/dist/esm/security/authentications/mfa-backup-code-contract.shared.d.ts.map +1 -1
  783. package/dist/esm/security/authentications/mfa-backup-code-contract.shared.js.map +1 -1
  784. package/dist/esm/security/authentications/password-blocklist.shared.utils.d.ts.map +1 -1
  785. package/dist/esm/security/authentications/password-blocklist.shared.utils.js.map +1 -1
  786. package/dist/esm/security/authentications/password-reset.shared.dto.schemas.d.ts.map +1 -1
  787. package/dist/esm/security/authentications/password-reset.shared.dto.schemas.js.map +1 -1
  788. package/dist/esm/security/authentications/registration.shared.dto.schemas.d.ts.map +1 -1
  789. package/dist/esm/security/authentications/registration.shared.dto.schemas.js.map +1 -1
  790. package/dist/esm/security/authentications/same-origin-redirect-path.shared.d.ts.map +1 -1
  791. package/dist/esm/security/authentications/same-origin-redirect-path.shared.js.map +1 -1
  792. package/dist/esm/security/authentications/scim/scim-organization-unit-mapping.shared.d.ts.map +1 -1
  793. package/dist/esm/security/authentications/scim/scim-organization-unit-mapping.shared.js.map +1 -1
  794. package/dist/esm/security/authentications/scim/scim-provisioning-config.shared.resources-config.schemas.d.ts.map +1 -1
  795. package/dist/esm/security/authentications/scim/scim-provisioning-config.shared.resources-config.schemas.js.map +1 -1
  796. package/dist/esm/security/authentications/scim/scim-provisioning-config.shared.schemas.d.ts.map +1 -1
  797. package/dist/esm/security/authentications/scim/scim-provisioning-config.shared.schemas.js.map +1 -1
  798. package/dist/esm/security/authentications/scim/scim-tokens.shared.resources-config.schemas.d.ts.map +1 -1
  799. package/dist/esm/security/authentications/scim/scim-tokens.shared.resources-config.schemas.js.map +1 -1
  800. package/dist/esm/security/authentications/scim/scim-tokens.shared.schemas.d.ts.map +1 -1
  801. package/dist/esm/security/authentications/scim/scim-tokens.shared.schemas.js.map +1 -1
  802. package/dist/esm/security/authentications/service-provider-client-authentication.shared.schemas.d.ts.map +1 -1
  803. package/dist/esm/security/authentications/service-provider-client-authentication.shared.schemas.js.map +1 -1
  804. package/dist/esm/security/authentications/siem/siem-delivery-dlq.shared.resources-config.schemas.d.ts.map +1 -1
  805. package/dist/esm/security/authentications/siem/siem-delivery-dlq.shared.resources-config.schemas.js.map +1 -1
  806. package/dist/esm/security/authentications/siem/siem-delivery-dlq.shared.schemas.d.ts.map +1 -1
  807. package/dist/esm/security/authentications/siem/siem-delivery-dlq.shared.schemas.js.map +1 -1
  808. package/dist/esm/security/authentications/siem/siem-delivery-outbox.shared.resources-config.schemas.d.ts.map +1 -1
  809. package/dist/esm/security/authentications/siem/siem-delivery-outbox.shared.resources-config.schemas.js.map +1 -1
  810. package/dist/esm/security/authentications/siem/siem-delivery-outbox.shared.schemas.d.ts.map +1 -1
  811. package/dist/esm/security/authentications/siem/siem-delivery-outbox.shared.schemas.js.map +1 -1
  812. package/dist/esm/security/authentications/siem/siem-delivery-reliability-contract.shared.d.ts.map +1 -1
  813. package/dist/esm/security/authentications/siem/siem-delivery-reliability-contract.shared.js.map +1 -1
  814. package/dist/esm/security/authentications/siem/siem-export-config.shared.resources-config.schemas.d.ts.map +1 -1
  815. package/dist/esm/security/authentications/siem/siem-export-config.shared.resources-config.schemas.js.map +1 -1
  816. package/dist/esm/security/authentications/siem/siem-export-config.shared.schemas.d.ts.map +1 -1
  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.map +1 -1
  819. package/dist/esm/security/authentications/sso/sso-config.shared.resources-config.schemas.js.map +1 -1
  820. package/dist/esm/security/authentications/sso/sso-config.shared.schemas.d.ts.map +1 -1
  821. package/dist/esm/security/authentications/sso/sso-config.shared.schemas.js.map +1 -1
  822. package/dist/esm/security/authentications/sso/sso-connection.shared.resources-config.schemas.d.ts.map +1 -1
  823. package/dist/esm/security/authentications/sso/sso-connection.shared.resources-config.schemas.js.map +1 -1
  824. package/dist/esm/security/authentications/sso/sso-connection.shared.schemas.d.ts.map +1 -1
  825. package/dist/esm/security/authentications/sso/sso-connection.shared.schemas.js.map +1 -1
  826. package/dist/esm/security/authorizations/administrative-continuity.shared.schemas.d.ts.map +1 -1
  827. package/dist/esm/security/authorizations/administrative-continuity.shared.schemas.js.map +1 -1
  828. package/dist/esm/security/authorizations/application-access-grants.shared.resources-config.schemas.d.ts.map +1 -1
  829. package/dist/esm/security/authorizations/application-access-grants.shared.resources-config.schemas.js.map +1 -1
  830. package/dist/esm/security/authorizations/application-access-grants.shared.schemas.d.ts.map +1 -1
  831. package/dist/esm/security/authorizations/application-access-grants.shared.schemas.js.map +1 -1
  832. package/dist/esm/security/authorizations/platform-access-grants.shared.resources-config.schemas.d.ts.map +1 -1
  833. package/dist/esm/security/authorizations/platform-access-grants.shared.resources-config.schemas.js.map +1 -1
  834. package/dist/esm/security/authorizations/platform-access-grants.shared.schemas.d.ts.map +1 -1
  835. package/dist/esm/security/authorizations/platform-access-grants.shared.schemas.js.map +1 -1
  836. package/dist/esm/security/authorizations/roles.application-roles.example.d.ts +37 -0
  837. package/dist/esm/security/authorizations/roles.application-roles.example.d.ts.map +1 -0
  838. package/dist/esm/security/authorizations/roles.application-roles.example.js +50 -0
  839. package/dist/esm/security/authorizations/roles.application-roles.example.js.map +1 -0
  840. package/dist/esm/security/authorizations/roles.shared.defaults.d.ts +13 -0
  841. package/dist/esm/security/authorizations/roles.shared.defaults.d.ts.map +1 -1
  842. package/dist/esm/security/authorizations/roles.shared.defaults.js +13 -0
  843. package/dist/esm/security/authorizations/roles.shared.defaults.js.map +1 -1
  844. package/dist/esm/security/authorizations/roles.shared.schemas.d.ts +29 -0
  845. package/dist/esm/security/authorizations/roles.shared.schemas.d.ts.map +1 -1
  846. package/dist/esm/security/authorizations/roles.shared.schemas.js +28 -0
  847. package/dist/esm/security/authorizations/roles.shared.schemas.js.map +1 -1
  848. package/dist/esm/security/authorizations/roles.shared.utils.d.ts.map +1 -1
  849. package/dist/esm/security/authorizations/roles.shared.utils.js.map +1 -1
  850. package/dist/esm/security/connected-accounts/provider-connection-listing.shared.schemas.d.ts.map +1 -1
  851. package/dist/esm/security/connected-accounts/provider-connection-listing.shared.schemas.js.map +1 -1
  852. package/dist/esm/security/connected-accounts/provider-credentials-organization.shared.resources-config.schemas.d.ts.map +1 -1
  853. package/dist/esm/security/connected-accounts/provider-credentials-organization.shared.resources-config.schemas.js.map +1 -1
  854. package/dist/esm/security/connected-accounts/provider-credentials-user.shared.resources-config.schemas.d.ts.map +1 -1
  855. package/dist/esm/security/connected-accounts/provider-credentials-user.shared.resources-config.schemas.js.map +1 -1
  856. package/dist/esm/security/connected-accounts/provider-credentials.shared.schemas.d.ts.map +1 -1
  857. package/dist/esm/security/connected-accounts/provider-credentials.shared.schemas.js.map +1 -1
  858. package/dist/esm/security/credential-rotation-grace.shared.utils.d.ts.map +1 -1
  859. package/dist/esm/security/credential-rotation-grace.shared.utils.js.map +1 -1
  860. package/dist/esm/security/crypto-keys/crypto-keys.shared.schemas.d.ts.map +1 -1
  861. package/dist/esm/security/crypto-keys/crypto-keys.shared.schemas.js.map +1 -1
  862. package/dist/esm/security/oauth-clients/oauth-clients-application.shared.resources-config.schemas.d.ts.map +1 -1
  863. package/dist/esm/security/oauth-clients/oauth-clients-application.shared.resources-config.schemas.js.map +1 -1
  864. package/dist/esm/security/oauth-clients/oauth-clients-organization.shared.resources-config.schemas.d.ts.map +1 -1
  865. package/dist/esm/security/oauth-clients/oauth-clients-organization.shared.resources-config.schemas.js.map +1 -1
  866. package/dist/esm/security/oauth-clients/oauth-clients.shared.schemas.d.ts.map +1 -1
  867. package/dist/esm/security/oauth-clients/oauth-clients.shared.schemas.js.map +1 -1
  868. package/dist/esm/security/oauth-clients/oauth-consent-grants.shared.resources-config.schemas.d.ts.map +1 -1
  869. package/dist/esm/security/oauth-clients/oauth-consent-grants.shared.resources-config.schemas.js.map +1 -1
  870. package/dist/esm/security/oauth-clients/oauth-consent-grants.shared.schemas.d.ts.map +1 -1
  871. package/dist/esm/security/oauth-clients/oauth-consent-grants.shared.schemas.js.map +1 -1
  872. package/dist/esm/security/oauth-clients/oauth-resource-server.shared.schemas.d.ts.map +1 -1
  873. package/dist/esm/security/oauth-clients/oauth-resource-server.shared.schemas.js.map +1 -1
  874. package/dist/esm/security/outbound-target-control.shared.schemas.d.ts.map +1 -1
  875. package/dist/esm/security/outbound-target-control.shared.schemas.js.map +1 -1
  876. package/dist/esm/security/submission-challenge/submission-challenge.shared.d.ts.map +1 -1
  877. package/dist/esm/security/submission-challenge/submission-challenge.shared.js.map +1 -1
  878. package/dist/esm/systems-of-record/system-of-record-actions.shared.schemas.d.ts.map +1 -1
  879. package/dist/esm/systems-of-record/system-of-record-actions.shared.schemas.js.map +1 -1
  880. package/dist/esm/systems-of-record/system-of-record-credential-kind.shared.d.ts.map +1 -1
  881. package/dist/esm/systems-of-record/system-of-record-credential-kind.shared.js.map +1 -1
  882. package/dist/esm/systems-of-record/system-of-record-declaration.shared.schemas.d.ts.map +1 -1
  883. package/dist/esm/systems-of-record/system-of-record-declaration.shared.schemas.js.map +1 -1
  884. package/dist/esm/systems-of-record/system-of-record-env.shared.d.ts.map +1 -1
  885. package/dist/esm/systems-of-record/system-of-record-env.shared.js.map +1 -1
  886. package/dist/esm/systems-of-record/system-of-record-error-codes.shared.d.ts.map +1 -1
  887. package/dist/esm/systems-of-record/system-of-record-error-codes.shared.js.map +1 -1
  888. package/dist/esm/systems-of-record/system-of-record-facet.shared.schemas.d.ts.map +1 -1
  889. package/dist/esm/systems-of-record/system-of-record-facet.shared.schemas.js.map +1 -1
  890. package/dist/esm/systems-of-record/system-of-record-partition-assignments.shared.resources-config.schemas.d.ts.map +1 -1
  891. package/dist/esm/systems-of-record/system-of-record-partition-assignments.shared.resources-config.schemas.js.map +1 -1
  892. package/dist/esm/systems-of-record/system-of-record-partition-assignments.shared.schemas.d.ts.map +1 -1
  893. package/dist/esm/systems-of-record/system-of-record-partition-assignments.shared.schemas.js.map +1 -1
  894. package/dist/esm/testing/resource-config-builders.d.ts.map +1 -1
  895. package/dist/esm/testing/resource-config-builders.js.map +1 -1
  896. package/dist/esm/testing.d.ts.map +1 -1
  897. package/dist/esm/testing.js.map +1 -1
  898. package/dist/esm/users/anonymous-user-marketing-metadata.shared.schemas.d.ts.map +1 -1
  899. package/dist/esm/users/anonymous-user-marketing-metadata.shared.schemas.js.map +1 -1
  900. package/dist/esm/users/anonymous-users.shared.resources-config.schemas.d.ts.map +1 -1
  901. package/dist/esm/users/anonymous-users.shared.resources-config.schemas.js.map +1 -1
  902. package/dist/esm/users/anonymous-users.shared.schema.d.ts.map +1 -1
  903. package/dist/esm/users/anonymous-users.shared.schema.js.map +1 -1
  904. package/dist/esm/users/inbound-contacts.shared.resources-config.schemas.d.ts.map +1 -1
  905. package/dist/esm/users/inbound-contacts.shared.resources-config.schemas.js +2 -0
  906. package/dist/esm/users/inbound-contacts.shared.resources-config.schemas.js.map +1 -1
  907. package/dist/esm/users/inbound-contacts.shared.schemas.d.ts.map +1 -1
  908. package/dist/esm/users/inbound-contacts.shared.schemas.js.map +1 -1
  909. package/dist/esm/users/user-consent-decision.shared.utils.d.ts.map +1 -1
  910. package/dist/esm/users/user-consent-decision.shared.utils.js.map +1 -1
  911. package/dist/esm/users/user-credentials.shared.resources-config.schemas.d.ts.map +1 -1
  912. package/dist/esm/users/user-credentials.shared.resources-config.schemas.js.map +1 -1
  913. package/dist/esm/users/user-credentials.shared.schemas.d.ts.map +1 -1
  914. package/dist/esm/users/user-credentials.shared.schemas.js.map +1 -1
  915. package/dist/esm/users/user-identity-links.shared.resources-config.schemas.d.ts.map +1 -1
  916. package/dist/esm/users/user-identity-links.shared.resources-config.schemas.js.map +1 -1
  917. package/dist/esm/users/user-identity-links.shared.schemas.d.ts.map +1 -1
  918. package/dist/esm/users/user-identity-links.shared.schemas.js.map +1 -1
  919. package/dist/esm/users/user-preferences-reset.shared.utils.d.ts.map +1 -1
  920. package/dist/esm/users/user-preferences-reset.shared.utils.js.map +1 -1
  921. package/dist/esm/users/user-preferences.shared.resources-config.schemas.d.ts.map +1 -1
  922. package/dist/esm/users/user-preferences.shared.resources-config.schemas.js.map +1 -1
  923. package/dist/esm/users/user-profiles.shared.resources-config.schemas.d.ts.map +1 -1
  924. package/dist/esm/users/user-profiles.shared.resources-config.schemas.js.map +1 -1
  925. package/dist/esm/users/user-self-preferences.shared.resources-config.schemas.d.ts.map +1 -1
  926. package/dist/esm/users/user-self-preferences.shared.resources-config.schemas.js.map +1 -1
  927. package/dist/esm/users/user-self-profiles.shared.resources-config.schemas.d.ts.map +1 -1
  928. package/dist/esm/users/user-self-profiles.shared.resources-config.schemas.js.map +1 -1
  929. package/dist/esm/users/user-self.shared.resources-config.schemas.d.ts.map +1 -1
  930. package/dist/esm/users/user-self.shared.resources-config.schemas.js.map +1 -1
  931. package/dist/esm/users/users.shared.resources-config.schemas.d.ts.map +1 -1
  932. package/dist/esm/users/users.shared.resources-config.schemas.js.map +1 -1
  933. package/dist/esm/users/users.shared.schemas.d.ts.map +1 -1
  934. package/dist/esm/users/users.shared.schemas.js.map +1 -1
  935. package/dist/tsconfig.build.tsbuildinfo +1 -0
  936. package/package.json +4 -4
@@ -1 +1 @@
1
- {"version":3,"file":"retention-binding.shared.utils.js","sourceRoot":"","sources":["../../../../../src/compliance/privacy/retention-binding.shared.utils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,iBAAiB,EAAE,MAAM,EAAE,MAAM,0BAA0B,CAAC;AAGnF,OAAO,EACL,+BAA+B,EAC/B,mBAAmB,GAGpB,MAAM,qCAAqC,CAAC;AAE7C;;;;;;;;;;;;;;;;GAgBG;AAEH,MAAM,oBAAoB,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG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,IAAI,SAAS,EAAE,CAAC;QACjC,MAAM,cAAc,GAAG,OAAO,CAAC,QAAQ,CAAC,UAAU,CAAC,IAAI,qBAAqB,CAAC,QAAQ,CAAC,UAA0B,CAAC,CAAC,MAAM,GAAG,CAAC,CAAC;QAC7H,IAAI,iBAAiB,CAAC,EAAE,gBAAgB,EAAE,QAAQ,CAAC,gBAAgB,EAAE,cAAc,EAAE,CAAC;YAAE,OAAO,CAAC,IAAI,CAAC,QAAQ,CAAC,kBAAkB,CAAC,CAAC;IACpI,CAAC;IACD,OAAO,OAAO,CAAC,IAAI,EAAE,CAAC;AACxB,CAAC","sourcesContent":["import { getTtlParams, getZodObjectShape, hasTtl } from '@wildo-ai/zod-decorators';\nimport type { z } from 'zod';\n\nimport {\n RETENTION_STARTED_AT_FIELD_NAME,\n RetentionStartPoint,\n type ApplicationRetentionSchedule,\n type ResourceRetentionBinding,\n} from './retention-schedule.shared.schemas';\n\n/**\n * # Retention binding derivations — one authority for \"when does a bound row expire\"\n *\n * Every consumer of a retention binding asks one of four questions, and each is answered here once:\n *\n * | question | function | consumers |\n * |---|---|---|\n * | which field carries the start instant? | {@link resolveRetentionStartFieldName} | the sweep's query, the factory's field checks |\n * | which rows are past their period now? | {@link resolveBoundRetentionCutoff} | the sweep, the startup past-expiry report |\n * | when did THIS row's clock start / when does it end? | {@link resolveRetentionStartedAt} / {@link resolveRetentionExpiresAt} | subject erasure's `retainedUntil` (#1635), deletion evidence (#1636) |\n * | which resources hold data nobody bound? | {@link unboundRetentionResources} | compliance documents, the startup report |\n *\n * Pure and adapter-neutral: the cutoff is a single `field < instant` comparison, which MongoDB and both\n * PostgreSQL filter compilers evaluate identically — and a NULL start instant matches neither, which is\n * exactly \"a row whose start point has not occurred never expires\" (#1613 invariant 2), by construction\n * rather than by a guard somebody could forget.\n */\n\nconst MILLISECONDS_PER_DAY = 24 * 60 * 60 * 1000;\n\n/** The infrastructure-owned creation instant both adapters maintain. */\nexport const RETENTION_CREATED_AT_FIELD_NAME = 'createdAt';\n/** The infrastructure-owned last-update instant both adapters maintain. */\nexport const RETENTION_UPDATED_AT_FIELD_NAME = 'updatedAt';\n\n/**\n * The field whose value is a bound row's retention start instant (or, for\n * {@link RetentionStartPoint.END_OF_CALENDAR_YEAR}, the instant the start is derived from).\n *\n * Throws for a {@link RetentionStartPoint.CLOSURE_EVENT} binding with no `closureFieldName`: the factory\n * refuses that configuration, so reaching it here means a binding bypassed the factory, and guessing a\n * field would delete rows by the wrong clock.\n */\nexport function resolveRetentionStartFieldName(binding: ResourceRetentionBinding): string {\n switch (binding.startPoint) {\n case RetentionStartPoint.CREATED:\n case RetentionStartPoint.END_OF_CALENDAR_YEAR:\n return RETENTION_CREATED_AT_FIELD_NAME;\n case RetentionStartPoint.LAST_UPDATED:\n return RETENTION_UPDATED_AT_FIELD_NAME;\n case RetentionStartPoint.SCOPE_DELETED:\n return RETENTION_STARTED_AT_FIELD_NAME;\n case RetentionStartPoint.CLOSURE_EVENT:\n if (!binding.closureFieldName) {\n throw new Error('A CLOSURE_EVENT retention binding must name its closureFieldName.');\n }\n return binding.closureFieldName;\n }\n}\n\n/** The instant 00:00:00.000 UTC on 1 January of `instant`'s UTC year. */\nfunction startOfUtcYear(instant: Date): Date {\n return new Date(Date.UTC(instant.getUTCFullYear(), 0, 1));\n}\n\n/** The last millisecond of `instant`'s UTC year: 31 December 23:59:59.999 UTC. */\nfunction endOfUtcYear(instant: Date): Date {\n return new Date(Date.UTC(instant.getUTCFullYear() + 1, 0, 1) - 1);\n}\n\n/**\n * The rows a bound resource must delete at `now`: those whose {@link BoundRetentionCutoff.fieldName} is\n * STRICTLY before {@link BoundRetentionCutoff.before}.\n *\n * A row is deleted only AFTER `start + retentionDays`, never at it: a row whose start is exactly\n * `now − retentionDays` has reached the end of its period and not passed it, so it survives this run.\n *\n * For {@link RetentionStartPoint.END_OF_CALENDAR_YEAR} the comparison is still on `createdAt`, rewritten\n * so no per-row arithmetic is needed: `endOfYear(createdAt) + days < now` holds exactly when `createdAt`\n * falls in a year BEFORE the year of `now − days`, i.e. `createdAt < 1 January (UTC) of year(now − days)`.\n */\nexport interface BoundRetentionCutoff {\n readonly fieldName: string;\n readonly before: Date;\n}\n\nexport function resolveBoundRetentionCutoff(\n binding: ResourceRetentionBinding,\n retentionDays: number,\n now: Date,\n): BoundRetentionCutoff {\n const fieldName = resolveRetentionStartFieldName(binding);\n const periodStartedBefore = new Date(now.getTime() - retentionDays * MILLISECONDS_PER_DAY);\n if (binding.startPoint === RetentionStartPoint.END_OF_CALENDAR_YEAR) {\n return { fieldName, before: startOfUtcYear(periodStartedBefore) };\n }\n return { fieldName, before: periodStartedBefore };\n}\n\nfunction readInstant(row: Record<string, unknown>, fieldName: string): Date | undefined {\n const value = row[fieldName];\n if (value === null || value === undefined) return undefined;\n const instant = value instanceof Date ? value : new Date(value as string | number);\n return Number.isNaN(instant.getTime()) ? undefined : instant;\n}\n\n/**\n * When `row`'s retention clock started, or `undefined` while its start point has not occurred (an open\n * CLOSURE_EVENT row, a SCOPE_DELETED row whose organization still exists).\n */\nexport function resolveRetentionStartedAt(\n row: Record<string, unknown>,\n binding: ResourceRetentionBinding,\n): Date | undefined {\n const instant = readInstant(row, resolveRetentionStartFieldName(binding));\n if (!instant) return undefined;\n return binding.startPoint === RetentionStartPoint.END_OF_CALENDAR_YEAR ? endOfUtcYear(instant) : instant;\n}\n\n/**\n * The instant after which `row` is deleted under the CURRENT schedule, or `undefined` when its start\n * point has not occurred or its class declares no period (undeclared is \"not decided\", never \"now\").\n */\nexport function resolveRetentionExpiresAt(\n row: Record<string, unknown>,\n binding: ResourceRetentionBinding,\n schedule: ApplicationRetentionSchedule | undefined,\n): Date | undefined {\n const period = schedule?.[binding.retentionClass];\n const startedAt = resolveRetentionStartedAt(row, binding);\n if (!period || !startedAt) return undefined;\n return new Date(startedAt.getTime() + period.retentionDays * MILLISECONDS_PER_DAY);\n}\n\n// ─────────────────────────────────────────────────────────────────────────────────────────────────\n// Row TTL — the OTHER retention authority, kept for framework plumbing that holds no business data\n// ─────────────────────────────────────────────────────────────────────────────────────────────────\n\n/**\n * A declared `.ttl()` ROW-EXPIRY policy: rows expire `expireAfterSeconds` after `fieldName`'s value.\n *\n * `expireAfterSeconds: 0` means the field IS the absolute expiry instant (`jobPayloadStorage.expiresAt`);\n * a positive value is a window measured from the field (`jobExecutions.createdAt`). These are MongoDB's\n * `expireAfterSeconds` semantics verbatim, so one declaration cannot mean two things per adapter.\n *\n * Distinct from a {@link ResourceRetentionBinding} on purpose: `.ttl()` is a fixed number of seconds on a\n * field, for framework plumbing that holds no business or personal data, and MongoDB honours it NATIVELY\n * with no application code running. A resource holding such data binds a class instead, and a resource\n * may not declare both (one row, one retention authority).\n */\nexport interface RowTtlPolicy {\n readonly fieldName: string;\n readonly expireAfterSeconds: number;\n}\n\n/**\n * Every `.ttl()` declaration on a resource's main schema — ONE authority, read by the SQL planner, the\n * `.ttl()` sweep, the startup refusals and the resource factory.\n *\n * Tolerates a non-object schema (it declares no fields, so no TTL): this is called while enumerating\n * EVERY registered resource, and one exotic schema must not take the enumeration down.\n */\nexport function collectRowTtlPolicies(mainSchema: z.ZodTypeAny): RowTtlPolicy[] {\n let shape: Record<string, z.ZodTypeAny> | undefined;\n try {\n shape = getZodObjectShape(mainSchema as never) as Record<string, z.ZodTypeAny>;\n } catch {\n return [];\n }\n if (!shape) return [];\n const policies: RowTtlPolicy[] = [];\n for (const [fieldName, fieldSchema] of Object.entries(shape)) {\n if (!fieldSchema || !hasTtl(fieldSchema)) continue;\n const params = getTtlParams(fieldSchema);\n if (!params) continue;\n policies.push({ fieldName, expireAfterSeconds: params.expireAfterSeconds });\n }\n return policies;\n}\n\n// ─────────────────────────────────────────────────────────────────────────────────────────────────\n// The gap report\n// ─────────────────────────────────────────────────────────────────────────────────────────────────\n\n/** The part of a resource configuration the gap report reads. Structural, so it takes a registry's configs as-is. */\nexport interface RetentionBindingGapInput {\n readonly resourceIdentifier: string;\n readonly retentionBinding?: ResourceRetentionBinding;\n readonly mainSchema?: unknown;\n}\n\n/**\n * THE rule for \"kept until erased\": a resource no retention mechanism ever deletes has no class binding\n * and no `.ttl()`. One predicate, so the startup report (which reads schemas) and the RETENTION_RULES\n * document fact (which receives `declaresRowTtl` across a JSON boundary) cannot disagree about who is in\n * the list.\n */\nexport function isKeptUntilErased(resource: { readonly retentionBinding?: unknown; readonly declaresRowTtl: boolean }): boolean {\n return !resource.retentionBinding && !resource.declaresRowTtl;\n}\n\n/**\n * The resources whose rows no retention mechanism ever deletes: no class binding and no `.ttl()`.\n *\n * Kept until erased. That is today's behaviour for every unbound resource and is not wrong in itself —\n * it is UNDECIDED, and this report is what keeps it visible next to `undeclaredRetentionClasses`, in the\n * compliance documents and in the startup log. Rejected: defaulting every unbound resource to\n * `RESOURCE_DATA`. That would silently delete data nobody decided about.\n *\n * Sorted, so two runs over the same registry produce the same list.\n */\nexport function unboundRetentionResources(resources: Iterable<RetentionBindingGapInput>): readonly string[] {\n const unbound: string[] = [];\n for (const resource of resources) {\n const declaresRowTtl = Boolean(resource.mainSchema) && collectRowTtlPolicies(resource.mainSchema as z.ZodTypeAny).length > 0;\n if (isKeptUntilErased({ retentionBinding: resource.retentionBinding, declaresRowTtl })) unbound.push(resource.resourceIdentifier);\n }\n return unbound.sort();\n}\n"]}
1
+ {"version":3,"file":"retention-binding.shared.utils.js","sourceRoot":"","sources":["../../../../src/compliance/privacy/retention-binding.shared.utils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,iBAAiB,EAAE,MAAM,EAAE,MAAM,0BAA0B,CAAC;AAGnF,OAAO,EACL,+BAA+B,EAC/B,mBAAmB,GAGpB,MAAM,qCAAqC,CAAC;AAE7C;;;;;;;;;;;;;;;;GAgBG;AAEH,MAAM,oBAAoB,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,IAAI,CAAC;AAEjD,wEAAwE;AACxE,MAAM,CAAC,MAAM,+BAA+B,GAAG,WAAW,CAAC;AAC3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AC,IAAI,qBAAqB,CAAC,QAAQ,CAAC,UAA0B,CAAC,CAAC,MAAM,GAAG,CAAC,CAAC;QAC7H,IAAI,iBAAiB,CAAC,EAAE,gBAAgB,EAAE,QAAQ,CAAC,gBAAgB,EAAE,cAAc,EAAE,CAAC;YAAE,OAAO,CAAC,IAAI,CAAC,QAAQ,CAAC,kBAAkB,CAAC,CAAC;IACpI,CAAC;IACD,OAAO,OAAO,CAAC,IAAI,EAAE,CAAC;AACxB,CAAC","sourcesContent":["import { getTtlParams, getZodObjectShape, hasTtl } from '@wildo-ai/zod-decorators';\nimport type { z } from 'zod';\n\nimport {\n RETENTION_STARTED_AT_FIELD_NAME,\n RetentionStartPoint,\n type ApplicationRetentionSchedule,\n type ResourceRetentionBinding,\n} from './retention-schedule.shared.schemas';\n\n/**\n * # Retention binding derivations — one authority for \"when does a bound row expire\"\n *\n * Every consumer of a retention binding asks one of four questions, and each is answered here once:\n *\n * | question | function | consumers |\n * |---|---|---|\n * | which field carries the start instant? | {@link resolveRetentionStartFieldName} | the sweep's query, the factory's field checks |\n * | which rows are past their period now? | {@link resolveBoundRetentionCutoff} | the sweep, the startup past-expiry report |\n * | when did THIS row's clock start / when does it end? | {@link resolveRetentionStartedAt} / {@link resolveRetentionExpiresAt} | subject erasure's `retainedUntil` (#1635), deletion evidence (#1636) |\n * | which resources hold data nobody bound? | {@link unboundRetentionResources} | compliance documents, the startup report |\n *\n * Pure and adapter-neutral: the cutoff is a single `field < instant` comparison, which MongoDB and both\n * PostgreSQL filter compilers evaluate identically — and a NULL start instant matches neither, which is\n * exactly \"a row whose start point has not occurred never expires\" (#1613 invariant 2), by construction\n * rather than by a guard somebody could forget.\n */\n\nconst MILLISECONDS_PER_DAY = 24 * 60 * 60 * 1000;\n\n/** The infrastructure-owned creation instant both adapters maintain. */\nexport const RETENTION_CREATED_AT_FIELD_NAME = 'createdAt';\n/** The infrastructure-owned last-update instant both adapters maintain. */\nexport const RETENTION_UPDATED_AT_FIELD_NAME = 'updatedAt';\n\n/**\n * The field whose value is a bound row's retention start instant (or, for\n * {@link RetentionStartPoint.END_OF_CALENDAR_YEAR}, the instant the start is derived from).\n *\n * Throws for a {@link RetentionStartPoint.CLOSURE_EVENT} binding with no `closureFieldName`: the factory\n * refuses that configuration, so reaching it here means a binding bypassed the factory, and guessing a\n * field would delete rows by the wrong clock.\n */\nexport function resolveRetentionStartFieldName(binding: ResourceRetentionBinding): string {\n switch (binding.startPoint) {\n case RetentionStartPoint.CREATED:\n case RetentionStartPoint.END_OF_CALENDAR_YEAR:\n return RETENTION_CREATED_AT_FIELD_NAME;\n case RetentionStartPoint.LAST_UPDATED:\n return RETENTION_UPDATED_AT_FIELD_NAME;\n case RetentionStartPoint.SCOPE_DELETED:\n return RETENTION_STARTED_AT_FIELD_NAME;\n case RetentionStartPoint.CLOSURE_EVENT:\n if (!binding.closureFieldName) {\n throw new Error('A CLOSURE_EVENT retention binding must name its closureFieldName.');\n }\n return binding.closureFieldName;\n }\n}\n\n/** The instant 00:00:00.000 UTC on 1 January of `instant`'s UTC year. */\nfunction startOfUtcYear(instant: Date): Date {\n return new Date(Date.UTC(instant.getUTCFullYear(), 0, 1));\n}\n\n/** The last millisecond of `instant`'s UTC year: 31 December 23:59:59.999 UTC. */\nfunction endOfUtcYear(instant: Date): Date {\n return new Date(Date.UTC(instant.getUTCFullYear() + 1, 0, 1) - 1);\n}\n\n/**\n * The rows a bound resource must delete at `now`: those whose {@link BoundRetentionCutoff.fieldName} is\n * STRICTLY before {@link BoundRetentionCutoff.before}.\n *\n * A row is deleted only AFTER `start + retentionDays`, never at it: a row whose start is exactly\n * `now − retentionDays` has reached the end of its period and not passed it, so it survives this run.\n *\n * For {@link RetentionStartPoint.END_OF_CALENDAR_YEAR} the comparison is still on `createdAt`, rewritten\n * so no per-row arithmetic is needed: `endOfYear(createdAt) + days < now` holds exactly when `createdAt`\n * falls in a year BEFORE the year of `now − days`, i.e. `createdAt < 1 January (UTC) of year(now − days)`.\n */\nexport interface BoundRetentionCutoff {\n readonly fieldName: string;\n readonly before: Date;\n}\n\nexport function resolveBoundRetentionCutoff(\n binding: ResourceRetentionBinding,\n retentionDays: number,\n now: Date,\n): BoundRetentionCutoff {\n const fieldName = resolveRetentionStartFieldName(binding);\n const periodStartedBefore = new Date(now.getTime() - retentionDays * MILLISECONDS_PER_DAY);\n if (binding.startPoint === RetentionStartPoint.END_OF_CALENDAR_YEAR) {\n return { fieldName, before: startOfUtcYear(periodStartedBefore) };\n }\n return { fieldName, before: periodStartedBefore };\n}\n\nfunction readInstant(row: Record<string, unknown>, fieldName: string): Date | undefined {\n const value = row[fieldName];\n if (value === null || value === undefined) return undefined;\n const instant = value instanceof Date ? value : new Date(value as string | number);\n return Number.isNaN(instant.getTime()) ? undefined : instant;\n}\n\n/**\n * When `row`'s retention clock started, or `undefined` while its start point has not occurred (an open\n * CLOSURE_EVENT row, a SCOPE_DELETED row whose organization still exists).\n */\nexport function resolveRetentionStartedAt(\n row: Record<string, unknown>,\n binding: ResourceRetentionBinding,\n): Date | undefined {\n const instant = readInstant(row, resolveRetentionStartFieldName(binding));\n if (!instant) return undefined;\n return binding.startPoint === RetentionStartPoint.END_OF_CALENDAR_YEAR ? endOfUtcYear(instant) : instant;\n}\n\n/**\n * The instant after which `row` is deleted under the CURRENT schedule, or `undefined` when its start\n * point has not occurred or its class declares no period (undeclared is \"not decided\", never \"now\").\n */\nexport function resolveRetentionExpiresAt(\n row: Record<string, unknown>,\n binding: ResourceRetentionBinding,\n schedule: ApplicationRetentionSchedule | undefined,\n): Date | undefined {\n const period = schedule?.[binding.retentionClass];\n const startedAt = resolveRetentionStartedAt(row, binding);\n if (!period || !startedAt) return undefined;\n return new Date(startedAt.getTime() + period.retentionDays * MILLISECONDS_PER_DAY);\n}\n\n// ─────────────────────────────────────────────────────────────────────────────────────────────────\n// Row TTL — the OTHER retention authority, kept for framework plumbing that holds no business data\n// ─────────────────────────────────────────────────────────────────────────────────────────────────\n\n/**\n * A declared `.ttl()` ROW-EXPIRY policy: rows expire `expireAfterSeconds` after `fieldName`'s value.\n *\n * `expireAfterSeconds: 0` means the field IS the absolute expiry instant (`jobPayloadStorage.expiresAt`);\n * a positive value is a window measured from the field (`jobExecutions.createdAt`). These are MongoDB's\n * `expireAfterSeconds` semantics verbatim, so one declaration cannot mean two things per adapter.\n *\n * Distinct from a {@link ResourceRetentionBinding} on purpose: `.ttl()` is a fixed number of seconds on a\n * field, for framework plumbing that holds no business or personal data, and MongoDB honours it NATIVELY\n * with no application code running. A resource holding such data binds a class instead, and a resource\n * may not declare both (one row, one retention authority).\n */\nexport interface RowTtlPolicy {\n readonly fieldName: string;\n readonly expireAfterSeconds: number;\n}\n\n/**\n * Every `.ttl()` declaration on a resource's main schema — ONE authority, read by the SQL planner, the\n * `.ttl()` sweep, the startup refusals and the resource factory.\n *\n * Tolerates a non-object schema (it declares no fields, so no TTL): this is called while enumerating\n * EVERY registered resource, and one exotic schema must not take the enumeration down.\n */\nexport function collectRowTtlPolicies(mainSchema: z.ZodTypeAny): RowTtlPolicy[] {\n let shape: Record<string, z.ZodTypeAny> | undefined;\n try {\n shape = getZodObjectShape(mainSchema as never) as Record<string, z.ZodTypeAny>;\n } catch {\n return [];\n }\n if (!shape) return [];\n const policies: RowTtlPolicy[] = [];\n for (const [fieldName, fieldSchema] of Object.entries(shape)) {\n if (!fieldSchema || !hasTtl(fieldSchema)) continue;\n const params = getTtlParams(fieldSchema);\n if (!params) continue;\n policies.push({ fieldName, expireAfterSeconds: params.expireAfterSeconds });\n }\n return policies;\n}\n\n// ─────────────────────────────────────────────────────────────────────────────────────────────────\n// The gap report\n// ─────────────────────────────────────────────────────────────────────────────────────────────────\n\n/** The part of a resource configuration the gap report reads. Structural, so it takes a registry's configs as-is. */\nexport interface RetentionBindingGapInput {\n readonly resourceIdentifier: string;\n readonly retentionBinding?: ResourceRetentionBinding;\n readonly mainSchema?: unknown;\n}\n\n/**\n * THE rule for \"kept until erased\": a resource no retention mechanism ever deletes has no class binding\n * and no `.ttl()`. One predicate, so the startup report (which reads schemas) and the RETENTION_RULES\n * document fact (which receives `declaresRowTtl` across a JSON boundary) cannot disagree about who is in\n * the list.\n */\nexport function isKeptUntilErased(resource: { readonly retentionBinding?: unknown; readonly declaresRowTtl: boolean }): boolean {\n return !resource.retentionBinding && !resource.declaresRowTtl;\n}\n\n/**\n * The resources whose rows no retention mechanism ever deletes: no class binding and no `.ttl()`.\n *\n * Kept until erased. That is today's behaviour for every unbound resource and is not wrong in itself —\n * it is UNDECIDED, and this report is what keeps it visible next to `undeclaredRetentionClasses`, in the\n * compliance documents and in the startup log. Rejected: defaulting every unbound resource to\n * `RESOURCE_DATA`. That would silently delete data nobody decided about.\n *\n * Sorted, so two runs over the same registry produce the same list.\n */\nexport function unboundRetentionResources(resources: Iterable<RetentionBindingGapInput>): readonly string[] {\n const unbound: string[] = [];\n for (const resource of resources) {\n const declaresRowTtl = Boolean(resource.mainSchema) && collectRowTtlPolicies(resource.mainSchema as z.ZodTypeAny).length > 0;\n if (isKeptUntilErased({ retentionBinding: resource.retentionBinding, declaresRowTtl })) unbound.push(resource.resourceIdentifier);\n }\n return unbound.sort();\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"retention-enforcement-records.shared.resources-config.schemas.d.ts","sourceRoot":"","sources":["../../../../../src/compliance/privacy/retention-enforcement-records.shared.resources-config.schemas.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AACH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAIxB,OAAO,EAAE,qBAAqB,EAAwD,MAAM,mDAAmD,CAAC;AAChJ,OAAO,EAA4D,oBAAoB,EAAE,MAAM,0CAA0C,CAAC;AAG1I,OAAO,EAAE,kBAAkB,EAAE,mBAAmB,EAAE,MAAM,qCAAqC,CAAC;AAC9F,OAAO,EAAE,2BAA2B,EAAoC,MAAM,gDAAgD,CAAC;AAE/H,eAAO,MAAM,sEAAsE,GACjF,wBAAwB,oBAAoB,EAAE;;;;;;;;;;;;;;;;;;;;kBAsF9C,CAAC"}
1
+ {"version":3,"file":"retention-enforcement-records.shared.resources-config.schemas.d.ts","sourceRoot":"","sources":["../../../../src/compliance/privacy/retention-enforcement-records.shared.resources-config.schemas.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AACH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAIxB,OAAO,EAAE,qBAAqB,EAAwD,MAAM,mDAAmD,CAAC;AAChJ,OAAO,EAA4D,oBAAoB,EAAE,MAAM,0CAA0C,CAAC;AAG1I,OAAO,EAAE,kBAAkB,EAAE,mBAAmB,EAAE,MAAM,qCAAqC,CAAC;AAC9F,OAAO,EAAE,2BAA2B,EAAoC,MAAM,gDAAgD,CAAC;AAE/H,eAAO,MAAM,sEAAsE,GACjF,wBAAwB,oBAAoB,EAAE;;;;;;;;;;;;;;;;;;;;kBAsF9C,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"retention-enforcement-records.shared.resources-config.schemas.js","sourceRoot":"","sources":["../../../../../src/compliance/privacy/retention-enforcement-records.shared.resources-config.schemas.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AACH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EAAE,0CAA0C,EAAE,MAAM,iDAAiD,CAAC;AAC7G,OAAO,EAAE,wBAAwB,EAAE,MAAM,iDAAiD,CAAC;AAC3F,OAAO,EAAE,qBAAqB,EAAE,gBAAgB,EAAE,kCAAkC,EAAE,MAAM,mDAAmD,CAAC;AAChJ,OAAO,EAAE,0BAA0B,EAAE,4BAA4B,EAAwB,MAAM,0CAA0C,CAAC;AAC1I,OAAO,EAAE,cAAc,EAAE,MAAM,oDAAoD,CAAC;AACpF,OAAO,EAAE,gCAAgC,EAAE,MAAM,wEAAwE,CAAC;AAC1H,OAAO,EAAE,kBAAkB,EAAE,mBAAmB,EAAE,MAAM,qCAAqC,CAAC;AAC9F,OAA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qBAAqB,CAAC,IAAI,CAAC,EAAE;YAC5B,QAAQ,EAAE,CAAC;oBACT,WAAW,EAAE,4BAA4B,CAAC,QAAQ;oBAClD,SAAS,EAAE,IAAI;oBACf,KAAK,EAAE,CAAC,GAAG,gCAAgC,CAAC;oBAC5C,SAAS,EAAE,0BAA0B,CAAC,GAAG;oBACzC,YAAY,EAAE;wBACZ,cAAc,EAAE,CAAC,CAAC,IAAI,CAAC,kBAAkB,CAAC;wBAC1C,YAAY,EAAE,CAAC,CAAC,MAAM,EAAE;wBACxB,OAAO,EAAE,CAAC,CAAC,IAAI,CAAC,2BAA2B,CAAC;wBAC5C,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE;wBAClB,OAAO,EAAE,CAAC,CAAC,IAAI,EAAE;qBAClB;oBACD,+FAA+F;oBAC/F,UAAU,EAAE,CAAC,SAAS,EAAE,gBAAgB,EAAE,cAAc,EAAE,SAAS,EAAE,KAAK,CAAU;oBACpF,8BAA8B,EAAE,GAAG;iBACpC,CAAC;SACH;QACD,iGAAiG;QACjG,6EAA6E;QAC7E,CAAC,qBAAqB,CAAC,WAAW,CAAC,EAAE;YACnC,QAAQ,EAAE,CAAC;oBACT,WAAW,EAAE,4BAA4B,CAAC,aAAa;oBACvD,SAAS,EAAE,IAAI;oBACf,KAAK,EAAE,CAAC,cAAc,CAAC,qBAAqB,CAAC;oBAC7C,SAAS,EAAE,0BAA0B,CAAC,IAAI;iBAC3C,CAAC;SACH;KACF;CACF,CAAC,CAAC","sourcesContent":["/**\n * Retention-enforcement records: resource configuration (#1636).\n *\n * ONE writer and two readers:\n * - the writer is the retention-class sweep, through the repository (`CREATE` is `REPOSITORY_ONLY`, so no\n * route creates a record). It uses the repository rather than the trusted-system-write primitive on\n * purpose, for the provider-call-records reason: `createAsSystem` emits a `SYSTEM_CONTEXT_WRITE` audit row\n * per call, and the run already emits ONE `RETENTION_ENFORCEMENT_RECORDED` event carrying its totals.\n * - the application administration console reads them (`READ`/`LIST` are `API_CALL`) — the operator's view\n * of whether each declared period is being enforced;\n * - the retention-enforcement evidence door reads a window of them for an assurance collector.\n *\n * APPEND-ONLY: there is no UPDATE. A run happened; a later run is a new row. `DELETE_MANY` exists only for\n * the retention-class sweep itself, which deletes records past the application's declared `AUDIT_LOGS`\n * period, and it is `INTERNAL_CALL`, so enforcing retention on the evidence creates no public deletion route.\n */\nimport { z } from 'zod';\n\nimport { createResourceConfiguration_Initialization } from '../../resources/resources-config.shared.factory';\nimport { ResourceSystemAccessMode } from '../../resources/resources-config.shared.schemas';\nimport { CoreResourceOperation, CoreResourceType, coreResourceShared_FieldIdentifier } from '../../resources/resources.shared.core.definitions';\nimport { ResourceOperationRiskLevel, ResourceOperationVariantType, ResourceRelationship } from '../../resources/resources.shared.schemas';\nimport { CORE_APP_ROLES } from '../../security/authorizations/roles.shared.schemas';\nimport { APPLICATION_AUDIT_LOG_READ_ROLES } from '../audit-trails/application-audit-logs.shared.resources-config.schemas';\nimport { DataRetentionClass, RetentionStartPoint } from './retention-schedule.shared.schemas';\nimport { RetentionEnforcementOutcome, RetentionEnforcementRecordSchema } from './retention-enforcement-records.shared.schemas';\n\nexport const retentionEnforcementRecordsResourceConfiguration_InitializationFactory = (\n resourcesRelationships: ResourceRelationship[],\n) => createResourceConfiguration_Initialization<undefined,\n CoreResourceOperation.CREATE | CoreResourceOperation.READ | CoreResourceOperation.LIST | CoreResourceOperation.DELETE_MANY,\n typeof RetentionEnforcementRecordSchema\n>({\n mainSchema: RetentionEnforcementRecordSchema,\n resourceIdentifier: CoreResourceType.RETENTION_ENFORCEMENT_RECORDS,\n resourceFieldIdentifier: coreResourceShared_FieldIdentifier[CoreResourceType.RETENTION_ENFORCEMENT_RECORDS],\n resourceRelationships: resourcesRelationships,\n isSystemResource: true,\n\n /*\n * Subject-export: FORBIDDEN, and deliberately NO `retentionPolicy`. A record holds counts and instants about\n * a resource TYPE and names no person and no row (see the schema header), so it is not data about a subject\n * and no erasure visits it. FORBIDDEN rather than undeclared so the decision is visible, the\n * provider-call-records precedent. If a field ever named a row or a person, this exemption is wrong and must\n * be revisited in the same change.\n */\n systemAccessPolicy: { exportSubject: ResourceSystemAccessMode.FORBIDDEN },\n\n /*\n * Kept for the application's declared AUDIT_LOGS period, counted from the record's creation. This is the\n * operator's defence evidence that retention was enforced, so it must outlive the data it describes: the\n * AUDIT_LOGS period is the one the audit trail itself is kept for. The sweep that writes these rows is also\n * what deletes them once that period ends, through the same service-layer path as every bound resource.\n */\n retentionBinding: {\n retentionClass: DataRetentionClass.AUDIT_LOGS,\n startPoint: RetentionStartPoint.CREATED,\n },\n\n coreOperations: [\n CoreResourceOperation.CREATE,\n CoreResourceOperation.READ,\n CoreResourceOperation.LIST,\n CoreResourceOperation.DELETE_MANY,\n ],\n operationsConfiguration: {\n [CoreResourceOperation.CREATE]: {\n variants: [{\n variantType: ResourceOperationVariantType.REPOSITORY_ONLY,\n isDefault: true,\n roles: [CORE_APP_ROLES.APP_ADMIN_SUPER_ADMIN],\n riskLevel: ResourceOperationRiskLevel.LOW,\n }],\n },\n // The audit door's audience (`APPLICATION_AUDIT_LOG_READ_ROLES`): the operator who acts on a failing\n // sweep, and an evidence reader who must read and must not act. No tenant's rows are behind this door —\n // a record names a resource type, never an organization — so no cross-tenant admission is declared.\n [CoreResourceOperation.READ]: {\n variants: [{\n variantType: ResourceOperationVariantType.API_CALL,\n isDefault: true,\n roles: [...APPLICATION_AUDIT_LOG_READ_ROLES],\n riskLevel: ResourceOperationRiskLevel.LOW,\n }],\n },\n [CoreResourceOperation.LIST]: {\n variants: [{\n variantType: ResourceOperationVariantType.API_CALL,\n isDefault: true,\n roles: [...APPLICATION_AUDIT_LOG_READ_ROLES],\n riskLevel: ResourceOperationRiskLevel.LOW,\n filterFields: {\n retentionClass: z.enum(DataRetentionClass),\n resourceType: z.string(),\n outcome: z.enum(RetentionEnforcementOutcome),\n runRef: z.string(),\n sweptAt: z.date(),\n },\n /** `_id` last, as the keyset tie-breaker: one run writes many rows with the same `sweptAt`. */\n sortFields: ['sweptAt', 'retentionClass', 'resourceType', 'outcome', '_id'] as const,\n maxPaginatedResultPerPageLimit: 100,\n }],\n },\n // The retention-class sweep deletes expired pages through the SERVICE layer, which resolves only\n // INTERNAL_CALL (not REPOSITORY_ONLY) — and INTERNAL_CALL is route-less too.\n [CoreResourceOperation.DELETE_MANY]: {\n variants: [{\n variantType: ResourceOperationVariantType.INTERNAL_CALL,\n isDefault: true,\n roles: [CORE_APP_ROLES.APP_ADMIN_SUPER_ADMIN],\n riskLevel: ResourceOperationRiskLevel.HIGH,\n }],\n },\n },\n});\n"]}
1
+ {"version":3,"file":"retention-enforcement-records.shared.resources-config.schemas.js","sourceRoot":"","sources":["../../../../src/compliance/privacy/retention-enforcement-records.shared.resources-config.schemas.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AACH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EAAE,0CAA0C,EAAE,MAAM,iDAAiD,CAAC;AAC7G,OAAO,EAAE,wBAAwB,EAAE,MAAM,iDAAiD,CAAC;AAC3F,OAAO,EAAE,qBAAqB,EAAE,gBAAgB,EAAE,kCAAkC,EAAE,MAAM,mDAAmD,CAAC;AAChJ,OAAO,EAAE,0BAA0B,EAAE,4BAA4B,EAAwB,MAAM,0CAA0C,CAAC;AAC1I,OAAO,EAAE,cAAc,EAAE,MAAM,oDAAoD,CAAC;AACpF,OAAO,EAAE,gCAAgC,EAAE,MAAM,wEAAwE,CAAC;AAC1H,OAAO,EAAE,kBAAkB,EAAE,mBAAmB,EAAE,MAAM,qCAAqC,CAAC;AAC9F,OAAO,EAAE,2BAA2B,EAAE,gCAAgC,EAAE,MAAM,gDAAgD,CAAC;AAE/H,MAAM,CAAC,MAAM,sEAAsE,GAAG,CACpF,sBAA8C,EAC9C,EAAE,CAAC,0CAA0C,CAG7C;IACA,UAAU,EAAE,gCAAgC;IAC5C,kBAAkB,EAAE,gBAAgB,CAAC,6BAA6B;I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AAY,EAAE;wBACZ,cAAc,EAAE,CAAC,CAAC,IAAI,CAAC,kBAAkB,CAAC;wBAC1C,YAAY,EAAE,CAAC,CAAC,MAAM,EAAE;wBACxB,OAAO,EAAE,CAAC,CAAC,IAAI,CAAC,2BAA2B,CAAC;wBAC5C,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE;wBAClB,OAAO,EAAE,CAAC,CAAC,IAAI,EAAE;qBAClB;oBACD,+FAA+F;oBAC/F,UAAU,EAAE,CAAC,SAAS,EAAE,gBAAgB,EAAE,cAAc,EAAE,SAAS,EAAE,KAAK,CAAU;oBACpF,8BAA8B,EAAE,GAAG;iBACpC,CAAC;SACH;QACD,iGAAiG;QACjG,6EAA6E;QAC7E,CAAC,qBAAqB,CAAC,WAAW,CAAC,EAAE;YACnC,QAAQ,EAAE,CAAC;oBACT,WAAW,EAAE,4BAA4B,CAAC,aAAa;oBACvD,SAAS,EAAE,IAAI;oBACf,KAAK,EAAE,CAAC,cAAc,CAAC,qBAAqB,CAAC;oBAC7C,SAAS,EAAE,0BAA0B,CAAC,IAAI;iBAC3C,CAAC;SACH;KACF;CACF,CAAC,CAAC","sourcesContent":["/**\n * Retention-enforcement records: resource configuration (#1636).\n *\n * ONE writer and two readers:\n * - the writer is the retention-class sweep, through the repository (`CREATE` is `REPOSITORY_ONLY`, so no\n * route creates a record). It uses the repository rather than the trusted-system-write primitive on\n * purpose, for the provider-call-records reason: `createAsSystem` emits a `SYSTEM_CONTEXT_WRITE` audit row\n * per call, and the run already emits ONE `RETENTION_ENFORCEMENT_RECORDED` event carrying its totals.\n * - the application administration console reads them (`READ`/`LIST` are `API_CALL`) — the operator's view\n * of whether each declared period is being enforced;\n * - the retention-enforcement evidence door reads a window of them for an assurance collector.\n *\n * APPEND-ONLY: there is no UPDATE. A run happened; a later run is a new row. `DELETE_MANY` exists only for\n * the retention-class sweep itself, which deletes records past the application's declared `AUDIT_LOGS`\n * period, and it is `INTERNAL_CALL`, so enforcing retention on the evidence creates no public deletion route.\n */\nimport { z } from 'zod';\n\nimport { createResourceConfiguration_Initialization } from '../../resources/resources-config.shared.factory';\nimport { ResourceSystemAccessMode } from '../../resources/resources-config.shared.schemas';\nimport { CoreResourceOperation, CoreResourceType, coreResourceShared_FieldIdentifier } from '../../resources/resources.shared.core.definitions';\nimport { ResourceOperationRiskLevel, ResourceOperationVariantType, ResourceRelationship } from '../../resources/resources.shared.schemas';\nimport { CORE_APP_ROLES } from '../../security/authorizations/roles.shared.schemas';\nimport { APPLICATION_AUDIT_LOG_READ_ROLES } from '../audit-trails/application-audit-logs.shared.resources-config.schemas';\nimport { DataRetentionClass, RetentionStartPoint } from './retention-schedule.shared.schemas';\nimport { RetentionEnforcementOutcome, RetentionEnforcementRecordSchema } from './retention-enforcement-records.shared.schemas';\n\nexport const retentionEnforcementRecordsResourceConfiguration_InitializationFactory = (\n resourcesRelationships: ResourceRelationship[],\n) => createResourceConfiguration_Initialization<undefined,\n CoreResourceOperation.CREATE | CoreResourceOperation.READ | CoreResourceOperation.LIST | CoreResourceOperation.DELETE_MANY,\n typeof RetentionEnforcementRecordSchema\n>({\n mainSchema: RetentionEnforcementRecordSchema,\n resourceIdentifier: CoreResourceType.RETENTION_ENFORCEMENT_RECORDS,\n resourceFieldIdentifier: coreResourceShared_FieldIdentifier[CoreResourceType.RETENTION_ENFORCEMENT_RECORDS],\n resourceRelationships: resourcesRelationships,\n isSystemResource: true,\n\n /*\n * Subject-export: FORBIDDEN, and deliberately NO `retentionPolicy`. A record holds counts and instants about\n * a resource TYPE and names no person and no row (see the schema header), so it is not data about a subject\n * and no erasure visits it. FORBIDDEN rather than undeclared so the decision is visible, the\n * provider-call-records precedent. If a field ever named a row or a person, this exemption is wrong and must\n * be revisited in the same change.\n */\n systemAccessPolicy: { exportSubject: ResourceSystemAccessMode.FORBIDDEN },\n\n /*\n * Kept for the application's declared AUDIT_LOGS period, counted from the record's creation. This is the\n * operator's defence evidence that retention was enforced, so it must outlive the data it describes: the\n * AUDIT_LOGS period is the one the audit trail itself is kept for. The sweep that writes these rows is also\n * what deletes them once that period ends, through the same service-layer path as every bound resource.\n */\n retentionBinding: {\n retentionClass: DataRetentionClass.AUDIT_LOGS,\n startPoint: RetentionStartPoint.CREATED,\n },\n\n coreOperations: [\n CoreResourceOperation.CREATE,\n CoreResourceOperation.READ,\n CoreResourceOperation.LIST,\n CoreResourceOperation.DELETE_MANY,\n ],\n operationsConfiguration: {\n [CoreResourceOperation.CREATE]: {\n variants: [{\n variantType: ResourceOperationVariantType.REPOSITORY_ONLY,\n isDefault: true,\n roles: [CORE_APP_ROLES.APP_ADMIN_SUPER_ADMIN],\n riskLevel: ResourceOperationRiskLevel.LOW,\n }],\n },\n // The audit door's audience (`APPLICATION_AUDIT_LOG_READ_ROLES`): the operator who acts on a failing\n // sweep, and an evidence reader who must read and must not act. No tenant's rows are behind this door —\n // a record names a resource type, never an organization — so no cross-tenant admission is declared.\n [CoreResourceOperation.READ]: {\n variants: [{\n variantType: ResourceOperationVariantType.API_CALL,\n isDefault: true,\n roles: [...APPLICATION_AUDIT_LOG_READ_ROLES],\n riskLevel: ResourceOperationRiskLevel.LOW,\n }],\n },\n [CoreResourceOperation.LIST]: {\n variants: [{\n variantType: ResourceOperationVariantType.API_CALL,\n isDefault: true,\n roles: [...APPLICATION_AUDIT_LOG_READ_ROLES],\n riskLevel: ResourceOperationRiskLevel.LOW,\n filterFields: {\n retentionClass: z.enum(DataRetentionClass),\n resourceType: z.string(),\n outcome: z.enum(RetentionEnforcementOutcome),\n runRef: z.string(),\n sweptAt: z.date(),\n },\n /** `_id` last, as the keyset tie-breaker: one run writes many rows with the same `sweptAt`. */\n sortFields: ['sweptAt', 'retentionClass', 'resourceType', 'outcome', '_id'] as const,\n maxPaginatedResultPerPageLimit: 100,\n }],\n },\n // The retention-class sweep deletes expired pages through the SERVICE layer, which resolves only\n // INTERNAL_CALL (not REPOSITORY_ONLY) — and INTERNAL_CALL is route-less too.\n [CoreResourceOperation.DELETE_MANY]: {\n variants: [{\n variantType: ResourceOperationVariantType.INTERNAL_CALL,\n isDefault: true,\n roles: [CORE_APP_ROLES.APP_ADMIN_SUPER_ADMIN],\n riskLevel: ResourceOperationRiskLevel.HIGH,\n }],\n },\n },\n});\n"]}
@@ -157,16 +157,16 @@ export declare function projectRetentionEnforcementRecord(source: RetentionEnfor
157
157
  export declare const RetentionEnforcementEvidenceRecordSchema: z.ZodObject<{
158
158
  resourceType: import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<z.ZodString>>;
159
159
  outcome: import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<z.ZodEnum<typeof RetentionEnforcementOutcome>>>>;
160
- retentionClass: import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<z.ZodEnum<typeof DataRetentionClass>>>>;
161
- startPoint: import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<z.ZodEnum<typeof RetentionStartPoint>>;
162
- deletedCount: z.ZodNumber;
163
160
  runRef: import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<z.ZodString>>;
164
161
  sweptAt: import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<z.ZodDate>>;
162
+ deletedCount: z.ZodNumber;
163
+ retentionClass: import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<z.ZodEnum<typeof DataRetentionClass>>>>;
164
+ heldSkippedCount: z.ZodOptional<z.ZodNumber>;
165
+ startPoint: import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<z.ZodEnum<typeof RetentionStartPoint>>;
165
166
  retentionDaysApplied: z.ZodOptional<z.ZodNumber>;
166
167
  cutoff: z.ZodOptional<z.ZodDate>;
167
168
  oldestDeletedStartedAt: z.ZodOptional<z.ZodDate>;
168
169
  newestDeletedStartedAt: z.ZodOptional<z.ZodDate>;
169
- heldSkippedCount: z.ZodOptional<z.ZodNumber>;
170
170
  statutoryRestrictedCount: z.ZodOptional<z.ZodNumber>;
171
171
  reachedRunCeiling: z.ZodBoolean;
172
172
  failureStage: z.ZodOptional<import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<z.ZodEnum<typeof RetentionClassSweepFailureStage>>>;
@@ -181,16 +181,16 @@ export declare const RetentionEnforcementEvidenceSchema: z.ZodObject<{
181
181
  records: z.ZodArray<z.ZodObject<{
182
182
  resourceType: import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<z.ZodString>>;
183
183
  outcome: import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<z.ZodEnum<typeof RetentionEnforcementOutcome>>>>;
184
- retentionClass: import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<z.ZodEnum<typeof DataRetentionClass>>>>;
185
- startPoint: import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<z.ZodEnum<typeof RetentionStartPoint>>;
186
- deletedCount: z.ZodNumber;
187
184
  runRef: import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<z.ZodString>>;
188
185
  sweptAt: import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<z.ZodDate>>;
186
+ deletedCount: z.ZodNumber;
187
+ retentionClass: import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<z.ZodEnum<typeof DataRetentionClass>>>>;
188
+ heldSkippedCount: z.ZodOptional<z.ZodNumber>;
189
+ startPoint: import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<z.ZodEnum<typeof RetentionStartPoint>>;
189
190
  retentionDaysApplied: z.ZodOptional<z.ZodNumber>;
190
191
  cutoff: z.ZodOptional<z.ZodDate>;
191
192
  oldestDeletedStartedAt: z.ZodOptional<z.ZodDate>;
192
193
  newestDeletedStartedAt: z.ZodOptional<z.ZodDate>;
193
- heldSkippedCount: z.ZodOptional<z.ZodNumber>;
194
194
  statutoryRestrictedCount: z.ZodOptional<z.ZodNumber>;
195
195
  reachedRunCeiling: z.ZodBoolean;
196
196
  failureStage: z.ZodOptional<import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<z.ZodEnum<typeof RetentionClassSweepFailureStage>>>;
@@ -1 +1 @@
1
- {"version":3,"file":"retention-enforcement-records.shared.schemas.d.ts","sourceRoot":"","sources":["../../../../../src/compliance/privacy/retention-enforcement-records.shared.schemas.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiCG;AACH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EAAE,kBAAkB,EAAE,mBAAmB,EAAE,MAAM,qCAAqC,CAAC;AAE9F,gIAAgI;AAChI;;;GAGG;AACH,oBAAY,2BAA2B;IACrC,sGAAsG;IACtG,SAAS,cAAc;IACvB;;;;OAIG;IACH,mBAAmB,wBAAwB;IAC3C,wHAAwH;IACxH,MAAM,WAAW;IACjB,gHAAgH;IAChH,OAAO,YAAY;CACpB;AAED,uHAAuH;AACvH,oBAAY,+BAA+B;IACzC,2FAA2F;I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EAAE,IAAI,CAAC,gCAAgC,EAAE,cAAc,GAAG,YAAY,GAAG,mBAAmB,CAAC,GAAG,2BAA2B,CAK9K;AAED;;;;;GAKG;AACH,wBAAgB,iCAAiC,CAC/C,MAAM,EAAE,gCAAgC,EACxC,GAAG,EAAE;IAAE,QAAQ,CAAC,aAAa,CAAC,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,OAAO,EAAE,IAAI,CAAA;CAAE,GACxF,IAAI,CAAC,0BAA0B,EAAE,KAAK,GAAG,WAAW,CAAC,CAoBvD;AAED;;;;;;;;;GASG;AACH,eAAO,MAAM,wCAAwC;;;;;;;;;;;;;;;;;iBAA6F,CAAC;AACnJ,MAAM,MAAM,kCAAkC,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,wCAAwC,CAAC,CAAC;AAE1G,eAAO,MAAM,kCAAkC;;;;;;;;;;;;;;;;;;;;;;;;iBAM7C,CAAC;AACH,MAAM,MAAM,4BAA4B,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,kCAAkC,CAAC,CAAC;AAI9F;;;;;GAKG;AACH,wBAAgB,qCAAqC,CAAC,KAAK,EAAE,OAAO,GAAG,4BAA4B,GAAG,SAAS,CAY9G"}
1
+ {"version":3,"file":"retention-enforcement-records.shared.schemas.d.ts","sourceRoot":"","sources":["../../../../src/compliance/privacy/retention-enforcement-records.shared.schemas.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiCG;AACH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EAAE,kBAAkB,EAAE,mBAAmB,EAAE,MAAM,qCAAqC,CAAC;AAE9F,gIAAgI;AAChI;;;GAGG;AACH,oBAAY,2BAA2B;IACrC,sGAAsG;IACtG,SAAS,cAAc;IACvB;;;;OAIG;IACH,mBAAmB,wBAAwB;IAC3C,wHAAwH;IACxH,MAAM,WAAW;I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C,UAAU,CAAC,EAAE,6BAA6B,CAAC;CACrD;AAED;;;GAGG;AACH,wBAAgB,6BAA6B,CAAC,MAAM,EAAE,IAAI,CAAC,gCAAgC,EAAE,cAAc,GAAG,YAAY,GAAG,mBAAmB,CAAC,GAAG,2BAA2B,CAK9K;AAED;;;;;GAKG;AACH,wBAAgB,iCAAiC,CAC/C,MAAM,EAAE,gCAAgC,EACxC,GAAG,EAAE;IAAE,QAAQ,CAAC,aAAa,CAAC,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,OAAO,EAAE,IAAI,CAAA;CAAE,GACxF,IAAI,CAAC,0BAA0B,EAAE,KAAK,GAAG,WAAW,CAAC,CAoBvD;AAED;;;;;;;;;GASG;AACH,eAAO,MAAM,wCAAwC;;;;;;;;;;;;;;;;;iBAA6F,CAAC;AACnJ,MAAM,MAAM,kCAAkC,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,wCAAwC,CAAC,CAAC;AAE1G,eAAO,MAAM,kCAAkC;;;;;;;;;;;;;;;;;;;;;;;;iBAM7C,CAAC;AACH,MAAM,MAAM,4BAA4B,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,kCAAkC,CAAC,CAAC;AAI9F;;;;;GAKG;AACH,wBAAgB,qCAAqC,CAAC,KAAK,EAAE,OAAO,GAAG,4BAA4B,GAAG,SAAS,CAY9G"}
@@ -1 +1 @@
1
- {"version":3,"file":"retention-enforcement-records.shared.schemas.js","sourceRoot":"","sources":["../../../../../src/compliance/privacy/retention-enforcement-records.shared.schemas.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiCG;AACH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EAAE,kBAAkB,EAAE,mBAAmB,EAAE,MAAM,qCAAqC,CAAC;AAE9F,gIAAgI;AAChI;;;GAGG;AACH,MAAM,CAAN,IAAY,2BA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AAO,CAAC,KAAK,CAAW,CAAC,CAAC;QAC9F,CAAC;QACD,OAAO,OAAO,CAAC;IACjB,CAAC,CAAC,CAAC;IACH,MAAM,MAAM,GAAG,kCAAkC,CAAC,SAAS,CAAC,EAAE,GAAI,KAAiC,EAAE,OAAO,EAAE,CAAC,CAAC;IAChH,OAAO,MAAM,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,SAAS,CAAC;AAClD,CAAC","sourcesContent":["/**\n * One row per (retention-class sweep run × class-bound resource): what the run deleted for that resource,\n * under which declared period, what it held back, and how it ended (#1636).\n *\n * ## Why a store, when the sweep already returns its outcome\n *\n * GDPR Art. 5(1)(e) (storage limitation) is a principle the operator must be able to DEMONSTRATE\n * (Art. 5(2), accountability). The sweep's run output is transient: a successful run's result is kept only\n * as long as the job execution that carried it, and a failed run survives only as an invocation status. So\n * after #1613 the engine deleted by period and nothing durable said that it had. This row is that record,\n * and it is the first producer of `AssuranceDocumentFactAuthorityKind.RUNTIME_EVIDENCE`: a privacy notice\n * says a class's retention is ENFORCED only when these rows show it.\n *\n * ## Counts and instants only, by construction\n *\n * The evidence must outlive the rows it describes WITHOUT re-creating them. So no field names a deleted\n * row, and none carries a field value: {@link projectRetentionEnforcementRecord} is the only producer and\n * copies a closed list of counts, instants and vocabulary members. A row id or a value added here would\n * turn deletion evidence into a copy of what was deleted — the key set is pinned by a test for that reason.\n *\n * ## Every run, including a failed one\n *\n * The sweep writes one row per bound resource per run in a `finally`, so a run that fails still leaves a\n * `FAILED` row: a failed run is evidence too, and an operator whose sweep stopped working must be able to\n * see WHEN it stopped. A resource the sweep skipped leaves a `SKIPPED` row naming why, because a skip that\n * leaves nothing is indistinguishable from a sweep that never ran.\n *\n * ## Retention of the evidence itself\n *\n * Bound to `AUDIT_LOGS` from `CREATED` (see the resource configuration): this is the operator's defence\n * evidence, so it is kept as long as the audit trail and outlives the data it describes.\n *\n * assurance-control: WILDO.PRIVACY.STORAGE_LIMITATION — records evidence that declared retention was enforced.\n */\nimport { z } from 'zod';\n\nimport { DataRetentionClass, RetentionStartPoint } from './retention-schedule.shared.schemas';\n\n/** @wildo_source:part:start saas.models.privacy.retention-enforcement-record facet:layer:shared facet:audience:app-developer */\n/**\n * How one sweep run ended for one class-bound resource. The three non-skip members are the three outcomes\n * the sweep distinguishes; `SKIPPED` is a resource the sweep deliberately did not work on this run.\n */\nexport enum RetentionEnforcementOutcome {\n /** Every row past its period that the sweep listed was deleted; nothing was left for the next run. */\n COMPLETED = 'COMPLETED',\n /**\n * The run stopped at its per-run ceiling with expired rows still waiting, which the next run resumes.\n * Normal operation after a period is shortened or a backlog builds up, and NOT a failure: the period is\n * being enforced, bounded per run so a mistake cannot become one unbounded delete.\n */\n DEFERRED_BY_CEILING = 'DEFERRED_BY_CEILING',\n /** Listing or deleting failed, or the delete removed nothing. Retention was NOT enforced for this resource this run. */\n FAILED = 'FAILED',\n /** The sweep did not work on this resource this run; `skipReason` says why. Neither enforcement nor failure. */\n SKIPPED = 'SKIPPED',\n}\n\n/** Which step of a resource's sweep failed. Named so the log, the thrown message and the record say the same thing. */\nexport enum RetentionClassSweepFailureStage {\n /** Listing expired rows failed, so nothing more was deleted for that resource this run. */\n READ = 'read',\n /** A service-layer delete failed; earlier rows of the same resource may already be deleted. */\n DELETE = 'delete',\n /** The same rows were listed again after being deleted — the delete removed nothing, so the sweep stopped rather than loop. */\n NO_PROGRESS = 'no-progress',\n /**\n * The active legal holds could not be read (#1634), so whether the listed rows are held is unknown. The\n * sweep deletes nothing more for that resource this run — a read error never means \"not held\".\n */\n LEGAL_HOLD_UNVERIFIABLE = 'legal-hold-unverifiable',\n /**\n * The resource's sweep THREW instead of returning an outcome (every expected failure is caught and reported as\n * one of the stages above). Deletions it made before throwing are not counted, so read `deletedCount: 0` on\n * this stage as \"unknown\", not as \"none\".\n */\n UNEXPECTED = 'unexpected',\n}\n\n/**\n * Why a bound resource was not swept at all this run. A skip is REPORTED, never silent: a sweep that\n * quietly skips a resource is indistinguishable from one that found nothing expired.\n */\nexport enum RetentionClassSweepSkipReason {\n /** The bound class has no declared period. Undecided is never \"delete now\" — the gap is reported instead. */\n CLASS_UNDECLARED = 'class-undeclared',\n /** A SCOPE_DELETED binding whose rows die in the tenant purge cascade: the purge enforces it. */\n ENFORCED_BY_TENANT_PURGE = 'enforced-by-tenant-purge',\n}\n\nexport const RetentionEnforcementRecordSchema = z.object({\n /** Document id. `.isPrimaryKey()` is what makes the PostgreSQL planner emit the PRIMARY KEY constraint. */\n _id: z.string().isPrimaryKey().isSummaryField(),\n\n /**\n * The application RECORD id, the APPLICATION scope's key, stamped from the canonical identity. Optional because\n * the routed APPLICATION edge is OPTIONAL (the Mongo convertor requires the column's requiredness to match the\n * edge), and because a run whose identity cannot be resolved still writes its evidence, without it.\n */\n applicationId: z.string().isDBIndexed().optional(),\n\n /**\n * The sweep run — one ATTEMPT — this row belongs to: `<jobId>/<attempt id>` when the queue ran it (the prefix is\n * the `JobExecution` key; retries share it, so the attempt keeps them apart), otherwise an id the sweep minted.\n * Every row of one attempt carries the same value, so a run's rows group.\n */\n runRef: z.string().min(1).isDBIndexed().isSummaryField(),\n /** The instant the run computed its cutoffs from. The window the evidence door filters on. */\n sweptAt: z.date().isDBIndexed().isSummaryField(),\n\n retentionClass: z.enum(DataRetentionClass).systemEnum('DataRetentionClass').isDBIndexed().isSummaryField(),\n /** The bound resource this row describes. A resource TYPE, never a row. */\n resourceType: z.string().min(1).isDBIndexed().isSummaryField(),\n startPoint: z.enum(RetentionStartPoint).systemEnum('RetentionStartPoint'),\n\n /**\n * The period read from the schedule for THIS run. Stored because a schedule change must be visible in\n * the evidence: the same resource swept under 365 days and then under 30 leaves two rows that say so.\n * Absent on a `SKIPPED` row whose class had no declared period.\n */\n retentionDaysApplied: z.number().int().min(0).optional(),\n /** Rows whose retention start was strictly before this instant were due for deletion. Absent on a skip. */\n cutoff: z.date().optional(),\n\n deletedCount: z.number().int().min(0),\n /** The retention start of the earliest and latest row deleted: the window actually deleted, not the one due. */\n oldestDeletedStartedAt: z.date().optional(),\n newestDeletedStartedAt: z.date().optional(),\n /**\n * Rows past their period the sweep did NOT delete because a legal hold covers them (#1634). ABSENT means\n * no hold check ran for this resource this run — \"not measured\", which is not the same as zero.\n */\n heldSkippedCount: z.number().int().min(0).optional(),\n /**\n * Rows retained under a statutory restriction (#1635) that are still inside their period — a count only.\n * ABSENT means nothing measured it this run.\n */\n statutoryRestrictedCount: z.number().int().min(0).optional(),\n reachedRunCeiling: z.boolean(),\n\n outcome: z.enum(RetentionEnforcementOutcome).systemEnum('RetentionEnforcementOutcome').isDBIndexed().isSummaryField(),\n failureStage: z.enum(RetentionClassSweepFailureStage).systemEnum('RetentionClassSweepFailureStage').optional(),\n skipReason: z.enum(RetentionClassSweepSkipReason).systemEnum('RetentionClassSweepSkipReason').optional(),\n\n createdAt: z.date().default(() => new Date()).isDBIndexed().excludeFromCreate().excludeFromUpdate(),\n});\nexport type RetentionEnforcementRecord = z.infer<typeof RetentionEnforcementRecordSchema>;\n/** @wildo_source:part:end saas.models.privacy.retention-enforcement-record */\n\n/**\n * How often the retention-class sweep runs: hourly (`RETENTION_CLASS_SWEEP_CRON`, `15 * * * *`, in the backend's\n * batch manifests). A COPY, because the manifest lives in the backend and the reader deciding whether a record\n * is recent — the document-fact derivation — cannot import it; a backend test pins the two together.\n */\nexport const RETENTION_CLASS_SWEEP_INTERVAL_MS = 60 * 60 * 1000;\n\n/** What the sweep knows about one bound resource at the end of a run — the input {@link projectRetentionEnforcementRecord} reads. */\nexport interface RetentionEnforcementRecordSource {\n readonly resourceType: string;\n readonly retentionClass: DataRetentionClass;\n readonly startPoint: RetentionStartPoint;\n readonly retentionDaysApplied?: number;\n readonly cutoff?: Date;\n readonly deletedCount: number;\n readonly oldestDeletedStartedAt?: Date;\n readonly newestDeletedStartedAt?: Date;\n readonly heldSkippedCount?: number;\n readonly statutoryRestrictedCount?: number;\n readonly reachedRunCeiling: boolean;\n readonly failureStage?: RetentionClassSweepFailureStage;\n readonly skipReason?: RetentionClassSweepSkipReason;\n}\n\n/**\n * The outcome a resource's run ended in. ONE rule, so the record, the audit event and the log cannot\n * disagree about whether a run failed: a failure stage wins over everything, then a skip, then the ceiling.\n */\nexport function retentionEnforcementOutcomeOf(source: Pick<RetentionEnforcementRecordSource, 'failureStage' | 'skipReason' | 'reachedRunCeiling'>): RetentionEnforcementOutcome {\n if (source.failureStage !== undefined) return RetentionEnforcementOutcome.FAILED;\n if (source.skipReason !== undefined) return RetentionEnforcementOutcome.SKIPPED;\n if (source.reachedRunCeiling) return RetentionEnforcementOutcome.DEFERRED_BY_CEILING;\n return RetentionEnforcementOutcome.COMPLETED;\n}\n\n/**\n * The ONLY way a retention-enforcement record is built: a closed projection of one resource's sweep outcome.\n *\n * Closed on purpose. It names every field it copies, so a row id or a field value added to the sweep's\n * outcome later cannot reach the table by accident (see the file header).\n */\nexport function projectRetentionEnforcementRecord(\n source: RetentionEnforcementRecordSource,\n run: { readonly applicationId?: string; readonly runRef: string; readonly sweptAt: Date },\n): Omit<RetentionEnforcementRecord, '_id' | 'createdAt'> {\n return {\n ...(run.applicationId !== undefined ? { applicationId: run.applicationId } : {}),\n runRef: run.runRef,\n sweptAt: run.sweptAt,\n retentionClass: source.retentionClass,\n resourceType: source.resourceType,\n startPoint: source.startPoint,\n ...(source.retentionDaysApplied !== undefined ? { retentionDaysApplied: source.retentionDaysApplied } : {}),\n ...(source.cutoff !== undefined ? { cutoff: source.cutoff } : {}),\n deletedCount: source.deletedCount,\n ...(source.oldestDeletedStartedAt !== undefined ? { oldestDeletedStartedAt: source.oldestDeletedStartedAt } : {}),\n ...(source.newestDeletedStartedAt !== undefined ? { newestDeletedStartedAt: source.newestDeletedStartedAt } : {}),\n ...(source.heldSkippedCount !== undefined ? { heldSkippedCount: source.heldSkippedCount } : {}),\n ...(source.statutoryRestrictedCount !== undefined ? { statutoryRestrictedCount: source.statutoryRestrictedCount } : {}),\n reachedRunCeiling: source.reachedRunCeiling,\n outcome: retentionEnforcementOutcomeOf(source),\n ...(source.failureStage !== undefined ? { failureStage: source.failureStage } : {}),\n ...(source.skipReason !== undefined ? { skipReason: source.skipReason } : {}),\n };\n}\n\n/**\n * # Retention enforcement, answered to an evidence reader\n *\n * assurance-control: WILDO.PRIVACY.STORAGE_LIMITATION — whether each declared period was enforced is\n * answerable for any window.\n *\n * What `GET /assurance/retention-enforcement-evidence` returns: the enforcement records whose run fell in a\n * closed window. The records ARE counts and instants (see the file header), so handing them over names no\n * person and no deleted row; the door drops only the storage ids.\n */\nexport const RetentionEnforcementEvidenceRecordSchema = RetentionEnforcementRecordSchema.omit({ _id: true, applicationId: true, createdAt: true });\nexport type RetentionEnforcementEvidenceRecord = z.infer<typeof RetentionEnforcementEvidenceRecordSchema>;\n\nexport const RetentionEnforcementEvidenceSchema = z.object({\n window: z.object({ from: z.string(), to: z.string() }),\n /** Every record whose `sweptAt` falls in the window, oldest first. */\n records: z.array(RetentionEnforcementEvidenceRecordSchema),\n /** How many distinct sweep runs those records come from. */\n runCount: z.number().int().min(0),\n});\nexport type RetentionEnforcementEvidence = z.infer<typeof RetentionEnforcementEvidenceSchema>;\n\nconst RETENTION_ENFORCEMENT_RECORD_INSTANT_FIELDS = ['sweptAt', 'cutoff', 'oldestDeletedStartedAt', 'newestDeletedStartedAt'] as const;\n\n/**\n * Read an evidence answer that crossed a JSON boundary — the door's response, or the copy the assurance\n * collector committed — back into {@link RetentionEnforcementEvidence}. ONE place revives the instants, which\n * JSON carries as strings, so every reader of a committed answer reads it alike. `undefined` when the value is\n * not an evidence answer: a reader treats that as \"no evidence\", never as \"nothing enforced\".\n */\nexport function parseRetentionEnforcementEvidenceJson(value: unknown): RetentionEnforcementEvidence | undefined {\n if (!value || typeof value !== 'object' || !Array.isArray((value as { records?: unknown }).records)) return undefined;\n const records = ((value as { records: unknown[] }).records).map((record) => {\n if (!record || typeof record !== 'object') return record;\n const revived: Record<string, unknown> = { ...(record as Record<string, unknown>) };\n for (const field of RETENTION_ENFORCEMENT_RECORD_INSTANT_FIELDS) {\n if (typeof revived[field] === 'string') revived[field] = new Date(revived[field] as string);\n }\n return revived;\n });\n const parsed = RetentionEnforcementEvidenceSchema.safeParse({ ...(value as Record<string, unknown>), records });\n return parsed.success ? parsed.data : undefined;\n}\n"]}
1
+ {"version":3,"file":"retention-enforcement-records.shared.schemas.js","sourceRoot":"","sources":["../../../../src/compliance/privacy/retention-enforcement-records.shared.schemas.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiCG;AACH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EAAE,kBAAkB,EAAE,mBAAmB,EAAE,MAAM,qCAAqC,CAAC;AAE9F,gIAAgI;AAChI;;;GAGG;AACH,MAAM,CAAN,IAAY,2BAaX;AAbD,WAAY,2BAA2B;IACrC,sGAAsG;IACtG,sDAAuB,CAAA;IACvB;;;;OAIG;IACH,0EAA2C,CAAA;IAC3C,wHAAwH;IACxH,gDAAiB,CAAA;IACjB,gHAAgH;IAChH,kDAAmB,CAAA;AACrB,CAAC,EAbW,2BAA2B,KAA3B,2BAA2B,QAatC;AAED,uHAAuH;AACvH,MAAM,CAAN,IAAY,+BAkBX;AAlBD,WAAY,+BAA+B;IACzC,2FAA2F;IAC3F,gDAAa,CAAA;IACb,+FAA+F;IAC/F,oDAAiB,CAAA;IACjB,+HAA+H;IAC/H,8DAA2B,CAAA;IAC3B;;;OAGG;IACH,sFAAmD,CAAA;IACnD;;;;OAIG;IACH,4DAAyB,CAAA;AAC3B,CAAC,EAlBW,+BAA+B,KAA/B,+BAA+B,QAkB1C;AAED;;;GAGG;AACH,MAAM,CAAN,IAAY,6BAKX;AALD,WAAY,6BAA6B;IACvC,6GAA6G;IAC7G,sEAAqC,CAAA;IACrC,iGAAiG;IACjG,sFAAqD,CAAA;AACvD,CAAC,EALW,6BAA6B,KAA7B,6BAA6B,QAKxC;AAED,M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AClE,IAAI,CAAC,KAAK,IAAI,OAAO,KAAK,KAAK,QAAQ,IAAI,CAAC,KAAK,CAAC,OAAO,CAAE,KAA+B,CAAC,OAAO,CAAC;QAAE,OAAO,SAAS,CAAC;IACtH,MAAM,OAAO,GAAG,CAAE,KAAgC,CAAC,OAAO,CAAC,CAAC,GAAG,CAAC,CAAC,MAAM,EAAE,EAAE;QACzE,IAAI,CAAC,MAAM,IAAI,OAAO,MAAM,KAAK,QAAQ;YAAE,OAAO,MAAM,CAAC;QACzD,MAAM,OAAO,GAA4B,EAAE,GAAI,MAAkC,EAAE,CAAC;QACpF,KAAK,MAAM,KAAK,IAAI,2CAA2C,EAAE,CAAC;YAChE,IAAI,OAAO,OAAO,CAAC,KAAK,CAAC,KAAK,QAAQ;gBAAE,OAAO,CAAC,KAAK,CAAC,GAAG,IAAI,IAAI,CAAC,OAAO,CAAC,KAAK,CAAW,CAAC,CAAC;QAC9F,CAAC;QACD,OAAO,OAAO,CAAC;IACjB,CAAC,CAAC,CAAC;IACH,MAAM,MAAM,GAAG,kCAAkC,CAAC,SAAS,CAAC,EAAE,GAAI,KAAiC,EAAE,OAAO,EAAE,CAAC,CAAC;IAChH,OAAO,MAAM,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,SAAS,CAAC;AAClD,CAAC","sourcesContent":["/**\n * One row per (retention-class sweep run × class-bound resource): what the run deleted for that resource,\n * under which declared period, what it held back, and how it ended (#1636).\n *\n * ## Why a store, when the sweep already returns its outcome\n *\n * GDPR Art. 5(1)(e) (storage limitation) is a principle the operator must be able to DEMONSTRATE\n * (Art. 5(2), accountability). The sweep's run output is transient: a successful run's result is kept only\n * as long as the job execution that carried it, and a failed run survives only as an invocation status. So\n * after #1613 the engine deleted by period and nothing durable said that it had. This row is that record,\n * and it is the first producer of `AssuranceDocumentFactAuthorityKind.RUNTIME_EVIDENCE`: a privacy notice\n * says a class's retention is ENFORCED only when these rows show it.\n *\n * ## Counts and instants only, by construction\n *\n * The evidence must outlive the rows it describes WITHOUT re-creating them. So no field names a deleted\n * row, and none carries a field value: {@link projectRetentionEnforcementRecord} is the only producer and\n * copies a closed list of counts, instants and vocabulary members. A row id or a value added here would\n * turn deletion evidence into a copy of what was deleted — the key set is pinned by a test for that reason.\n *\n * ## Every run, including a failed one\n *\n * The sweep writes one row per bound resource per run in a `finally`, so a run that fails still leaves a\n * `FAILED` row: a failed run is evidence too, and an operator whose sweep stopped working must be able to\n * see WHEN it stopped. A resource the sweep skipped leaves a `SKIPPED` row naming why, because a skip that\n * leaves nothing is indistinguishable from a sweep that never ran.\n *\n * ## Retention of the evidence itself\n *\n * Bound to `AUDIT_LOGS` from `CREATED` (see the resource configuration): this is the operator's defence\n * evidence, so it is kept as long as the audit trail and outlives the data it describes.\n *\n * assurance-control: WILDO.PRIVACY.STORAGE_LIMITATION — records evidence that declared retention was enforced.\n */\nimport { z } from 'zod';\n\nimport { DataRetentionClass, RetentionStartPoint } from './retention-schedule.shared.schemas';\n\n/** @wildo_source:part:start saas.models.privacy.retention-enforcement-record facet:layer:shared facet:audience:app-developer */\n/**\n * How one sweep run ended for one class-bound resource. The three non-skip members are the three outcomes\n * the sweep distinguishes; `SKIPPED` is a resource the sweep deliberately did not work on this run.\n */\nexport enum RetentionEnforcementOutcome {\n /** Every row past its period that the sweep listed was deleted; nothing was left for the next run. */\n COMPLETED = 'COMPLETED',\n /**\n * The run stopped at its per-run ceiling with expired rows still waiting, which the next run resumes.\n * Normal operation after a period is shortened or a backlog builds up, and NOT a failure: the period is\n * being enforced, bounded per run so a mistake cannot become one unbounded delete.\n */\n DEFERRED_BY_CEILING = 'DEFERRED_BY_CEILING',\n /** Listing or deleting failed, or the delete removed nothing. Retention was NOT enforced for this resource this run. */\n FAILED = 'FAILED',\n /** The sweep did not work on this resource this run; `skipReason` says why. Neither enforcement nor failure. */\n SKIPPED = 'SKIPPED',\n}\n\n/** Which step of a resource's sweep failed. Named so the log, the thrown message and the record say the same thing. */\nexport enum RetentionClassSweepFailureStage {\n /** Listing expired rows failed, so nothing more was deleted for that resource this run. */\n READ = 'read',\n /** A service-layer delete failed; earlier rows of the same resource may already be deleted. */\n DELETE = 'delete',\n /** The same rows were listed again after being deleted — the delete removed nothing, so the sweep stopped rather than loop. */\n NO_PROGRESS = 'no-progress',\n /**\n * The active legal holds could not be read (#1634), so whether the listed rows are held is unknown. The\n * sweep deletes nothing more for that resource this run — a read error never means \"not held\".\n */\n LEGAL_HOLD_UNVERIFIABLE = 'legal-hold-unverifiable',\n /**\n * The resource's sweep THREW instead of returning an outcome (every expected failure is caught and reported as\n * one of the stages above). Deletions it made before throwing are not counted, so read `deletedCount: 0` on\n * this stage as \"unknown\", not as \"none\".\n */\n UNEXPECTED = 'unexpected',\n}\n\n/**\n * Why a bound resource was not swept at all this run. A skip is REPORTED, never silent: a sweep that\n * quietly skips a resource is indistinguishable from one that found nothing expired.\n */\nexport enum RetentionClassSweepSkipReason {\n /** The bound class has no declared period. Undecided is never \"delete now\" — the gap is reported instead. */\n CLASS_UNDECLARED = 'class-undeclared',\n /** A SCOPE_DELETED binding whose rows die in the tenant purge cascade: the purge enforces it. */\n ENFORCED_BY_TENANT_PURGE = 'enforced-by-tenant-purge',\n}\n\nexport const RetentionEnforcementRecordSchema = z.object({\n /** Document id. `.isPrimaryKey()` is what makes the PostgreSQL planner emit the PRIMARY KEY constraint. */\n _id: z.string().isPrimaryKey().isSummaryField(),\n\n /**\n * The application RECORD id, the APPLICATION scope's key, stamped from the canonical identity. Optional because\n * the routed APPLICATION edge is OPTIONAL (the Mongo convertor requires the column's requiredness to match the\n * edge), and because a run whose identity cannot be resolved still writes its evidence, without it.\n */\n applicationId: z.string().isDBIndexed().optional(),\n\n /**\n * The sweep run — one ATTEMPT — this row belongs to: `<jobId>/<attempt id>` when the queue ran it (the prefix is\n * the `JobExecution` key; retries share it, so the attempt keeps them apart), otherwise an id the sweep minted.\n * Every row of one attempt carries the same value, so a run's rows group.\n */\n runRef: z.string().min(1).isDBIndexed().isSummaryField(),\n /** The instant the run computed its cutoffs from. The window the evidence door filters on. */\n sweptAt: z.date().isDBIndexed().isSummaryField(),\n\n retentionClass: z.enum(DataRetentionClass).systemEnum('DataRetentionClass').isDBIndexed().isSummaryField(),\n /** The bound resource this row describes. A resource TYPE, never a row. */\n resourceType: z.string().min(1).isDBIndexed().isSummaryField(),\n startPoint: z.enum(RetentionStartPoint).systemEnum('RetentionStartPoint'),\n\n /**\n * The period read from the schedule for THIS run. Stored because a schedule change must be visible in\n * the evidence: the same resource swept under 365 days and then under 30 leaves two rows that say so.\n * Absent on a `SKIPPED` row whose class had no declared period.\n */\n retentionDaysApplied: z.number().int().min(0).optional(),\n /** Rows whose retention start was strictly before this instant were due for deletion. Absent on a skip. */\n cutoff: z.date().optional(),\n\n deletedCount: z.number().int().min(0),\n /** The retention start of the earliest and latest row deleted: the window actually deleted, not the one due. */\n oldestDeletedStartedAt: z.date().optional(),\n newestDeletedStartedAt: z.date().optional(),\n /**\n * Rows past their period the sweep did NOT delete because a legal hold covers them (#1634). ABSENT means\n * no hold check ran for this resource this run — \"not measured\", which is not the same as zero.\n */\n heldSkippedCount: z.number().int().min(0).optional(),\n /**\n * Rows retained under a statutory restriction (#1635) that are still inside their period — a count only.\n * ABSENT means nothing measured it this run.\n */\n statutoryRestrictedCount: z.number().int().min(0).optional(),\n reachedRunCeiling: z.boolean(),\n\n outcome: z.enum(RetentionEnforcementOutcome).systemEnum('RetentionEnforcementOutcome').isDBIndexed().isSummaryField(),\n failureStage: z.enum(RetentionClassSweepFailureStage).systemEnum('RetentionClassSweepFailureStage').optional(),\n skipReason: z.enum(RetentionClassSweepSkipReason).systemEnum('RetentionClassSweepSkipReason').optional(),\n\n createdAt: z.date().default(() => new Date()).isDBIndexed().excludeFromCreate().excludeFromUpdate(),\n});\nexport type RetentionEnforcementRecord = z.infer<typeof RetentionEnforcementRecordSchema>;\n/** @wildo_source:part:end saas.models.privacy.retention-enforcement-record */\n\n/**\n * How often the retention-class sweep runs: hourly (`RETENTION_CLASS_SWEEP_CRON`, `15 * * * *`, in the backend's\n * batch manifests). A COPY, because the manifest lives in the backend and the reader deciding whether a record\n * is recent — the document-fact derivation — cannot import it; a backend test pins the two together.\n */\nexport const RETENTION_CLASS_SWEEP_INTERVAL_MS = 60 * 60 * 1000;\n\n/** What the sweep knows about one bound resource at the end of a run — the input {@link projectRetentionEnforcementRecord} reads. */\nexport interface RetentionEnforcementRecordSource {\n readonly resourceType: string;\n readonly retentionClass: DataRetentionClass;\n readonly startPoint: RetentionStartPoint;\n readonly retentionDaysApplied?: number;\n readonly cutoff?: Date;\n readonly deletedCount: number;\n readonly oldestDeletedStartedAt?: Date;\n readonly newestDeletedStartedAt?: Date;\n readonly heldSkippedCount?: number;\n readonly statutoryRestrictedCount?: number;\n readonly reachedRunCeiling: boolean;\n readonly failureStage?: RetentionClassSweepFailureStage;\n readonly skipReason?: RetentionClassSweepSkipReason;\n}\n\n/**\n * The outcome a resource's run ended in. ONE rule, so the record, the audit event and the log cannot\n * disagree about whether a run failed: a failure stage wins over everything, then a skip, then the ceiling.\n */\nexport function retentionEnforcementOutcomeOf(source: Pick<RetentionEnforcementRecordSource, 'failureStage' | 'skipReason' | 'reachedRunCeiling'>): RetentionEnforcementOutcome {\n if (source.failureStage !== undefined) return RetentionEnforcementOutcome.FAILED;\n if (source.skipReason !== undefined) return RetentionEnforcementOutcome.SKIPPED;\n if (source.reachedRunCeiling) return RetentionEnforcementOutcome.DEFERRED_BY_CEILING;\n return RetentionEnforcementOutcome.COMPLETED;\n}\n\n/**\n * The ONLY way a retention-enforcement record is built: a closed projection of one resource's sweep outcome.\n *\n * Closed on purpose. It names every field it copies, so a row id or a field value added to the sweep's\n * outcome later cannot reach the table by accident (see the file header).\n */\nexport function projectRetentionEnforcementRecord(\n source: RetentionEnforcementRecordSource,\n run: { readonly applicationId?: string; readonly runRef: string; readonly sweptAt: Date },\n): Omit<RetentionEnforcementRecord, '_id' | 'createdAt'> {\n return {\n ...(run.applicationId !== undefined ? { applicationId: run.applicationId } : {}),\n runRef: run.runRef,\n sweptAt: run.sweptAt,\n retentionClass: source.retentionClass,\n resourceType: source.resourceType,\n startPoint: source.startPoint,\n ...(source.retentionDaysApplied !== undefined ? { retentionDaysApplied: source.retentionDaysApplied } : {}),\n ...(source.cutoff !== undefined ? { cutoff: source.cutoff } : {}),\n deletedCount: source.deletedCount,\n ...(source.oldestDeletedStartedAt !== undefined ? { oldestDeletedStartedAt: source.oldestDeletedStartedAt } : {}),\n ...(source.newestDeletedStartedAt !== undefined ? { newestDeletedStartedAt: source.newestDeletedStartedAt } : {}),\n ...(source.heldSkippedCount !== undefined ? { heldSkippedCount: source.heldSkippedCount } : {}),\n ...(source.statutoryRestrictedCount !== undefined ? { statutoryRestrictedCount: source.statutoryRestrictedCount } : {}),\n reachedRunCeiling: source.reachedRunCeiling,\n outcome: retentionEnforcementOutcomeOf(source),\n ...(source.failureStage !== undefined ? { failureStage: source.failureStage } : {}),\n ...(source.skipReason !== undefined ? { skipReason: source.skipReason } : {}),\n };\n}\n\n/**\n * # Retention enforcement, answered to an evidence reader\n *\n * assurance-control: WILDO.PRIVACY.STORAGE_LIMITATION — whether each declared period was enforced is\n * answerable for any window.\n *\n * What `GET /assurance/retention-enforcement-evidence` returns: the enforcement records whose run fell in a\n * closed window. The records ARE counts and instants (see the file header), so handing them over names no\n * person and no deleted row; the door drops only the storage ids.\n */\nexport const RetentionEnforcementEvidenceRecordSchema = RetentionEnforcementRecordSchema.omit({ _id: true, applicationId: true, createdAt: true });\nexport type RetentionEnforcementEvidenceRecord = z.infer<typeof RetentionEnforcementEvidenceRecordSchema>;\n\nexport const RetentionEnforcementEvidenceSchema = z.object({\n window: z.object({ from: z.string(), to: z.string() }),\n /** Every record whose `sweptAt` falls in the window, oldest first. */\n records: z.array(RetentionEnforcementEvidenceRecordSchema),\n /** How many distinct sweep runs those records come from. */\n runCount: z.number().int().min(0),\n});\nexport type RetentionEnforcementEvidence = z.infer<typeof RetentionEnforcementEvidenceSchema>;\n\nconst RETENTION_ENFORCEMENT_RECORD_INSTANT_FIELDS = ['sweptAt', 'cutoff', 'oldestDeletedStartedAt', 'newestDeletedStartedAt'] as const;\n\n/**\n * Read an evidence answer that crossed a JSON boundary — the door's response, or the copy the assurance\n * collector committed — back into {@link RetentionEnforcementEvidence}. ONE place revives the instants, which\n * JSON carries as strings, so every reader of a committed answer reads it alike. `undefined` when the value is\n * not an evidence answer: a reader treats that as \"no evidence\", never as \"nothing enforced\".\n */\nexport function parseRetentionEnforcementEvidenceJson(value: unknown): RetentionEnforcementEvidence | undefined {\n if (!value || typeof value !== 'object' || !Array.isArray((value as { records?: unknown }).records)) return undefined;\n const records = ((value as { records: unknown[] }).records).map((record) => {\n if (!record || typeof record !== 'object') return record;\n const revived: Record<string, unknown> = { ...(record as Record<string, unknown>) };\n for (const field of RETENTION_ENFORCEMENT_RECORD_INSTANT_FIELDS) {\n if (typeof revived[field] === 'string') revived[field] = new Date(revived[field] as string);\n }\n return revived;\n });\n const parsed = RetentionEnforcementEvidenceSchema.safeParse({ ...(value as Record<string, unknown>), records });\n return parsed.success ? parsed.data : undefined;\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"retention-schedule.shared.schemas.d.ts","sourceRoot":"","sources":["../../../../../src/compliance/privacy/retention-schedule.shared.schemas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,sHAAsH;AACtH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA0CG;AACH,oBAAY,kBAAkB;IAC5B;;;;;OAKG;IACH,aAAa,kBAAkB;IAC/B,kMAAkM;IAClM,KAAK,UAAU;IACf;;;;;;;OAOG;IACH,UAAU,eAAe;IACzB,kNAAkN;IAClN,gBAAgB,qBAAqB;IACrC;;;;;;;;;;;;;;;;OAgBG;IACH,gBAAgB,qBAAqB;CACtC;AACD,oEAAoE;AAEpE,qHAAqH;AACrH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AACH,oBAAY,mBAAmB;IAC7B,qGAAqG;IACrG,OAAO,YAAY;IACnB,uGAAuG;IACvG,YAAY,iBAAiB;IAC7B;;;;OAIG;IACH,aAAa,kBAAkB;IAC/B;;;OAGG;IACH,oBAAoB,yBAAyB;IAC7C;;;;;;;;;;OAUG;IACH,aAAa,kBAAkB;CAChC;AAED,uHAAuH;AACvH,eAAO,MAAM,+BAA+B,uBAAuB,CAAC;AAEpE;;;;;;;;;;GAUG;AACH,eAAO,MAAM,8BAA8B;IACzC,kIAAkI;;IAElI,0FAA0F;;IAE1F;;;;;;OAMG;;kBAEH,CAAC;AACH,MAAM,MAAM,wBAAwB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,8BAA8B,CAAC,CAAC;AACtF,mEAAmE;AAEnE,sEAAsE;AACtE;;;;;;GAMG;AACH,eAAO,MAAM,yBAAyB;IACpC;;;;;;;OAOG;;IAEH;;;;;;OAMG;;kBAEH,CAAC;AACH,MAAM,MAAM,mBAAmB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,yBAAyB,CAAC,CAAC;AAE5E;;;;;;;;;;;;;GAaG;AACH,eAAO,MAAM,kCAAkC;IAlC7C;;;;;;;OAOG;;IAEH;;;;;;OAMG;;mBAsBJ,CAAC;AACF,MAAM,MAAM,4BAA4B,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,kCAAkC,CAAC,CAAC;AAC9F,oEAAoE;AAEpE;;;;;GAKG;AACH,wBAAgB,0BAA0B,CACxC,QAAQ,EAAE,4BAA4B,GAAG,SAAS,GACjD,SAAS,kBAAkB,EAAE,CAE/B"}
1
+ {"version":3,"file":"retention-schedule.shared.schemas.d.ts","sourceRoot":"","sources":["../../../../src/compliance/privacy/retention-schedule.shared.schemas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,sHAAsH;AACtH;;;;;;;;;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;;;;;GAKG;AACH,wBAAgB,0BAA0B,CACxC,QAAQ,EAAE,4BAA4B,GAAG,SAAS,GACjD,SAAS,kBAAkB,EAAE,CAE/B"}
@@ -1 +1 @@
1
- {"version":3,"file":"retention-schedule.shared.schemas.js","sourceRoot":"","sources":["../../../../../src/compliance/privacy/retention-schedule.shared.schemas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,sHAAsH;AACtH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA0CG;AACH,MAAM,CAAN,IAAY,kBAuCX;AAvCD,WAAY,kBAAkB;IAC5B;;;;;OAKG;IACH,qDAA+B,CAAA;IAC/B,kMAAkM;IAClM,qCAAe,CAAA;IACf;;;;;;;OAOG;IACH,+CAAyB,CAAA;IACzB,kNAAkN;IAClN,2DAAqC,CAAA;IACrC;;;;;;;;;;;;;;;;OAgBG;IACH,2DAAqC,CAAA;AACvC,CAAC,EAvCW,kBAAkB,KAAlB,kBAAkB,QAuC7B;AACD,oEAAoE;AAEpE,qHAAqH;AACrH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AACH,MAAM,CAAN,IAAY,mBA4BX;AA5BD,WAAY,mBAAmB;IAC7B,qGAAqG;IACrG,0CAAmB,CAAA;IACnB,uGAAuG;IACvG,oDAA6B,CAAA;IAC7B;;;;OAIG;IACH,sDAA+B,CAAA;IAC/B;;;OAGG;IACH,oEAA6C,CAAA;IAC7C;;;;;;;;;;OAUG;IACH,sDAA+B,CAAA;AACjC,CAAC,EA5BW,mBAAmB,KAAnB,mBAAmB,QA4B9B;AAED,uHAAuH;AACvH,MAAM,CAAC,MAAM,+BAA+B,GAAG,oBAAoB,CAAC;AAEpE;;;;;;;;;;GAUG;AACH,MAAM,CAAC,MAAM,8BAA8B,GAAG,CAAC,CAAC,YAAY,CAAC;IAC3D,kIAAkI;IAClI,cAAc,EAAE,CAAC,CAAC,IAAI,CAAC,kBAAkB,CAAC;IAC1C,0FAA0F;IAC1F,UAAU,EAAE,CAAC,CAAC,IAAI,CAAC,mBAAmB,CAAC;IACvC;;;;;;OAMG;IACH,gBAAgB,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,IAAI,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,QAAQ,EAAE;CACtD,CAAC,CAAC;AAEH,mEAAmE;AAEnE,sEAAsE;AACtE;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,yBAAyB,GAAG,CAAC,CAAC,YAAY,CAAC;IACtD;;;;;;;OAOG;IACH,aAAa,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,QAAQ,EAAE;IAC1C;;;;;;OAMG;IACH,SAAS,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,IAAI,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;CACpC,CAAC,CAAC;AAGH;;;;;;;;;;;;;GAaG;AACH,MAAM,CAAC,MAAM,kCAAkC,GAAG,CAAC,CAAC,aAAa,CAC/D,CAAC,CAAC,IAAI,CAAC,kBAAkB,CAAC,EAC1B,yBAAyB,CAC1B,CAAC;AAEF,oEAAoE;AAEpE;;;;;GAKG;AACH,MAAM,UAAU,0BAA0B,CACxC,QAAkD;IAElD,OAAO,MAAM,CAAC,MAAM,CAAC,kBAAkB,CAAC,CAAC,MAAM,CAAC,CAAC,SAAS,EAAE,EAAE,CAAC,QAAQ,EAAE,CAAC,SAAS,CAAC,KAAK,SAAS,CAAC,CAAC;AACtG,CAAC","sourcesContent":["import { z } from \"zod\";\n\n/** @wildo_source:part:start saas.models.privacy.retention-schedule facet:layer:shared facet:audience:app-developer */\n/**\n * **The data classes an application declares a retention period for.**\n *\n * ## Why a handful of classes, and not one period per resource\n *\n * `retentionPolicy.mode` on a resource says WHAT erasure does to a row. Nothing said HOW LONG a row\n * is kept, and a privacy notice cannot be written without that number: a confident paragraph about\n * impersonalization READS to a reader as an answer about retention, so the derivable half made the\n * missing half harder to see rather than easier (issue #89).\n *\n * The first design put a duration on every resource. It was rejected as false precision: an operator\n * decides \"customer data three years, logs ninety days, audit seven years\", not twelve numbers, and\n * twelve numbers are twelve things to keep true. What an operator actually decides is a schedule over\n * DATA CLASSES — and those classes are the ones that already differ in law, in storage and in who\n * asks for them.\n *\n * ## The classes are the STORES, and that is deliberate\n *\n * Each member maps to a distinct backing service, so one declaration answers two questions that have\n * always been asked separately: what a privacy notice must state, and what a backup-and-restore\n * inventory must protect and for how long (issue #8, which today has no inventory of any kind).\n *\n * | class | where it lives |\n * |---|---|\n * | {@link RESOURCE_DATA} | MongoDB / PostgreSQL |\n * | {@link FILES} | MinIO / S3 |\n * | {@link AUDIT_LOGS} | immudb — the tamper-evident ledger |\n * | {@link OPERATIONAL_LOGS} | the logging pipeline |\n * | {@link BUSINESS_RECORDS} | MongoDB / PostgreSQL — the one class split by LAW rather than by store |\n *\n * Splitting further is available later and is not free: every additional class is another period an\n * operator must decide and defend, and an undecided period is worse than a coarse one. The criterion\n * for a new member is that its records differ in law, in storage or in who asks for them —\n * {@link BUSINESS_RECORDS} is the first split made on the law alone (#1613).\n *\n * ## How a row is bound to a class\n *\n * A resource declares `retentionBinding: { retentionClass, startPoint }` in its resource\n * configuration ({@link ResourceRetentionBindingSchema}). An engine sweep then deletes a bound row\n * once `retentionDays` of its class have passed since the row's {@link RetentionStartPoint}. A\n * resource with no binding is kept until it is erased, and is reported by\n * `unboundRetentionResources` so the gap stays visible.\n */\nexport enum DataRetentionClass {\n /**\n * The application's own records — every resource row in its primary datastore.\n *\n * The class a privacy notice's retention paragraph is mostly about, because it is where the data a\n * customer gave the application lives.\n */\n RESOURCE_DATA = \"RESOURCE_DATA\",\n /** Uploaded file BYTES in object storage. Separate because their lawful window rarely matches the row that references them, and because losing them is a different incident from losing a row. */\n FILES = \"FILES\",\n /**\n * The audit trail.\n *\n * Kept longest, and for a reason no other class shares: it is the record an operator needs to\n * DEFEND itself, which is exactly the GDPR Art. 17(3) ground on which erasure may lawfully be\n * refused. Never fold this into {@link RESOURCE_DATA} — doing so would let a shorter customer-data\n * period silently shorten the evidence an operator may need years later.\n */\n AUDIT_LOGS = \"AUDIT_LOGS\",\n /** Operational and diagnostic logs. Usually the shortest period, and the one most often left undeclared because nobody thinks of it as personal data — it routinely carries IP addresses and user identifiers. */\n OPERATIONAL_LOGS = \"OPERATIONAL_LOGS\",\n /**\n * Records whose MINIMUM retention is set by law: business correspondence, accounting documents and\n * their supporting pieces.\n *\n * A separate class because its members differ in law from {@link RESOURCE_DATA}: the period is a\n * statutory floor, not the operator's choice, and it usually outlives the customer relationship.\n * Germany's HGB §257 and AO §147 require 6 years for business letters and 8 for booking vouchers,\n * counted from the end of the calendar year; France's Code de commerce L123-22 requires 10 years\n * for accounting documents; UK law-firm practice follows the 15-year long-stop of the Limitation\n * Act 1980 s.14B. Folding these into {@link RESOURCE_DATA} would force one of two wrong answers:\n * delete statutory records with the customer data, or keep all customer data for a decade.\n *\n * Carries NO default period, like every class: the number depends on the jurisdiction and the\n * record, and a defaulted statutory period is a legal statement nobody made. A resource that binds\n * it usually counts from {@link RetentionStartPoint.END_OF_CALENDAR_YEAR}. What an erasure does to a\n * row still inside its period is the subject-erasure lane's (#1635), not this class's.\n */\n BUSINESS_RECORDS = \"BUSINESS_RECORDS\",\n}\n/** @wildo_source:part:end saas.models.privacy.retention-schedule */\n\n/** @wildo_source:part:start saas.models.privacy.retention-binding facet:layer:shared facet:audience:app-developer */\n/**\n * **When a bound row's retention clock starts.**\n *\n * A schedule period is counted \"from the point the application stops needing it for the purpose it\n * was collected for\" ({@link DataRetentionPeriodSchema}), so binding a live record to a class\n * counted from its CREATION would delete it while it is still in use. Every binding therefore names\n * its start point explicitly: there is no default, because every candidate default deletes somebody's\n * live data for some resource (#1613 review F1).\n *\n * ## The instant is READ from what the framework already records — not stamped a second time\n *\n * Four of the five members read an instant the row already carries, so the retention clock is the\n * same value every other surface shows, and no write path has to remember to maintain a copy:\n *\n * | member | the clock starts at | read from |\n * |---|---|---|\n * | {@link CREATED} | the insert | `createdAt` — infrastructure-owned on both adapters |\n * | {@link LAST_UPDATED} | the most recent update | `updatedAt` — infrastructure-owned on both adapters |\n * | {@link CLOSURE_EVENT} | the moment the declared closure date field is set | that field; null never expires |\n * | {@link END_OF_CALENDAR_YEAR} | 31 December 23:59:59.999 UTC of the creation year | `createdAt` |\n * | {@link SCOPE_DELETED} | the row's organization was marked for deletion | `retentionStartedAt`, stamped by the tenant purge |\n *\n * Rejected: persisting a `retentionStartedAt` on EVERY bound row. `createdAt` and `updatedAt` are\n * already maintained by the persistence adapter on every write path (the Mongoose timestamps plugin;\n * the PostgreSQL repository's timestamp stamping), and a second copy would have to be written at\n * each of those paths too — the one-invariant-many-sites shape that has shipped half-applied\n * repeatedly in this repository. Only {@link SCOPE_DELETED} has no instant on the row, so only it\n * stores one.\n *\n * The EXPIRY is never stored, for any member: the sweep computes `start + retentionDays` from the\n * CURRENT schedule at every run, so changing a period needs no backfill.\n */\nexport enum RetentionStartPoint {\n /** At insert. For records whose purpose ends with their creation: a log line, a delivery attempt. */\n CREATED = \"CREATED\",\n /** At every update. For state kept only while it is still being touched: a draft, a session record. */\n LAST_UPDATED = \"LAST_UPDATED\",\n /**\n * When the resource's declared `closureFieldName` date field is set — a ticket closed, a contract\n * ended, a case archived. While that field is null the row never expires, which is what makes this\n * the member for \"kept while it is open, then N days\".\n */\n CLOSURE_EVENT = \"CLOSURE_EVENT\",\n /**\n * 31 December 23:59:59.999 UTC of the year the row was created — how HGB §257(5) and AO §147(4)\n * count commercial and tax retention.\n */\n END_OF_CALENDAR_YEAR = \"END_OF_CALENDAR_YEAR\",\n /**\n * When the row's organization is marked for deletion — \"kept while the account exists, then N days\".\n *\n * Two cases, decided at startup by the resource's `organizations → <resource>` teardown edge:\n * - the edge DELETES the row in the tenant purge: the purge IS the enforcement, at\n * `tenantTeardown.retentionWindowDays`, which is single-sourced to {@link DataRetentionClass.RESOURCE_DATA}\n * — so only that class may be bound this way;\n * - the row OUTLIVES its tenant (the edge is disabled, retains-and-impersonalizes, or is absent):\n * the purge stamps `retentionStartedAt` with the organization's `deletionRequestedAt`, and the\n * retention sweep deletes the row after its own class period.\n */\n SCOPE_DELETED = \"SCOPE_DELETED\",\n}\n\n/** The one field the framework stores for a retention clock: the {@link RetentionStartPoint.SCOPE_DELETED} instant. */\nexport const RETENTION_STARTED_AT_FIELD_NAME = \"retentionStartedAt\";\n\n/**\n * A resource's binding to a {@link DataRetentionClass}, declared as `retentionBinding` in its\n * resource configuration.\n *\n * ⚠️ NOT `retentionPolicy`. That is the erasure TREATMENT (what an erasure does to a row: delete, or\n * retain and scrub); this is the retention PERIOD (how long a row is kept at all). A resource may\n * declare either, both or neither, and they answer different questions for different readers.\n *\n * Strict, so a misspelled key fails at configuration build instead of being ignored — an ignored\n * binding would be a retention period the application states and nothing enforces.\n */\nexport const ResourceRetentionBindingSchema = z.strictObject({\n /** The class whose declared period applies. The period itself lives in the application's `dataRetention` schedule, never here. */\n retentionClass: z.enum(DataRetentionClass),\n /** When the clock starts. Required, with no default — see {@link RetentionStartPoint}. */\n startPoint: z.enum(RetentionStartPoint),\n /**\n * The date field whose value is the closure instant. Required for, and only allowed with,\n * {@link RetentionStartPoint.CLOSURE_EVENT}; the resource factory refuses a field that is not a\n * date, is not database-indexed (the sweep queries it on every run), or can be written by a\n * client-routed create or update (a caller could backdate it into a delete). Make it server-owned:\n * excluded from create and update, set by the owning handlers, declared in their `authoritativeFields`.\n */\n closureFieldName: z.string().trim().min(1).optional(),\n});\nexport type ResourceRetentionBinding = z.infer<typeof ResourceRetentionBindingSchema>;\n/** @wildo_source:part:end saas.models.privacy.retention-binding */\n\n/** @wildo_source:part:start saas.models.privacy.retention-schedule */\n/**\n * One declared retention period.\n *\n * `retentionDays` is REQUIRED when a class is declared at all: the whole point is the number. A class\n * an application has not decided is OMITTED from the schedule, which is a different answer and stays\n * a different answer — see {@link ApplicationRetentionScheduleSchema}.\n */\nexport const DataRetentionPeriodSchema = z.strictObject({\n /**\n * How long a record of this class is kept, counted from the point the application stops needing it\n * for the purpose it was collected for.\n *\n * Days rather than a duration string because it is the unit every downstream consumer needs — a\n * notice renders it, a backup schedule compares it, and a sweep would subtract it. A free-text\n * period (\"as long as necessary\") is the placeholder this field exists to make impossible.\n */\n retentionDays: z.number().int().positive(),\n /**\n * WHY this period, in the operator's words — the lawful basis, the contractual term, the statutory\n * minimum.\n *\n * Required, and it is the field that keeps the number honest: a period with no stated reason is a\n * guess that will be published as a commitment. A notice may render it; a reviewer certainly reads it.\n */\n rationale: z.string().trim().min(1),\n});\nexport type DataRetentionPeriod = z.infer<typeof DataRetentionPeriodSchema>;\n\n/**\n * The application's declared retention schedule — a period per {@link DataRetentionClass}.\n *\n * ## Partial ON PURPOSE, and absence is never read as \"kept forever\"\n *\n * Every class is optional, and an omitted class means *the operator has not decided this yet* — not\n * that nothing is kept, and not that it is kept indefinitely. Both of those would be a statement, and\n * neither is one anybody made.\n *\n * That is what makes this safe to ship before an operator has answered: a compliance document states\n * the classes that ARE declared and marks the rest as needing a decision, naming who supplies it. The\n * alternative — requiring every class — would block a document on a number nobody has yet, which is\n * exactly the gate this whole capability exists to remove. **Never default a period.**\n */\nexport const ApplicationRetentionScheduleSchema = z.partialRecord(\n z.enum(DataRetentionClass),\n DataRetentionPeriodSchema,\n);\nexport type ApplicationRetentionSchedule = z.infer<typeof ApplicationRetentionScheduleSchema>;\n/** @wildo_source:part:end saas.models.privacy.retention-schedule */\n\n/**\n * The classes an application has NOT declared a period for — what a document must mark as owed.\n *\n * Derived rather than stored, and total over the enum, so a class added to the vocabulary tomorrow is\n * reported as undeclared by every existing application rather than silently omitted from the answer.\n */\nexport function undeclaredRetentionClasses(\n schedule: ApplicationRetentionSchedule | undefined,\n): readonly DataRetentionClass[] {\n return Object.values(DataRetentionClass).filter((dataClass) => schedule?.[dataClass] === undefined);\n}\n"]}
1
+ {"version":3,"file":"retention-schedule.shared.schemas.js","sourceRoot":"","sources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AG,CAAC,CAAC,CAAC,CAAC,QAAQ,EAAE;CACtD,CAAC,CAAC;AAEH,mEAAmE;AAEnE,sEAAsE;AACtE;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,yBAAyB,GAAG,CAAC,CAAC,YAAY,CAAC;IACtD;;;;;;;OAOG;IACH,aAAa,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,QAAQ,EAAE;IAC1C;;;;;;OAMG;IACH,SAAS,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,IAAI,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;CACpC,CAAC,CAAC;AAGH;;;;;;;;;;;;;GAaG;AACH,MAAM,CAAC,MAAM,kCAAkC,GAAG,CAAC,CAAC,aAAa,CAC/D,CAAC,CAAC,IAAI,CAAC,kBAAkB,CAAC,EAC1B,yBAAyB,CAC1B,CAAC;AAEF,oEAAoE;AAEpE;;;;;GAKG;AACH,MAAM,UAAU,0BAA0B,CACxC,QAAkD;IAElD,OAAO,MAAM,CAAC,MAAM,CAAC,kBAAkB,CAAC,CAAC,MAAM,CAAC,CAAC,SAAS,EAAE,EAAE,CAAC,QAAQ,EAAE,CAAC,SAAS,CAAC,KAAK,SAAS,CAAC,CAAC;AACtG,CAAC","sourcesContent":["import { z } from \"zod\";\n\n/** @wildo_source:part:start saas.models.privacy.retention-schedule facet:layer:shared facet:audience:app-developer */\n/**\n * **The data classes an application declares a retention period for.**\n *\n * ## Why a handful of classes, and not one period per resource\n *\n * `retentionPolicy.mode` on a resource says WHAT erasure does to a row. Nothing said HOW LONG a row\n * is kept, and a privacy notice cannot be written without that number: a confident paragraph about\n * impersonalization READS to a reader as an answer about retention, so the derivable half made the\n * missing half harder to see rather than easier (issue #89).\n *\n * The first design put a duration on every resource. It was rejected as false precision: an operator\n * decides \"customer data three years, logs ninety days, audit seven years\", not twelve numbers, and\n * twelve numbers are twelve things to keep true. What an operator actually decides is a schedule over\n * DATA CLASSES — and those classes are the ones that already differ in law, in storage and in who\n * asks for them.\n *\n * ## The classes are the STORES, and that is deliberate\n *\n * Each member maps to a distinct backing service, so one declaration answers two questions that have\n * always been asked separately: what a privacy notice must state, and what a backup-and-restore\n * inventory must protect and for how long (issue #8, which today has no inventory of any kind).\n *\n * | class | where it lives |\n * |---|---|\n * | {@link RESOURCE_DATA} | MongoDB / PostgreSQL |\n * | {@link FILES} | MinIO / S3 |\n * | {@link AUDIT_LOGS} | immudb — the tamper-evident ledger |\n * | {@link OPERATIONAL_LOGS} | the logging pipeline |\n * | {@link BUSINESS_RECORDS} | MongoDB / PostgreSQL — the one class split by LAW rather than by store |\n *\n * Splitting further is available later and is not free: every additional class is another period an\n * operator must decide and defend, and an undecided period is worse than a coarse one. The criterion\n * for a new member is that its records differ in law, in storage or in who asks for them —\n * {@link BUSINESS_RECORDS} is the first split made on the law alone (#1613).\n *\n * ## How a row is bound to a class\n *\n * A resource declares `retentionBinding: { retentionClass, startPoint }` in its resource\n * configuration ({@link ResourceRetentionBindingSchema}). An engine sweep then deletes a bound row\n * once `retentionDays` of its class have passed since the row's {@link RetentionStartPoint}. A\n * resource with no binding is kept until it is erased, and is reported by\n * `unboundRetentionResources` so the gap stays visible.\n */\nexport enum DataRetentionClass {\n /**\n * The application's own records — every resource row in its primary datastore.\n *\n * The class a privacy notice's retention paragraph is mostly about, because it is where the data a\n * customer gave the application lives.\n */\n RESOURCE_DATA = \"RESOURCE_DATA\",\n /** Uploaded file BYTES in object storage. Separate because their lawful window rarely matches the row that references them, and because losing them is a different incident from losing a row. */\n FILES = \"FILES\",\n /**\n * The audit trail.\n *\n * Kept longest, and for a reason no other class shares: it is the record an operator needs to\n * DEFEND itself, which is exactly the GDPR Art. 17(3) ground on which erasure may lawfully be\n * refused. Never fold this into {@link RESOURCE_DATA} — doing so would let a shorter customer-data\n * period silently shorten the evidence an operator may need years later.\n */\n AUDIT_LOGS = \"AUDIT_LOGS\",\n /** Operational and diagnostic logs. Usually the shortest period, and the one most often left undeclared because nobody thinks of it as personal data — it routinely carries IP addresses and user identifiers. */\n OPERATIONAL_LOGS = \"OPERATIONAL_LOGS\",\n /**\n * Records whose MINIMUM retention is set by law: business correspondence, accounting documents and\n * their supporting pieces.\n *\n * A separate class because its members differ in law from {@link RESOURCE_DATA}: the period is a\n * statutory floor, not the operator's choice, and it usually outlives the customer relationship.\n * Germany's HGB §257 and AO §147 require 6 years for business letters and 8 for booking vouchers,\n * counted from the end of the calendar year; France's Code de commerce L123-22 requires 10 years\n * for accounting documents; UK law-firm practice follows the 15-year long-stop of the Limitation\n * Act 1980 s.14B. Folding these into {@link RESOURCE_DATA} would force one of two wrong answers:\n * delete statutory records with the customer data, or keep all customer data for a decade.\n *\n * Carries NO default period, like every class: the number depends on the jurisdiction and the\n * record, and a defaulted statutory period is a legal statement nobody made. A resource that binds\n * it usually counts from {@link RetentionStartPoint.END_OF_CALENDAR_YEAR}. What an erasure does to a\n * row still inside its period is the subject-erasure lane's (#1635), not this class's.\n */\n BUSINESS_RECORDS = \"BUSINESS_RECORDS\",\n}\n/** @wildo_source:part:end saas.models.privacy.retention-schedule */\n\n/** @wildo_source:part:start saas.models.privacy.retention-binding facet:layer:shared facet:audience:app-developer */\n/**\n * **When a bound row's retention clock starts.**\n *\n * A schedule period is counted \"from the point the application stops needing it for the purpose it\n * was collected for\" ({@link DataRetentionPeriodSchema}), so binding a live record to a class\n * counted from its CREATION would delete it while it is still in use. Every binding therefore names\n * its start point explicitly: there is no default, because every candidate default deletes somebody's\n * live data for some resource (#1613 review F1).\n *\n * ## The instant is READ from what the framework already records — not stamped a second time\n *\n * Four of the five members read an instant the row already carries, so the retention clock is the\n * same value every other surface shows, and no write path has to remember to maintain a copy:\n *\n * | member | the clock starts at | read from |\n * |---|---|---|\n * | {@link CREATED} | the insert | `createdAt` — infrastructure-owned on both adapters |\n * | {@link LAST_UPDATED} | the most recent update | `updatedAt` — infrastructure-owned on both adapters |\n * | {@link CLOSURE_EVENT} | the moment the declared closure date field is set | that field; null never expires |\n * | {@link END_OF_CALENDAR_YEAR} | 31 December 23:59:59.999 UTC of the creation year | `createdAt` |\n * | {@link SCOPE_DELETED} | the row's organization was marked for deletion | `retentionStartedAt`, stamped by the tenant purge |\n *\n * Rejected: persisting a `retentionStartedAt` on EVERY bound row. `createdAt` and `updatedAt` are\n * already maintained by the persistence adapter on every write path (the Mongoose timestamps plugin;\n * the PostgreSQL repository's timestamp stamping), and a second copy would have to be written at\n * each of those paths too — the one-invariant-many-sites shape that has shipped half-applied\n * repeatedly in this repository. Only {@link SCOPE_DELETED} has no instant on the row, so only it\n * stores one.\n *\n * The EXPIRY is never stored, for any member: the sweep computes `start + retentionDays` from the\n * CURRENT schedule at every run, so changing a period needs no backfill.\n */\nexport enum RetentionStartPoint {\n /** At insert. For records whose purpose ends with their creation: a log line, a delivery attempt. */\n CREATED = \"CREATED\",\n /** At every update. For state kept only while it is still being touched: a draft, a session record. */\n LAST_UPDATED = \"LAST_UPDATED\",\n /**\n * When the resource's declared `closureFieldName` date field is set — a ticket closed, a contract\n * ended, a case archived. While that field is null the row never expires, which is what makes this\n * the member for \"kept while it is open, then N days\".\n */\n CLOSURE_EVENT = \"CLOSURE_EVENT\",\n /**\n * 31 December 23:59:59.999 UTC of the year the row was created — how HGB §257(5) and AO §147(4)\n * count commercial and tax retention.\n */\n END_OF_CALENDAR_YEAR = \"END_OF_CALENDAR_YEAR\",\n /**\n * When the row's organization is marked for deletion — \"kept while the account exists, then N days\".\n *\n * Two cases, decided at startup by the resource's `organizations → <resource>` teardown edge:\n * - the edge DELETES the row in the tenant purge: the purge IS the enforcement, at\n * `tenantTeardown.retentionWindowDays`, which is single-sourced to {@link DataRetentionClass.RESOURCE_DATA}\n * — so only that class may be bound this way;\n * - the row OUTLIVES its tenant (the edge is disabled, retains-and-impersonalizes, or is absent):\n * the purge stamps `retentionStartedAt` with the organization's `deletionRequestedAt`, and the\n * retention sweep deletes the row after its own class period.\n */\n SCOPE_DELETED = \"SCOPE_DELETED\",\n}\n\n/** The one field the framework stores for a retention clock: the {@link RetentionStartPoint.SCOPE_DELETED} instant. */\nexport const RETENTION_STARTED_AT_FIELD_NAME = \"retentionStartedAt\";\n\n/**\n * A resource's binding to a {@link DataRetentionClass}, declared as `retentionBinding` in its\n * resource configuration.\n *\n * ⚠️ NOT `retentionPolicy`. That is the erasure TREATMENT (what an erasure does to a row: delete, or\n * retain and scrub); this is the retention PERIOD (how long a row is kept at all). A resource may\n * declare either, both or neither, and they answer different questions for different readers.\n *\n * Strict, so a misspelled key fails at configuration build instead of being ignored — an ignored\n * binding would be a retention period the application states and nothing enforces.\n */\nexport const ResourceRetentionBindingSchema = z.strictObject({\n /** The class whose declared period applies. The period itself lives in the application's `dataRetention` schedule, never here. */\n retentionClass: z.enum(DataRetentionClass),\n /** When the clock starts. Required, with no default — see {@link RetentionStartPoint}. */\n startPoint: z.enum(RetentionStartPoint),\n /**\n * The date field whose value is the closure instant. Required for, and only allowed with,\n * {@link RetentionStartPoint.CLOSURE_EVENT}; the resource factory refuses a field that is not a\n * date, is not database-indexed (the sweep queries it on every run), or can be written by a\n * client-routed create or update (a caller could backdate it into a delete). Make it server-owned:\n * excluded from create and update, set by the owning handlers, declared in their `authoritativeFields`.\n */\n closureFieldName: z.string().trim().min(1).optional(),\n});\nexport type ResourceRetentionBinding = z.infer<typeof ResourceRetentionBindingSchema>;\n/** @wildo_source:part:end saas.models.privacy.retention-binding */\n\n/** @wildo_source:part:start saas.models.privacy.retention-schedule */\n/**\n * One declared retention period.\n *\n * `retentionDays` is REQUIRED when a class is declared at all: the whole point is the number. A class\n * an application has not decided is OMITTED from the schedule, which is a different answer and stays\n * a different answer — see {@link ApplicationRetentionScheduleSchema}.\n */\nexport const DataRetentionPeriodSchema = z.strictObject({\n /**\n * How long a record of this class is kept, counted from the point the application stops needing it\n * for the purpose it was collected for.\n *\n * Days rather than a duration string because it is the unit every downstream consumer needs — a\n * notice renders it, a backup schedule compares it, and a sweep would subtract it. A free-text\n * period (\"as long as necessary\") is the placeholder this field exists to make impossible.\n */\n retentionDays: z.number().int().positive(),\n /**\n * WHY this period, in the operator's words — the lawful basis, the contractual term, the statutory\n * minimum.\n *\n * Required, and it is the field that keeps the number honest: a period with no stated reason is a\n * guess that will be published as a commitment. A notice may render it; a reviewer certainly reads it.\n */\n rationale: z.string().trim().min(1),\n});\nexport type DataRetentionPeriod = z.infer<typeof DataRetentionPeriodSchema>;\n\n/**\n * The application's declared retention schedule — a period per {@link DataRetentionClass}.\n *\n * ## Partial ON PURPOSE, and absence is never read as \"kept forever\"\n *\n * Every class is optional, and an omitted class means *the operator has not decided this yet* — not\n * that nothing is kept, and not that it is kept indefinitely. Both of those would be a statement, and\n * neither is one anybody made.\n *\n * That is what makes this safe to ship before an operator has answered: a compliance document states\n * the classes that ARE declared and marks the rest as needing a decision, naming who supplies it. The\n * alternative — requiring every class — would block a document on a number nobody has yet, which is\n * exactly the gate this whole capability exists to remove. **Never default a period.**\n */\nexport const ApplicationRetentionScheduleSchema = z.partialRecord(\n z.enum(DataRetentionClass),\n DataRetentionPeriodSchema,\n);\nexport type ApplicationRetentionSchedule = z.infer<typeof ApplicationRetentionScheduleSchema>;\n/** @wildo_source:part:end saas.models.privacy.retention-schedule */\n\n/**\n * The classes an application has NOT declared a period for — what a document must mark as owed.\n *\n * Derived rather than stored, and total over the enum, so a class added to the vocabulary tomorrow is\n * reported as undeclared by every existing application rather than silently omitted from the answer.\n */\nexport function undeclaredRetentionClasses(\n schedule: ApplicationRetentionSchedule | undefined,\n): readonly DataRetentionClass[] {\n return Object.values(DataRetentionClass).filter((dataClass) => schedule?.[dataClass] === undefined);\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"retention-scope-deleted.shared.utils.d.ts","sourceRoot":"","sources":["../../../../../src/compliance/privacy/retention-scope-deleted.shared.utils.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,2CAA2C,EAAE,MAAM,iDAAiD,CAAC;AAGnH,OAAO,EAAuB,KAAK,wBAAwB,EAAE,MAAM,qCAAqC,CAAC;AAEzG;;;;;;;GAOG;AACH,oBAAY,gCAAgC;IAC1C;;;;OAIG;IACH,aAAa,kBAAkB;IAC/B;;;;OAIG;IACH,eAAe,oBAAoB;CACpC;AAED;;;;;;;;GAQG;AACH,wBAAgB,wCAAwC,CAAC,aAAa,EAAE;IACtE,QAAQ,CAAC,kBAAkB,EAAE,MAAM,CAAC;IACpC,QAAQ,CAAC,qBAAqB,EAAE,2CAA2C,CAAC;CAC7E,GAAG,gCAAgC,CAenC;AAED;;;;;;;;;GASG;AACH,wBAAgB,uCAAuC,CAAC,cAAc,SAAS;IAC7E,QAAQ,CAAC,kBAAkB,EAAE,MAAM,CAAC;IACpC,QAAQ,CAAC,qBAAqB,EAAE,2CAA2C,CAAC;IAC5E,QAAQ,CAAC,gBAAgB,CAAC,EAAE,wBAAwB,CAAC;CACtD,EAAE,cAAc,EAAE,QAAQ,CAAC,cAAc,CAAC,GAAG,MAAM,EAAE,CAQrD"}
1
+ {"version":3,"file":"retention-scope-deleted.shared.utils.d.ts","sourceRoot":"","sources":["../../../../src/compliance/privacy/retention-scope-deleted.shared.utils.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,2CAA2C,EAAE,MAAM,iDAAiD,CAAC;AAGnH,OAAO,EAAuB,KAAK,wBAAwB,EAAE,MAAM,qCAAqC,CAAC;AAEzG;;;;;;;GAOG;AACH,oBAAY,gCAAgC;IAC1C;;;;OAIG;IACH,aAAa,kBAAkB;IAC/B;;;;OAIG;IACH,eAAe,oBAAoB;CACpC;AAED;;;;;;;;GAQG;AACH,wBAAgB,wCAAwC,CAAC,aAAa,EAAE;IACtE,QAAQ,CAAC,kBAAkB,EAAE,MAAM,CAAC;IACpC,QAAQ,CAAC,qBAAqB,EAAE,2CAA2C,CAAC;CAC7E,GAAG,gCAAgC,CAenC;AAED;;;;;;;;;GASG;AACH,wBAAgB,uCAAuC,CAAC,cAAc,SAAS;IAC7E,QAAQ,CAAC,kBAAkB,EAAE,MAAM,CAAC;IACpC,QAAQ,CAAC,qBAAqB,EAAE,2CAA2C,CAAC;IAC5E,QAAQ,CAAC,gBAAgB,CAAC,EAAE,wBAAwB,CAAC;CACtD,EAAE,cAAc,EAAE,QAAQ,CAAC,cAAc,CAAC,GAAG,MAAM,EAAE,CAQrD"}
@@ -1 +1 @@
1
- {"version":3,"file":"retention-scope-deleted.shared.utils.js","sourceRoot":"","sources":["../../../../../src/compliance/privacy/retention-scope-deleted.shared.utils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,sBAAsB,EAAE,qCAAqC,EAAE,MAAM,iDAAiD,CAAC;AAEhI,OAAO,EAAE,gBAAgB,EAAE,MAAM,mDAAmD,CAAC;AACrF,OAAO,EAAE,qBAAqB,EAAE,MAAM,wCAAwC,CAAC;AAC/E,OAAO,EAAE,mBAAmB,EAAiC,MAAM,qCAAqC,CAAC;AAEzG;;;;;;;GAOG;AACH,MAAM,CAAN,IAAY,gCAaX;AAbD,WAAY,gCAAgC;IAC1C;;;;OAIG;IACH,mEAA+B,CAAA;IAC/B;;;;OAIG;IACH,uEAAmC,CAAA;AACrC,CAAC,EAbW,gCAAgC,KAAhC,gCAAgC,QAa3C;AAED;;;;;;;;GAQG;AACH,MAAM,UAAU,wCAAwC,CAAC,aAGxD;IACC,MAAM,aAAa,GAAG,aAAa,CAAC,qBAAqB,CAAC;IAC1D,MAAM,gBAAgB,GAAG;QACvB,GAAG,aAAa,CAAC,mBAAmB;QACpC,GAAG,aAAa,CAAC,kBAAkB;QACnC,GAAG,aAAa,CAAC,iBAAiB;KACnC,CAAC,IAAI,CAAC,CAAC,YAAY,EAAE,EAAE,CACtB,YAAY,CAAC,aAAa,KAAK,gBAAgB,CAAC,aAAa;WAC1D,YAAY,CAAC,aAAa,KAAK,aAAa,CAAC,kBAAkB,CAAC,CAAC;IACtE,IAAI,CAAC,gBAAgB;QAAE,OAAO,gCAAgC,CAAC,eAAe,CAAC;IAC/E,MAAM,cAAc,GAAG,qBAAqB,CAAC,gDAAgD,CAAC,gBAAgB,CAAC,CAAC;IAChH,iGAAiG;IACjG,MAAM,gBAAgB,GAAG,cAAc,EAAE,OAAO,KAAK,IAAI;WACpD,qCAAqC,CAAC,cAAc,CAAC,KAAK,sBAAsB,CAAC,MAAM,CAAC;IAC7F,OAAO,gBAAgB,CAAC,CAAC,CAAC,gCAAgC,CAAC,aAAa,CAAC,CAAC,CAAC,gCAAgC,CAAC,eAAe,CAAC;AAC9H,CAAC;AAED;;;;;;;;;GASG;AACH,MAAM,UAAU,uCAAuC,CAIpD,cAAwC;IACzC,MAAM,aAAa,GAAa,EAAE,CAAC;IACnC,KAAK,MAAM,aAAa,IAAI,cAAc,EAAE,CAAC;QAC3C,IAAI,aAAa,CAAC,gBAAgB,EAAE,UAAU,KAAK,mBAAmB,CAAC,aAAa;YAAE,SAAS;QAC/F,IAAI,wCAAwC,CAAC,aAAa,CAAC,KAAK,gCAAgC,CAAC,eAAe;YAAE,SAAS;QAC3H,aAAa,CAAC,IAAI,CAAC,aAAa,CAAC,kBAAkB,CAAC,CAAC;IACvD,CAAC;IACD,OAAO,aAAa,CAAC;AACvB,CAAC","sourcesContent":["import { ChildLifecycleStrategy, resolveChildLifecycleTeardownStrategy } from '../../resources/child-operations.shared.schemas';\nimport type { ResourceConfiguration_ResourceRelationships } from '../../resources/resources-config.shared.schemas';\nimport { CoreResourceType } from '../../resources/resources.shared.core.definitions';\nimport { Resources_SharedUtils } from '../../resources/resources.shared.utils';\nimport { RetentionStartPoint, type ResourceRetentionBinding } from './retention-schedule.shared.schemas';\n\n/**\n * How a `RetentionStartPoint.SCOPE_DELETED` binding is ENFORCED — decided by what the tenant purge\n * does to the resource's rows.\n *\n * The purge dispatches the ordinary `ORGANIZATIONS | DELETE`, and the resource's own\n * `organizations → <resource>` teardown edge decides the rows' fate. So there are exactly two cases, and\n * the retention sweep must treat them differently:\n */\nexport enum ScopeDeletedRetentionEnforcement {\n /**\n * The edge DELETES the rows in the purge cascade. The purge IS the enforcement: it fires at\n * `tenantTeardown.retentionWindowDays`, single-sourced to `RESOURCE_DATA`, so only that class may be\n * bound this way, and the sweep has nothing to do for the resource.\n */\n PURGE_CASCADE = 'PURGE_CASCADE',\n /**\n * The rows OUTLIVE their tenant — the edge is disabled, retains-and-impersonalizes, refuses, or does\n * not exist. The purge stamps `retentionStartedAt` with the organization's `deletionRequestedAt`, and\n * the retention sweep deletes each row after its own class period.\n */\n OUTLIVES_TENANT = 'OUTLIVES_TENANT',\n}\n\n/**\n * Classify a resource's SCOPE_DELETED enforcement from its DIRECT `organizations → resource` edge.\n *\n * Only the direct edge is read, deliberately: it is the edge the purge dispatches with the resource's own\n * teardown budget. A resource reached only through a DEEPER cascade (a grandchild of the organization)\n * classifies as {@link ScopeDeletedRetentionEnforcement.OUTLIVES_TENANT}; if the cascade does delete it,\n * the purge's stamp and the sweep simply find nothing, which is the safe direction — a wrong classification\n * the other way would skip a sweep that owes deletions.\n */\nexport function classifyScopeDeletedRetentionEnforcement(configuration: {\n readonly resourceIdentifier: string;\n readonly resourceRelationships: ResourceConfiguration_ResourceRelationships;\n}): ScopeDeletedRetentionEnforcement {\n const relationships = configuration.resourceRelationships;\n const organizationEdge = [\n ...relationships.parentRelationships,\n ...relationships.childRelationships,\n ...relationships.selfRelationships,\n ].find((relationship) =>\n relationship.resourceType1 === CoreResourceType.ORGANIZATIONS\n && relationship.resourceType2 === configuration.resourceIdentifier);\n if (!organizationEdge) return ScopeDeletedRetentionEnforcement.OUTLIVES_TENANT;\n const onParentDelete = Resources_SharedUtils.resolveRelationshipLifecycleOnParentDeleteConfig(organizationEdge);\n // The cascade's own default rule, read through its one named source rather than re-derived here.\n const deletesInCascade = onParentDelete?.enabled === true\n && resolveChildLifecycleTeardownStrategy(onParentDelete) === ChildLifecycleStrategy.DELETE;\n return deletesInCascade ? ScopeDeletedRetentionEnforcement.PURGE_CASCADE : ScopeDeletedRetentionEnforcement.OUTLIVES_TENANT;\n}\n\n/**\n * The resources whose rows OUTLIVE a deleted tenant and are bound to a retention class counted from that\n * deletion (`RetentionStartPoint.SCOPE_DELETED`, {@link ScopeDeletedRetentionEnforcement.OUTLIVES_TENANT}).\n *\n * The ONE selection both ends of the SCOPE_DELETED clock use: the tenant purge STARTS the clock on these\n * resources' rows just before it deletes the organization, and `organizations.restore` CLEARS it on the same\n * resources when a purge that stamped them failed and the tenant is brought back. Two hand-kept filters\n * would drift, and a restore that cleared a narrower set than the purge stamped would leave a live tenant's\n * rows counting down to deletion.\n */\nexport function outlivingScopeDeletedBoundResourceTypes<TConfiguration extends {\n readonly resourceIdentifier: string;\n readonly resourceRelationships: ResourceConfiguration_ResourceRelationships;\n readonly retentionBinding?: ResourceRetentionBinding;\n}>(configurations: Iterable<TConfiguration>): string[] {\n const resourceTypes: string[] = [];\n for (const configuration of configurations) {\n if (configuration.retentionBinding?.startPoint !== RetentionStartPoint.SCOPE_DELETED) continue;\n if (classifyScopeDeletedRetentionEnforcement(configuration) !== ScopeDeletedRetentionEnforcement.OUTLIVES_TENANT) continue;\n resourceTypes.push(configuration.resourceIdentifier);\n }\n return resourceTypes;\n}\n"]}
1
+ {"version":3,"file":"retention-scope-deleted.shared.utils.js","sourceRoot":"","sources":["../../../../src/compliance/privacy/retention-scope-deleted.shared.utils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,sBAAsB,EAAE,qCAAqC,EAAE,MAAM,iDAAiD,CAAC;AAEhI,OAAO,EAAE,gBAAgB,EAAE,MAAM,mDAAmD,CAAC;AACrF,OAAO,EAAE,qBAAqB,EAAE,MAAM,wCAAwC,CAAC;AAC/E,OAAO,EAAE,mBAAmB,EAAiC,MAAM,qCAAqC,CAAC;AAEzG;;;;;;;GAOG;AACH,MAAM,CAAN,IAAY,gCAaX;AAbD,WAAY,gCAAgC;IAC1C;;;;OAIG;IACH,mEAA+B,CAAA;IAC/B;;;;OAIG;IACH,uEAAmC,CAAA;AACrC,CAAC,EAbW,gCAAgC,KAAhC,gCAAgC,QAa3C;AAED;;;;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ecycleTeardownStrategy } from '../../resources/child-operations.shared.schemas';\nimport type { ResourceConfiguration_ResourceRelationships } from '../../resources/resources-config.shared.schemas';\nimport { CoreResourceType } from '../../resources/resources.shared.core.definitions';\nimport { Resources_SharedUtils } from '../../resources/resources.shared.utils';\nimport { RetentionStartPoint, type ResourceRetentionBinding } from './retention-schedule.shared.schemas';\n\n/**\n * How a `RetentionStartPoint.SCOPE_DELETED` binding is ENFORCED — decided by what the tenant purge\n * does to the resource's rows.\n *\n * The purge dispatches the ordinary `ORGANIZATIONS | DELETE`, and the resource's own\n * `organizations → <resource>` teardown edge decides the rows' fate. So there are exactly two cases, and\n * the retention sweep must treat them differently:\n */\nexport enum ScopeDeletedRetentionEnforcement {\n /**\n * The edge DELETES the rows in the purge cascade. The purge IS the enforcement: it fires at\n * `tenantTeardown.retentionWindowDays`, single-sourced to `RESOURCE_DATA`, so only that class may be\n * bound this way, and the sweep has nothing to do for the resource.\n */\n PURGE_CASCADE = 'PURGE_CASCADE',\n /**\n * The rows OUTLIVE their tenant — the edge is disabled, retains-and-impersonalizes, refuses, or does\n * not exist. The purge stamps `retentionStartedAt` with the organization's `deletionRequestedAt`, and\n * the retention sweep deletes each row after its own class period.\n */\n OUTLIVES_TENANT = 'OUTLIVES_TENANT',\n}\n\n/**\n * Classify a resource's SCOPE_DELETED enforcement from its DIRECT `organizations → resource` edge.\n *\n * Only the direct edge is read, deliberately: it is the edge the purge dispatches with the resource's own\n * teardown budget. A resource reached only through a DEEPER cascade (a grandchild of the organization)\n * classifies as {@link ScopeDeletedRetentionEnforcement.OUTLIVES_TENANT}; if the cascade does delete it,\n * the purge's stamp and the sweep simply find nothing, which is the safe direction — a wrong classification\n * the other way would skip a sweep that owes deletions.\n */\nexport function classifyScopeDeletedRetentionEnforcement(configuration: {\n readonly resourceIdentifier: string;\n readonly resourceRelationships: ResourceConfiguration_ResourceRelationships;\n}): ScopeDeletedRetentionEnforcement {\n const relationships = configuration.resourceRelationships;\n const organizationEdge = [\n ...relationships.parentRelationships,\n ...relationships.childRelationships,\n ...relationships.selfRelationships,\n ].find((relationship) =>\n relationship.resourceType1 === CoreResourceType.ORGANIZATIONS\n && relationship.resourceType2 === configuration.resourceIdentifier);\n if (!organizationEdge) return ScopeDeletedRetentionEnforcement.OUTLIVES_TENANT;\n const onParentDelete = Resources_SharedUtils.resolveRelationshipLifecycleOnParentDeleteConfig(organizationEdge);\n // The cascade's own default rule, read through its one named source rather than re-derived here.\n const deletesInCascade = onParentDelete?.enabled === true\n && resolveChildLifecycleTeardownStrategy(onParentDelete) === ChildLifecycleStrategy.DELETE;\n return deletesInCascade ? ScopeDeletedRetentionEnforcement.PURGE_CASCADE : ScopeDeletedRetentionEnforcement.OUTLIVES_TENANT;\n}\n\n/**\n * The resources whose rows OUTLIVE a deleted tenant and are bound to a retention class counted from that\n * deletion (`RetentionStartPoint.SCOPE_DELETED`, {@link ScopeDeletedRetentionEnforcement.OUTLIVES_TENANT}).\n *\n * The ONE selection both ends of the SCOPE_DELETED clock use: the tenant purge STARTS the clock on these\n * resources' rows just before it deletes the organization, and `organizations.restore` CLEARS it on the same\n * resources when a purge that stamped them failed and the tenant is brought back. Two hand-kept filters\n * would drift, and a restore that cleared a narrower set than the purge stamped would leave a live tenant's\n * rows counting down to deletion.\n */\nexport function outlivingScopeDeletedBoundResourceTypes<TConfiguration extends {\n readonly resourceIdentifier: string;\n readonly resourceRelationships: ResourceConfiguration_ResourceRelationships;\n readonly retentionBinding?: ResourceRetentionBinding;\n}>(configurations: Iterable<TConfiguration>): string[] {\n const resourceTypes: string[] = [];\n for (const configuration of configurations) {\n if (configuration.retentionBinding?.startPoint !== RetentionStartPoint.SCOPE_DELETED) continue;\n if (classifyScopeDeletedRetentionEnforcement(configuration) !== ScopeDeletedRetentionEnforcement.OUTLIVES_TENANT) continue;\n resourceTypes.push(configuration.resourceIdentifier);\n }\n return resourceTypes;\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"sharing.shared.schemas.d.ts","sourceRoot":"","sources":["../../../../../src/compliance/privacy/sharing.shared.schemas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC"}
1
+ {"version":3,"file":"sharing.shared.schemas.d.ts","sourceRoot":"","sources":["../../../../src/compliance/privacy/sharing.shared.schemas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"sharing.shared.schemas.js","sourceRoot":"","sources":["../../../../../src/compliance/privacy/sharing.shared.schemas.ts"],"names":[],"mappings":"","sourcesContent":["export {};"]}
1
+ {"version":3,"file":"sharing.shared.schemas.js","sourceRoot":"","sources":["../../../../src/compliance/privacy/sharing.shared.schemas.ts"],"names":[],"mappings":"","sourcesContent":["export {};"]}
@@ -1 +1 @@
1
- {"version":3,"file":"subject-data-recipients.shared.schemas.d.ts","sourceRoot":"","sources":["../../../../../src/compliance/privacy/subject-data-recipients.shared.schemas.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAuDG;AACH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,OAAO,EAAE,oBAAoB,EAAE,MAAM,uDAAuD,CAAC;AAC7F,OAAO,EAAE,sBAAsB,EAAE,MAAM,+CAA+C,CAAC;AACvF,OAAO,EAAE,oBAAoB,EAAE,MAAM,yCAAyC,CAAC;AAC/E,OAAO,EACL,kCAAkC,EAClC,KAAK,mCAAmC,EACzC,MAAM,kCAAkC,CAAC;AAE1C,qHAAqH;AACrH,oBAAY,qCAAqC;IAC/C,+GAA+G;IAC/G,eAAe,oBAAoB;IACnC,qGAAqG;IACrG,gBAAgB,qBAAqB;IACrC,kHAAkH;IAClH,cAAc,mBAAmB;IACjC,mGAAmG;IACnG,6BAA6B,kCAAkC;CAChE;AAED;;;;;GAKG;AACH,oBAAY,yBAAyB;IACnC,sFAAsF;IACtF,gBAAgB,qBAAqB;IACrC,wGAAwG;IACxG,cAA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AAY,EAAE,MAAM,GAAG,MAAM,CAE7E;AAED,+HAA+H;AAC/H,eAAO,MAAM,+CAA+C,4BAA4B,CAAC;AAEzF,+CAA+C;AAC/C,MAAM,WAAW,8BAA8B;IAC7C,YAAY,EAAE,MAAM,CAAC;IACrB,eAAe,EAAE,MAAM,GAAG,IAAI,CAAC;IAC/B,KAAK,EAAE,yBAAyB,CAAC;IACjC,SAAS,EAAE,6BAA6B,CAAC;IACzC,UAAU,EAAE,8BAA8B,CAAC;IAC3C;;;OAGG;IACH,MAAM,EAAE,kCAAkC,GAAG,IAAI,CAAC;IAClD,wGAAwG;IACxG,UAAU,EAAE,MAAM,EAAE,CAAC;CACtB;AAqBD;;;;;;;;;;;;;GAaG;AACH,wBAAgB,iCAAiC,CAAC,MAAM,EAAE;IACxD,SAAS,EAAE,8BAA8B,CAAC;IAC1C,cAAc,EAAE,SAAS,mCAAmC,EAAE,CAAC;IAC/D,sHAAsH;IACtH,uBAAuB,EAAE,WAAW,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CACtD,GAAG;IAAE,UAAU,EAAE,8BAA8B,EAAE,CAAC;IAAC,mBAAmB,EAAE,mCAAmC,EAAE,CAAA;CAAE,CA0C/G;AAkBD,yEAAyE"}
1
+ {"version":3,"file":"subject-data-recipients.shared.schemas.d.ts","sourceRoot":"","sources":["../../../../src/compliance/privacy/subject-data-recipients.shared.schemas.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAuDG;AACH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,OAAO,EAAE,oBAAoB,EAAE,MAAM,uDAAuD,CAAC;AAC7F,OAAO,EAAE,sBAAsB,EAAE,MAAM,+CAA+C,CAAC;AACvF,OAAO,EAAE,oBAAoB,EAAE,MAAM,yCAAyC,CAAC;AAC/E,OAAO,EACL,kCAAkC,EAClC,KAAK,mCAAmC,EACzC,MAAM,kCAA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