@wildo-ai/saas-models 1.1.3 → 1.1.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (890) hide show
  1. package/dist/esm/applications/application-metadata.shared.resources-config.schemas.d.ts +1 -1
  2. package/dist/esm/applications/application-versions.shared.resources-config.schemas.d.ts +1 -1
  3. package/dist/esm/applications/application-versions.shared.resources-config.schemas.js +2 -2
  4. package/dist/esm/applications/application-versions.shared.resources-config.schemas.js.map +1 -1
  5. package/dist/esm/applications/applications-context.schemas.d.ts +236 -18
  6. package/dist/esm/applications/applications-context.schemas.d.ts.map +1 -1
  7. package/dist/esm/applications/applications.shared.resources-config.schemas.d.ts +1 -0
  8. package/dist/esm/applications/applications.shared.resources-config.schemas.d.ts.map +1 -1
  9. package/dist/esm/applications/applications.shared.resources-config.schemas.js +1 -1
  10. package/dist/esm/applications/applications.shared.resources-config.schemas.js.map +1 -1
  11. package/dist/esm/applications/applications.shared.schemas.d.ts +3 -2
  12. package/dist/esm/applications/applications.shared.schemas.d.ts.map +1 -1
  13. package/dist/esm/applications/applications.shared.schemas.js +40 -5
  14. package/dist/esm/applications/applications.shared.schemas.js.map +1 -1
  15. package/dist/esm/billing/billing-account.shared.resources-config.schemas.d.ts +1 -2
  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 +1 -2
  18. package/dist/esm/billing/billing-account.shared.resources-config.schemas.js.map +1 -1
  19. package/dist/esm/billing/billing-enums.shared.schemas.d.ts +87 -5
  20. package/dist/esm/billing/billing-enums.shared.schemas.d.ts.map +1 -1
  21. package/dist/esm/billing/billing-enums.shared.schemas.js +91 -5
  22. package/dist/esm/billing/billing-enums.shared.schemas.js.map +1 -1
  23. package/dist/esm/billing/billing-types.shared.schemas.d.ts +25 -4
  24. package/dist/esm/billing/billing-types.shared.schemas.d.ts.map +1 -1
  25. package/dist/esm/billing/billing-types.shared.schemas.js +61 -0
  26. package/dist/esm/billing/billing-types.shared.schemas.js.map +1 -1
  27. package/dist/esm/billing/price.shared.resources-config.schemas.d.ts.map +1 -1
  28. package/dist/esm/billing/price.shared.resources-config.schemas.js +32 -2
  29. package/dist/esm/billing/price.shared.resources-config.schemas.js.map +1 -1
  30. package/dist/esm/billing/product-behavior-policy.shared.schemas.d.ts.map +1 -1
  31. package/dist/esm/billing/product-behavior-policy.shared.schemas.js +1 -1
  32. package/dist/esm/billing/product-behavior-policy.shared.schemas.js.map +1 -1
  33. package/dist/esm/billing/product.shared.resources-config.schemas.d.ts.map +1 -1
  34. package/dist/esm/billing/product.shared.resources-config.schemas.js +32 -2
  35. package/dist/esm/billing/product.shared.resources-config.schemas.js.map +1 -1
  36. package/dist/esm/billing/product.shared.schemas.d.ts +1 -0
  37. package/dist/esm/billing/product.shared.schemas.d.ts.map +1 -1
  38. package/dist/esm/billing/product.shared.schemas.js +3 -0
  39. package/dist/esm/billing/product.shared.schemas.js.map +1 -1
  40. package/dist/esm/billing/promotions.shared.resources-config.schemas.d.ts.map +1 -1
  41. package/dist/esm/billing/promotions.shared.resources-config.schemas.js +33 -3
  42. package/dist/esm/billing/promotions.shared.resources-config.schemas.js.map +1 -1
  43. package/dist/esm/billing/referral.shared.resources-config.schemas.d.ts.map +1 -1
  44. package/dist/esm/billing/referral.shared.resources-config.schemas.js +22 -2
  45. package/dist/esm/billing/referral.shared.resources-config.schemas.js.map +1 -1
  46. package/dist/esm/billing/referral.shared.schemas.d.ts +1 -0
  47. package/dist/esm/billing/referral.shared.schemas.d.ts.map +1 -1
  48. package/dist/esm/billing/referral.shared.schemas.js +3 -0
  49. package/dist/esm/billing/referral.shared.schemas.js.map +1 -1
  50. package/dist/esm/billing/subscription.shared.resources-config.schemas.d.ts +23 -1
  51. package/dist/esm/billing/subscription.shared.resources-config.schemas.d.ts.map +1 -1
  52. package/dist/esm/billing/subscription.shared.resources-config.schemas.js +48 -2
  53. package/dist/esm/billing/subscription.shared.resources-config.schemas.js.map +1 -1
  54. package/dist/esm/billing/subscription.shared.schemas.d.ts +1 -0
  55. package/dist/esm/billing/subscription.shared.schemas.d.ts.map +1 -1
  56. package/dist/esm/billing/subscription.shared.schemas.js +3 -0
  57. package/dist/esm/billing/subscription.shared.schemas.js.map +1 -1
  58. package/dist/esm/billing/usage-flush-evidence.shared.schemas.d.ts +49 -0
  59. package/dist/esm/billing/usage-flush-evidence.shared.schemas.d.ts.map +1 -0
  60. package/dist/esm/billing/usage-flush-evidence.shared.schemas.js +48 -0
  61. package/dist/esm/billing/usage-flush-evidence.shared.schemas.js.map +1 -0
  62. package/dist/esm/billing/usage-record.shared.schemas.d.ts +1 -0
  63. package/dist/esm/billing/usage-record.shared.schemas.d.ts.map +1 -1
  64. package/dist/esm/billing/usage-record.shared.schemas.js +3 -0
  65. package/dist/esm/billing/usage-record.shared.schemas.js.map +1 -1
  66. package/dist/esm/companion/provider-discovery.shared.schemas.d.ts +8 -0
  67. package/dist/esm/companion/provider-discovery.shared.schemas.d.ts.map +1 -1
  68. package/dist/esm/compliance/audit-trails/application-audit-logs.shared.resources-config.schemas.d.ts +14 -3
  69. package/dist/esm/compliance/audit-trails/application-audit-logs.shared.resources-config.schemas.d.ts.map +1 -1
  70. package/dist/esm/compliance/audit-trails/application-audit-logs.shared.resources-config.schemas.js +21 -7
  71. package/dist/esm/compliance/audit-trails/application-audit-logs.shared.resources-config.schemas.js.map +1 -1
  72. package/dist/esm/compliance/audit-trails/audit-export-projection.shared.schemas.d.ts +450 -0
  73. package/dist/esm/compliance/audit-trails/audit-export-projection.shared.schemas.d.ts.map +1 -0
  74. package/dist/esm/compliance/audit-trails/audit-export-projection.shared.schemas.js +723 -0
  75. package/dist/esm/compliance/audit-trails/audit-export-projection.shared.schemas.js.map +1 -0
  76. package/dist/esm/compliance/audit-trails/audit-logs.shared.resources-config.schemas.d.ts +2 -2
  77. package/dist/esm/compliance/audit-trails/audit-trail-config.shared.schemas.d.ts +8 -0
  78. package/dist/esm/compliance/audit-trails/audit-trail-config.shared.schemas.d.ts.map +1 -1
  79. package/dist/esm/compliance/audit-trails/audit-trail-config.shared.schemas.js +15 -0
  80. package/dist/esm/compliance/audit-trails/audit-trail-config.shared.schemas.js.map +1 -1
  81. package/dist/esm/compliance/audit-trails/auditable-events.shared.schema.d.ts +787 -21
  82. package/dist/esm/compliance/audit-trails/auditable-events.shared.schema.d.ts.map +1 -1
  83. package/dist/esm/compliance/audit-trails/auditable-events.shared.schema.js +1079 -26
  84. package/dist/esm/compliance/audit-trails/auditable-events.shared.schema.js.map +1 -1
  85. package/dist/esm/compliance/audit-trails/security-audit-event-envelope.shared.schema.d.ts.map +1 -1
  86. package/dist/esm/compliance/audit-trails/security-audit-event-envelope.shared.schema.js +51 -0
  87. package/dist/esm/compliance/audit-trails/security-audit-event-envelope.shared.schema.js.map +1 -1
  88. package/dist/esm/compliance/documents/governed-document-interactions.shared.schemas.d.ts +463 -0
  89. package/dist/esm/compliance/documents/governed-document-interactions.shared.schemas.d.ts.map +1 -0
  90. package/dist/esm/compliance/documents/governed-document-interactions.shared.schemas.js +526 -0
  91. package/dist/esm/compliance/documents/governed-document-interactions.shared.schemas.js.map +1 -0
  92. package/dist/esm/compliance/documents/governed-documents.shared.schemas.d.ts +539 -15
  93. package/dist/esm/compliance/documents/governed-documents.shared.schemas.d.ts.map +1 -1
  94. package/dist/esm/compliance/documents/governed-documents.shared.schemas.js +402 -14
  95. package/dist/esm/compliance/documents/governed-documents.shared.schemas.js.map +1 -1
  96. package/dist/esm/compliance/documents/user-governed-document-acceptances.shared.resources-config.schemas.d.ts +18 -0
  97. package/dist/esm/compliance/documents/user-governed-document-acceptances.shared.resources-config.schemas.d.ts.map +1 -0
  98. package/dist/esm/compliance/documents/user-governed-document-acceptances.shared.resources-config.schemas.js +89 -0
  99. package/dist/esm/compliance/documents/user-governed-document-acceptances.shared.resources-config.schemas.js.map +1 -0
  100. package/dist/esm/compliance/documents/user-governed-document-acceptances.shared.schemas.d.ts +47 -0
  101. package/dist/esm/compliance/documents/user-governed-document-acceptances.shared.schemas.d.ts.map +1 -0
  102. package/dist/esm/compliance/documents/user-governed-document-acceptances.shared.schemas.js +73 -0
  103. package/dist/esm/compliance/documents/user-governed-document-acceptances.shared.schemas.js.map +1 -0
  104. package/dist/esm/compliance/privacy/ai-use-posture.shared.schemas.d.ts +21 -0
  105. package/dist/esm/compliance/privacy/ai-use-posture.shared.schemas.d.ts.map +1 -1
  106. package/dist/esm/compliance/privacy/ai-use-posture.shared.schemas.js +39 -1
  107. package/dist/esm/compliance/privacy/ai-use-posture.shared.schemas.js.map +1 -1
  108. package/dist/esm/compliance/privacy/capability-consent-purposes.shared.utils.d.ts +33 -0
  109. package/dist/esm/compliance/privacy/capability-consent-purposes.shared.utils.d.ts.map +1 -0
  110. package/dist/esm/compliance/privacy/capability-consent-purposes.shared.utils.js +30 -0
  111. package/dist/esm/compliance/privacy/capability-consent-purposes.shared.utils.js.map +1 -0
  112. package/dist/esm/compliance/privacy/client-storage.shared.schemas.d.ts +6 -5
  113. package/dist/esm/compliance/privacy/client-storage.shared.schemas.d.ts.map +1 -1
  114. package/dist/esm/compliance/privacy/client-storage.shared.schemas.js +15 -5
  115. package/dist/esm/compliance/privacy/client-storage.shared.schemas.js.map +1 -1
  116. package/dist/esm/compliance/privacy/consent-gate-vocabulary.shared.schemas.d.ts +127 -0
  117. package/dist/esm/compliance/privacy/consent-gate-vocabulary.shared.schemas.d.ts.map +1 -0
  118. package/dist/esm/compliance/privacy/consent-gate-vocabulary.shared.schemas.js +94 -0
  119. package/dist/esm/compliance/privacy/consent-gate-vocabulary.shared.schemas.js.map +1 -0
  120. package/dist/esm/compliance/privacy/consent-purposes.shared.d.ts +125 -0
  121. package/dist/esm/compliance/privacy/consent-purposes.shared.d.ts.map +1 -0
  122. package/dist/esm/compliance/privacy/consent-purposes.shared.js +136 -0
  123. package/dist/esm/compliance/privacy/consent-purposes.shared.js.map +1 -0
  124. package/dist/esm/compliance/privacy/data-subject-rights.shared.schemas.d.ts +91 -0
  125. package/dist/esm/compliance/privacy/data-subject-rights.shared.schemas.d.ts.map +1 -0
  126. package/dist/esm/compliance/privacy/data-subject-rights.shared.schemas.js +123 -0
  127. package/dist/esm/compliance/privacy/data-subject-rights.shared.schemas.js.map +1 -0
  128. package/dist/esm/compliance/privacy/operating-jurisdictions.shared.schemas.d.ts +27 -0
  129. package/dist/esm/compliance/privacy/operating-jurisdictions.shared.schemas.d.ts.map +1 -1
  130. package/dist/esm/compliance/privacy/operating-jurisdictions.shared.schemas.js +36 -2
  131. package/dist/esm/compliance/privacy/operating-jurisdictions.shared.schemas.js.map +1 -1
  132. package/dist/esm/compliance/privacy/operator-compliance-identity.shared.schemas.d.ts +68 -25
  133. package/dist/esm/compliance/privacy/operator-compliance-identity.shared.schemas.d.ts.map +1 -1
  134. package/dist/esm/compliance/privacy/operator-compliance-identity.shared.schemas.js +74 -22
  135. package/dist/esm/compliance/privacy/operator-compliance-identity.shared.schemas.js.map +1 -1
  136. package/dist/esm/compliance/privacy/privacy.shared.schemas.d.ts +9 -17
  137. package/dist/esm/compliance/privacy/privacy.shared.schemas.d.ts.map +1 -1
  138. package/dist/esm/compliance/privacy/privacy.shared.schemas.js +74 -31
  139. package/dist/esm/compliance/privacy/privacy.shared.schemas.js.map +1 -1
  140. package/dist/esm/compliance/privacy/subject-erasure-lane-evidence.shared.schemas.d.ts +47 -0
  141. package/dist/esm/compliance/privacy/subject-erasure-lane-evidence.shared.schemas.d.ts.map +1 -0
  142. package/dist/esm/compliance/privacy/subject-erasure-lane-evidence.shared.schemas.js +98 -0
  143. package/dist/esm/compliance/privacy/subject-erasure-lane-evidence.shared.schemas.js.map +1 -0
  144. package/dist/esm/compliance/privacy/subject-erasure.shared.schemas.d.ts +368 -35
  145. package/dist/esm/compliance/privacy/subject-erasure.shared.schemas.d.ts.map +1 -1
  146. package/dist/esm/compliance/privacy/subject-erasure.shared.schemas.js +403 -17
  147. package/dist/esm/compliance/privacy/subject-erasure.shared.schemas.js.map +1 -1
  148. package/dist/esm/compliance/review-cadence.shared.schemas.d.ts +56 -0
  149. package/dist/esm/compliance/review-cadence.shared.schemas.d.ts.map +1 -0
  150. package/dist/esm/compliance/review-cadence.shared.schemas.js +71 -0
  151. package/dist/esm/compliance/review-cadence.shared.schemas.js.map +1 -0
  152. package/dist/esm/compliance/risk-posture.shared.schemas.d.ts +161 -0
  153. package/dist/esm/compliance/risk-posture.shared.schemas.d.ts.map +1 -0
  154. package/dist/esm/compliance/risk-posture.shared.schemas.js +166 -0
  155. package/dist/esm/compliance/risk-posture.shared.schemas.js.map +1 -0
  156. package/dist/esm/config/analytics-value-moments.shared.schemas.d.ts +4 -3
  157. package/dist/esm/config/analytics-value-moments.shared.schemas.d.ts.map +1 -1
  158. package/dist/esm/config/analytics-value-moments.shared.schemas.js +4 -3
  159. package/dist/esm/config/analytics-value-moments.shared.schemas.js.map +1 -1
  160. package/dist/esm/config/app-configuration-shared.shared.schemas.d.ts +222 -9
  161. package/dist/esm/config/app-configuration-shared.shared.schemas.d.ts.map +1 -1
  162. package/dist/esm/config/app-configuration-shared.shared.schemas.js +232 -9
  163. package/dist/esm/config/app-configuration-shared.shared.schemas.js.map +1 -1
  164. package/dist/esm/config/auth-config-resolution.shared.utils.d.ts +75 -3
  165. package/dist/esm/config/auth-config-resolution.shared.utils.d.ts.map +1 -1
  166. package/dist/esm/config/auth-config-resolution.shared.utils.js +93 -4
  167. package/dist/esm/config/auth-config-resolution.shared.utils.js.map +1 -1
  168. package/dist/esm/config/brand-assets.shared.schemas.d.ts +5 -4
  169. package/dist/esm/config/brand-assets.shared.schemas.d.ts.map +1 -1
  170. package/dist/esm/config/brand-assets.shared.schemas.js +14 -4
  171. package/dist/esm/config/brand-assets.shared.schemas.js.map +1 -1
  172. package/dist/esm/config/entity-identity-config.shared.schemas.d.ts +463 -19
  173. package/dist/esm/config/entity-identity-config.shared.schemas.d.ts.map +1 -1
  174. package/dist/esm/config/entity-identity-config.shared.schemas.js +535 -28
  175. package/dist/esm/config/entity-identity-config.shared.schemas.js.map +1 -1
  176. package/dist/esm/config/frontend/chart-definition.shared.schemas.d.ts +14 -14
  177. package/dist/esm/config/frontend/chart-registration-alignment.shared.d.ts +139 -3
  178. package/dist/esm/config/frontend/chart-registration-alignment.shared.d.ts.map +1 -1
  179. package/dist/esm/config/frontend/chart-registration-alignment.shared.js +151 -4
  180. package/dist/esm/config/frontend/chart-registration-alignment.shared.js.map +1 -1
  181. package/dist/esm/config/frontend/navigation.shared.schemas.d.ts +21 -17
  182. package/dist/esm/config/frontend/navigation.shared.schemas.d.ts.map +1 -1
  183. package/dist/esm/config/frontend/navigation.shared.schemas.js +58 -40
  184. package/dist/esm/config/frontend/navigation.shared.schemas.js.map +1 -1
  185. package/dist/esm/config/frontend/onboarding.shared.schemas.d.ts +90 -133
  186. package/dist/esm/config/frontend/onboarding.shared.schemas.d.ts.map +1 -1
  187. package/dist/esm/config/frontend/onboarding.shared.schemas.js +148 -100
  188. package/dist/esm/config/frontend/onboarding.shared.schemas.js.map +1 -1
  189. package/dist/esm/errors/errors.custom-message-ref.shared.definitions.d.ts +146 -43
  190. package/dist/esm/errors/errors.custom-message-ref.shared.definitions.d.ts.map +1 -1
  191. package/dist/esm/errors/errors.custom-message-ref.shared.definitions.js +147 -42
  192. package/dist/esm/errors/errors.custom-message-ref.shared.definitions.js.map +1 -1
  193. package/dist/esm/errors/errors.shared.definitions.js +1 -1
  194. package/dist/esm/errors/errors.shared.definitions.js.map +1 -1
  195. package/dist/esm/errors/errors.shared.schemas.d.ts +29 -40
  196. package/dist/esm/errors/errors.shared.schemas.d.ts.map +1 -1
  197. package/dist/esm/errors/errors.shared.schemas.js +37 -54
  198. package/dist/esm/errors/errors.shared.schemas.js.map +1 -1
  199. package/dist/esm/errors/errors.shared.utils.d.ts +24 -0
  200. package/dist/esm/errors/errors.shared.utils.d.ts.map +1 -1
  201. package/dist/esm/errors/errors.shared.utils.js +39 -0
  202. package/dist/esm/errors/errors.shared.utils.js.map +1 -1
  203. package/dist/esm/errors/thrown-value-description.shared.utils.d.ts +27 -0
  204. package/dist/esm/errors/thrown-value-description.shared.utils.d.ts.map +1 -0
  205. package/dist/esm/errors/thrown-value-description.shared.utils.js +67 -0
  206. package/dist/esm/errors/thrown-value-description.shared.utils.js.map +1 -0
  207. package/dist/esm/external-data/external-data-pipeline.shared.schemas.d.ts +48 -73
  208. package/dist/esm/external-data/external-data-pipeline.shared.schemas.d.ts.map +1 -1
  209. package/dist/esm/external-data/external-data-pipeline.shared.schemas.js +103 -9
  210. package/dist/esm/external-data/external-data-pipeline.shared.schemas.js.map +1 -1
  211. package/dist/esm/external-data.exports.d.ts +1 -0
  212. package/dist/esm/external-data.exports.d.ts.map +1 -1
  213. package/dist/esm/external-data.exports.js +1 -0
  214. package/dist/esm/external-data.exports.js.map +1 -1
  215. package/dist/esm/external-providers/engine-capabilities.shared.schemas.d.ts +18 -12
  216. package/dist/esm/external-providers/engine-capabilities.shared.schemas.d.ts.map +1 -1
  217. package/dist/esm/external-providers/engine-capabilities.shared.schemas.js +18 -12
  218. package/dist/esm/external-providers/engine-capabilities.shared.schemas.js.map +1 -1
  219. package/dist/esm/external-providers/engine-capability-resolution-mode.shared.d.ts +5 -3
  220. package/dist/esm/external-providers/engine-capability-resolution-mode.shared.d.ts.map +1 -1
  221. package/dist/esm/external-providers/engine-capability-resolution-mode.shared.js +5 -3
  222. package/dist/esm/external-providers/engine-capability-resolution-mode.shared.js.map +1 -1
  223. package/dist/esm/external-providers/engine-capability-surface.shared.d.ts +77 -0
  224. package/dist/esm/external-providers/engine-capability-surface.shared.d.ts.map +1 -0
  225. package/dist/esm/external-providers/engine-capability-surface.shared.js +173 -0
  226. package/dist/esm/external-providers/engine-capability-surface.shared.js.map +1 -0
  227. package/dist/esm/external-providers/external-providers.shared.schemas.d.ts +2 -0
  228. package/dist/esm/external-providers/external-providers.shared.schemas.d.ts.map +1 -1
  229. package/dist/esm/external-providers/external-providers.shared.schemas.js +21 -0
  230. package/dist/esm/external-providers/external-providers.shared.schemas.js.map +1 -1
  231. package/dist/esm/external-providers/frontend-bootstrap.shared.schemas.d.ts +131 -7
  232. package/dist/esm/external-providers/frontend-bootstrap.shared.schemas.d.ts.map +1 -1
  233. package/dist/esm/external-providers/frontend-capability-public-config.shared.schemas.d.ts +114 -0
  234. package/dist/esm/external-providers/frontend-capability-public-config.shared.schemas.d.ts.map +1 -1
  235. package/dist/esm/external-providers/frontend-capability-public-config.shared.schemas.js +148 -0
  236. package/dist/esm/external-providers/frontend-capability-public-config.shared.schemas.js.map +1 -1
  237. package/dist/esm/external-providers/frontend-provider-entry.shared.schemas.d.ts +108 -0
  238. package/dist/esm/external-providers/frontend-provider-entry.shared.schemas.d.ts.map +1 -1
  239. package/dist/esm/external-providers/frontend-provider-entry.shared.schemas.js +86 -0
  240. package/dist/esm/external-providers/frontend-provider-entry.shared.schemas.js.map +1 -1
  241. package/dist/esm/external-providers/frontend-provider-public-config.shared.d.ts +184 -0
  242. package/dist/esm/external-providers/frontend-provider-public-config.shared.d.ts.map +1 -0
  243. package/dist/esm/external-providers/frontend-provider-public-config.shared.js +216 -0
  244. package/dist/esm/external-providers/frontend-provider-public-config.shared.js.map +1 -0
  245. package/dist/esm/external-providers/provider-authentication-assurance.shared.schemas.d.ts +30 -0
  246. package/dist/esm/external-providers/provider-authentication-assurance.shared.schemas.d.ts.map +1 -0
  247. package/dist/esm/external-providers/provider-authentication-assurance.shared.schemas.js +32 -0
  248. package/dist/esm/external-providers/provider-authentication-assurance.shared.schemas.js.map +1 -0
  249. package/dist/esm/external-providers/provider-browser-operations.shared.schemas.d.ts +86 -0
  250. package/dist/esm/external-providers/provider-browser-operations.shared.schemas.d.ts.map +1 -0
  251. package/dist/esm/external-providers/provider-browser-operations.shared.schemas.js +85 -0
  252. package/dist/esm/external-providers/provider-browser-operations.shared.schemas.js.map +1 -0
  253. package/dist/esm/external-providers/provider-capability.shared.schemas.d.ts +14 -13
  254. package/dist/esm/external-providers/provider-capability.shared.schemas.d.ts.map +1 -1
  255. package/dist/esm/external-providers/provider-capability.shared.schemas.js +10 -10
  256. package/dist/esm/external-providers/provider-capability.shared.schemas.js.map +1 -1
  257. package/dist/esm/external-providers/provider-compliance-profile.shared.schemas.d.ts +18 -8
  258. package/dist/esm/external-providers/provider-compliance-profile.shared.schemas.d.ts.map +1 -1
  259. package/dist/esm/external-providers/provider-compliance-profile.shared.schemas.js +10 -4
  260. package/dist/esm/external-providers/provider-compliance-profile.shared.schemas.js.map +1 -1
  261. package/dist/esm/external-providers/provider-frontend-component-contract.shared.types.d.ts +165 -0
  262. package/dist/esm/external-providers/provider-frontend-component-contract.shared.types.d.ts.map +1 -0
  263. package/dist/esm/external-providers/provider-frontend-component-contract.shared.types.js +39 -0
  264. package/dist/esm/external-providers/provider-frontend-component-contract.shared.types.js.map +1 -0
  265. package/dist/esm/external-providers/provider-frontend-surface.shared.schemas.d.ts +7 -5
  266. package/dist/esm/external-providers/provider-frontend-surface.shared.schemas.d.ts.map +1 -1
  267. package/dist/esm/external-providers/provider-frontend-surface.shared.schemas.js +7 -5
  268. package/dist/esm/external-providers/provider-frontend-surface.shared.schemas.js.map +1 -1
  269. package/dist/esm/external-providers/provider-metadata.shared.schemas.d.ts +8 -5
  270. package/dist/esm/external-providers/provider-metadata.shared.schemas.d.ts.map +1 -1
  271. package/dist/esm/external-providers/provider-metadata.shared.schemas.js +5 -2
  272. package/dist/esm/external-providers/provider-metadata.shared.schemas.js.map +1 -1
  273. package/dist/esm/features/application-features.shared.resources-config.schemas.d.ts +2 -0
  274. package/dist/esm/features/application-features.shared.resources-config.schemas.d.ts.map +1 -1
  275. package/dist/esm/features/application-features.shared.resources-config.schemas.js +42 -3
  276. package/dist/esm/features/application-features.shared.resources-config.schemas.js.map +1 -1
  277. package/dist/esm/features/connected-feature.example.d.ts +64 -0
  278. package/dist/esm/features/connected-feature.example.d.ts.map +1 -0
  279. package/dist/esm/features/connected-feature.example.js +86 -0
  280. package/dist/esm/features/connected-feature.example.js.map +1 -0
  281. package/dist/esm/features/scope-features.shared.schemas.d.ts +53 -0
  282. package/dist/esm/features/scope-features.shared.schemas.d.ts.map +1 -1
  283. package/dist/esm/features/scope-features.shared.schemas.js +37 -0
  284. package/dist/esm/features/scope-features.shared.schemas.js.map +1 -1
  285. package/dist/esm/features/user-features.shared.resources-config.schemas.d.ts +1 -1
  286. package/dist/esm/features/user-features.shared.resources-config.schemas.d.ts.map +1 -1
  287. package/dist/esm/features/user-features.shared.resources-config.schemas.js +42 -48
  288. package/dist/esm/features/user-features.shared.resources-config.schemas.js.map +1 -1
  289. package/dist/esm/files/file-remote-reference-link.shared.schemas.d.ts +73 -0
  290. package/dist/esm/files/file-remote-reference-link.shared.schemas.d.ts.map +1 -0
  291. package/dist/esm/files/file-remote-reference-link.shared.schemas.js +62 -0
  292. package/dist/esm/files/file-remote-reference-link.shared.schemas.js.map +1 -0
  293. package/dist/esm/files/files.shared.resources-config.schemas.d.ts +3 -3
  294. package/dist/esm/files/files.shared.resources-config.schemas.js +3 -3
  295. package/dist/esm/files/files.shared.resources-config.schemas.js.map +1 -1
  296. package/dist/esm/flows-actors/actors.shared.schemas.d.ts +152 -129
  297. package/dist/esm/flows-actors/actors.shared.schemas.d.ts.map +1 -1
  298. package/dist/esm/flows-actors/actors.shared.schemas.js +99 -2
  299. package/dist/esm/flows-actors/actors.shared.schemas.js.map +1 -1
  300. package/dist/esm/flows-actors/agent-traceability.shared.schemas.d.ts +6 -0
  301. package/dist/esm/flows-actors/agent-traceability.shared.schemas.d.ts.map +1 -1
  302. package/dist/esm/flows-actors/agents.shared.schemas.d.ts +3 -3
  303. package/dist/esm/flows-actors/agents.shared.schemas.d.ts.map +1 -1
  304. package/dist/esm/flows-actors/agents.shared.schemas.js +11 -5
  305. package/dist/esm/flows-actors/agents.shared.schemas.js.map +1 -1
  306. package/dist/esm/flows-actors/deliberation.shared.schemas.d.ts +13 -0
  307. package/dist/esm/flows-actors/deliberation.shared.schemas.d.ts.map +1 -1
  308. package/dist/esm/flows-actors/deliberation.shared.schemas.js.map +1 -1
  309. package/dist/esm/flows-actors/execution-plan-readiness.shared.utils.d.ts +45 -0
  310. package/dist/esm/flows-actors/execution-plan-readiness.shared.utils.d.ts.map +1 -0
  311. package/dist/esm/flows-actors/execution-plan-readiness.shared.utils.js +51 -0
  312. package/dist/esm/flows-actors/execution-plan-readiness.shared.utils.js.map +1 -0
  313. package/dist/esm/flows-actors/flows-actors-execution.shared.schemas.d.ts +31 -0
  314. package/dist/esm/flows-actors/flows-actors-execution.shared.schemas.d.ts.map +1 -1
  315. package/dist/esm/flows-actors/flows-actors-execution.shared.schemas.js +61 -3
  316. package/dist/esm/flows-actors/flows-actors-execution.shared.schemas.js.map +1 -1
  317. package/dist/esm/flows-actors/flows-actors-task.shared.schemas.d.ts +2 -2
  318. package/dist/esm/flows-actors/flows-actors.commons.shared.schemas.d.ts +16 -8
  319. package/dist/esm/flows-actors/flows-actors.commons.shared.schemas.d.ts.map +1 -1
  320. package/dist/esm/flows-actors/flows-actors.commons.shared.schemas.js +23 -11
  321. package/dist/esm/flows-actors/flows-actors.commons.shared.schemas.js.map +1 -1
  322. package/dist/esm/flows-actors/flows-actors.configuration.shared.schemas.d.ts +0 -189
  323. package/dist/esm/flows-actors/flows-actors.configuration.shared.schemas.d.ts.map +1 -1
  324. package/dist/esm/flows-actors/flows-actors.configuration.shared.schemas.js +14 -50
  325. package/dist/esm/flows-actors/flows-actors.configuration.shared.schemas.js.map +1 -1
  326. package/dist/esm/flows-actors/flows-actors.frontend.shared.schemas.d.ts +0 -3
  327. package/dist/esm/flows-actors/flows-actors.frontend.shared.schemas.d.ts.map +1 -1
  328. package/dist/esm/flows-actors/flows-actors.frontend.shared.schemas.js +0 -1
  329. package/dist/esm/flows-actors/flows-actors.frontend.shared.schemas.js.map +1 -1
  330. package/dist/esm/flows-actors/flows-actors.system.shared.schemas.d.ts +1 -67
  331. package/dist/esm/flows-actors/flows-actors.system.shared.schemas.d.ts.map +1 -1
  332. package/dist/esm/flows-actors/flows-actors.system.shared.schemas.js +1 -2
  333. package/dist/esm/flows-actors/flows-actors.system.shared.schemas.js.map +1 -1
  334. package/dist/esm/flows-actors/flows.shared.schemas.d.ts +0 -1
  335. package/dist/esm/flows-actors/flows.shared.schemas.d.ts.map +1 -1
  336. package/dist/esm/flows-actors/human-decision.shared.schemas.d.ts +121 -0
  337. package/dist/esm/flows-actors/human-decision.shared.schemas.d.ts.map +1 -0
  338. package/dist/esm/flows-actors/human-decision.shared.schemas.js +252 -0
  339. package/dist/esm/flows-actors/human-decision.shared.schemas.js.map +1 -0
  340. package/dist/esm/flows-actors/mcp-servers.shared.schemas.d.ts +2 -0
  341. package/dist/esm/flows-actors/mcp-servers.shared.schemas.d.ts.map +1 -1
  342. package/dist/esm/flows-actors/mcp-servers.shared.schemas.js +13 -0
  343. package/dist/esm/flows-actors/mcp-servers.shared.schemas.js.map +1 -1
  344. package/dist/esm/flows-actors/provider-call-records.shared.resources-config.schemas.d.ts +24 -0
  345. package/dist/esm/flows-actors/provider-call-records.shared.resources-config.schemas.d.ts.map +1 -0
  346. package/dist/esm/flows-actors/provider-call-records.shared.resources-config.schemas.js +80 -0
  347. package/dist/esm/flows-actors/provider-call-records.shared.resources-config.schemas.js.map +1 -0
  348. package/dist/esm/flows-actors/provider-call-records.shared.schemas.d.ts +123 -0
  349. package/dist/esm/flows-actors/provider-call-records.shared.schemas.d.ts.map +1 -0
  350. package/dist/esm/flows-actors/provider-call-records.shared.schemas.js +181 -0
  351. package/dist/esm/flows-actors/provider-call-records.shared.schemas.js.map +1 -0
  352. package/dist/esm/flows-actors/tasks.actors.shared.schemas.d.ts +58 -81
  353. package/dist/esm/flows-actors/tasks.actors.shared.schemas.d.ts.map +1 -1
  354. package/dist/esm/flows-actors/tasks.actors.shared.schemas.js +75 -38
  355. package/dist/esm/flows-actors/tasks.actors.shared.schemas.js.map +1 -1
  356. package/dist/esm/frontend-definitions/settings-destination-ref.definitions.d.ts +217 -0
  357. package/dist/esm/frontend-definitions/settings-destination-ref.definitions.d.ts.map +1 -0
  358. package/dist/esm/frontend-definitions/settings-destination-ref.definitions.js +230 -0
  359. package/dist/esm/frontend-definitions/settings-destination-ref.definitions.js.map +1 -0
  360. package/dist/esm/guidance/guidance-flow.shared.schemas.d.ts +106 -24
  361. package/dist/esm/guidance/guidance-flow.shared.schemas.d.ts.map +1 -1
  362. package/dist/esm/guidance/guidance-flow.shared.schemas.js +152 -14
  363. package/dist/esm/guidance/guidance-flow.shared.schemas.js.map +1 -1
  364. package/dist/esm/guidance/lifecycle-state.shared.schemas.d.ts +0 -6
  365. package/dist/esm/guidance/lifecycle-state.shared.schemas.d.ts.map +1 -1
  366. package/dist/esm/guidance/lifecycle-state.shared.schemas.js +0 -19
  367. package/dist/esm/guidance/lifecycle-state.shared.schemas.js.map +1 -1
  368. package/dist/esm/guidance/milestone-builders.shared.d.ts +4 -2
  369. package/dist/esm/guidance/milestone-builders.shared.d.ts.map +1 -1
  370. package/dist/esm/guidance/milestone-builders.shared.js +4 -2
  371. package/dist/esm/guidance/milestone-builders.shared.js.map +1 -1
  372. package/dist/esm/guidance/milestone-definition.shared.schemas.d.ts +66 -4
  373. package/dist/esm/guidance/milestone-definition.shared.schemas.d.ts.map +1 -1
  374. package/dist/esm/guidance/milestone-definition.shared.schemas.js +50 -0
  375. package/dist/esm/guidance/milestone-definition.shared.schemas.js.map +1 -1
  376. package/dist/esm/guidance/progression-presentation.shared.schemas.d.ts +71 -0
  377. package/dist/esm/guidance/progression-presentation.shared.schemas.d.ts.map +1 -0
  378. package/dist/esm/guidance/progression-presentation.shared.schemas.js +72 -0
  379. package/dist/esm/guidance/progression-presentation.shared.schemas.js.map +1 -0
  380. package/dist/esm/guidance/progression-state.shared.resources-config.schemas.d.ts +2 -0
  381. package/dist/esm/guidance/progression-state.shared.resources-config.schemas.d.ts.map +1 -1
  382. package/dist/esm/guidance/progression-state.shared.schemas.d.ts +4 -0
  383. package/dist/esm/guidance/progression-state.shared.schemas.d.ts.map +1 -1
  384. package/dist/esm/guidance/progression-state.shared.schemas.js +5 -0
  385. package/dist/esm/guidance/progression-state.shared.schemas.js.map +1 -1
  386. package/dist/esm/http-api-binding/http-api-binding-id.shared.utils.d.ts.map +1 -1
  387. package/dist/esm/http-api-binding/http-api-binding-id.shared.utils.js +2 -1
  388. package/dist/esm/http-api-binding/http-api-binding-id.shared.utils.js.map +1 -1
  389. package/dist/esm/http-api-binding/http-api-binding.shared.schemas.d.ts +181 -412
  390. package/dist/esm/http-api-binding/http-api-binding.shared.schemas.d.ts.map +1 -1
  391. package/dist/esm/http-api-binding/http-api-binding.shared.schemas.js +249 -199
  392. package/dist/esm/http-api-binding/http-api-binding.shared.schemas.js.map +1 -1
  393. package/dist/esm/http-api-binding/http-api-transport-dialect.shared.d.ts +107 -0
  394. package/dist/esm/http-api-binding/http-api-transport-dialect.shared.d.ts.map +1 -0
  395. package/dist/esm/http-api-binding/http-api-transport-dialect.shared.js +108 -0
  396. package/dist/esm/http-api-binding/http-api-transport-dialect.shared.js.map +1 -0
  397. package/dist/esm/http-api-binding/read-through-engine-anchors.shared.d.ts +38 -0
  398. package/dist/esm/http-api-binding/read-through-engine-anchors.shared.d.ts.map +1 -0
  399. package/dist/esm/http-api-binding/read-through-engine-anchors.shared.js +42 -0
  400. package/dist/esm/http-api-binding/read-through-engine-anchors.shared.js.map +1 -0
  401. package/dist/esm/index.d.ts +47 -4
  402. package/dist/esm/index.d.ts.map +1 -1
  403. package/dist/esm/index.js +77 -16
  404. package/dist/esm/index.js.map +1 -1
  405. package/dist/esm/meta-workflows/actions.meta-workflows.shared.schemas.d.ts.map +1 -0
  406. package/dist/esm/meta-workflows/actions.meta-workflows.shared.schemas.js.map +1 -0
  407. package/dist/esm/meta-workflows/catalog.meta-workflows.shared.schemas.d.ts.map +1 -0
  408. package/dist/esm/meta-workflows/catalog.meta-workflows.shared.schemas.js.map +1 -0
  409. package/dist/esm/meta-workflows/coding-tasks.meta-workflows.shared.schemas.d.ts +130 -0
  410. package/dist/esm/meta-workflows/coding-tasks.meta-workflows.shared.schemas.d.ts.map +1 -0
  411. package/dist/esm/meta-workflows/coding-tasks.meta-workflows.shared.schemas.js +104 -0
  412. package/dist/esm/meta-workflows/coding-tasks.meta-workflows.shared.schemas.js.map +1 -0
  413. package/dist/esm/meta-workflows/context-selection.meta-workflows.shared.schemas.d.ts.map +1 -0
  414. package/dist/esm/meta-workflows/context-selection.meta-workflows.shared.schemas.js.map +1 -0
  415. package/dist/esm/{flows-actors/meta-workflows → meta-workflows}/decisions.meta-workflows.shared.schemas.d.ts +64 -0
  416. package/dist/esm/meta-workflows/decisions.meta-workflows.shared.schemas.d.ts.map +1 -0
  417. package/dist/esm/{flows-actors/meta-workflows → meta-workflows}/decisions.meta-workflows.shared.schemas.js +47 -0
  418. package/dist/esm/meta-workflows/decisions.meta-workflows.shared.schemas.js.map +1 -0
  419. package/dist/esm/meta-workflows/orchestration.meta-workflows.shared.schemas.d.ts +544 -0
  420. package/dist/esm/meta-workflows/orchestration.meta-workflows.shared.schemas.d.ts.map +1 -0
  421. package/dist/esm/meta-workflows/orchestration.meta-workflows.shared.schemas.js +638 -0
  422. package/dist/esm/meta-workflows/orchestration.meta-workflows.shared.schemas.js.map +1 -0
  423. package/dist/esm/{flows-actors/meta-workflows → meta-workflows}/portable-primitives.meta-workflows.shared.schemas.d.ts +15 -8
  424. package/dist/esm/meta-workflows/portable-primitives.meta-workflows.shared.schemas.d.ts.map +1 -0
  425. package/dist/esm/{flows-actors/meta-workflows → meta-workflows}/portable-primitives.meta-workflows.shared.schemas.js +15 -8
  426. package/dist/esm/meta-workflows/portable-primitives.meta-workflows.shared.schemas.js.map +1 -0
  427. package/dist/esm/meta-workflows.exports.d.ts +21 -25
  428. package/dist/esm/meta-workflows.exports.d.ts.map +1 -1
  429. package/dist/esm/meta-workflows.exports.js +21 -25
  430. package/dist/esm/meta-workflows.exports.js.map +1 -1
  431. package/dist/esm/notifications/email/email-submission.shared.enums.d.ts +16 -0
  432. package/dist/esm/notifications/email/email-submission.shared.enums.d.ts.map +1 -0
  433. package/dist/esm/notifications/email/email-submission.shared.enums.js +17 -0
  434. package/dist/esm/notifications/email/email-submission.shared.enums.js.map +1 -0
  435. package/dist/esm/notifications/email/email-template-registry.shared.schemas.d.ts +36 -0
  436. package/dist/esm/notifications/email/email-template-registry.shared.schemas.d.ts.map +1 -1
  437. package/dist/esm/notifications/email/email-template-registry.shared.schemas.js +50 -3
  438. package/dist/esm/notifications/email/email-template-registry.shared.schemas.js.map +1 -1
  439. package/dist/esm/notifications/m2m/m2m-webhook-delivery-log.shared.resources-config.schemas.d.ts.map +1 -1
  440. package/dist/esm/notifications/m2m/m2m-webhook-delivery-log.shared.resources-config.schemas.js +4 -1
  441. package/dist/esm/notifications/m2m/m2m-webhook-delivery-log.shared.resources-config.schemas.js.map +1 -1
  442. package/dist/esm/notifications/m2m/m2m-webhook-delivery-log.shared.schemas.d.ts +2 -1
  443. package/dist/esm/notifications/m2m/m2m-webhook-delivery-log.shared.schemas.d.ts.map +1 -1
  444. package/dist/esm/notifications/m2m/m2m-webhook-delivery-log.shared.schemas.js +3 -2
  445. package/dist/esm/notifications/m2m/m2m-webhook-delivery-log.shared.schemas.js.map +1 -1
  446. package/dist/esm/notifications/m2m/webhook-config.shared.resources-config.schemas.d.ts.map +1 -1
  447. package/dist/esm/notifications/m2m/webhook-config.shared.resources-config.schemas.js +44 -3
  448. package/dist/esm/notifications/m2m/webhook-config.shared.resources-config.schemas.js.map +1 -1
  449. package/dist/esm/notifications/notification-badges.shared.resources-config.schemas.d.ts +1 -1
  450. package/dist/esm/notifications/notification-badges.shared.resources-config.schemas.d.ts.map +1 -1
  451. package/dist/esm/notifications/notification-badges.shared.resources-config.schemas.js +12 -33
  452. package/dist/esm/notifications/notification-badges.shared.resources-config.schemas.js.map +1 -1
  453. package/dist/esm/notifications/notifications.shared.schemas.d.ts +68 -6
  454. package/dist/esm/notifications/notifications.shared.schemas.d.ts.map +1 -1
  455. package/dist/esm/notifications/notifications.shared.schemas.js +68 -6
  456. package/dist/esm/notifications/notifications.shared.schemas.js.map +1 -1
  457. package/dist/esm/organizations/application-owner-organization.shared.schemas.d.ts +145 -0
  458. package/dist/esm/organizations/application-owner-organization.shared.schemas.d.ts.map +1 -0
  459. package/dist/esm/organizations/application-owner-organization.shared.schemas.js +146 -0
  460. package/dist/esm/organizations/application-owner-organization.shared.schemas.js.map +1 -0
  461. package/dist/esm/organizations/organization-features.shared.resources-config.schemas.d.ts +2 -0
  462. package/dist/esm/organizations/organization-features.shared.resources-config.schemas.d.ts.map +1 -1
  463. package/dist/esm/organizations/organization-features.shared.resources-config.schemas.js +39 -3
  464. package/dist/esm/organizations/organization-features.shared.resources-config.schemas.js.map +1 -1
  465. package/dist/esm/organizations/organization-members.shared.resources-config.schemas.d.ts +1 -1
  466. package/dist/esm/organizations/organization-members.shared.resources-config.schemas.d.ts.map +1 -1
  467. package/dist/esm/organizations/organization-members.shared.resources-config.schemas.js +18 -14
  468. package/dist/esm/organizations/organization-members.shared.resources-config.schemas.js.map +1 -1
  469. package/dist/esm/organizations/organization-members.shared.schemas.d.ts +1 -1
  470. package/dist/esm/organizations/organization-members.shared.schemas.d.ts.map +1 -1
  471. package/dist/esm/organizations/organization-members.shared.schemas.js +9 -1
  472. package/dist/esm/organizations/organization-members.shared.schemas.js.map +1 -1
  473. package/dist/esm/organizations/organization-preferences.shared.schemas.d.ts +2 -1
  474. package/dist/esm/organizations/organization-preferences.shared.schemas.d.ts.map +1 -1
  475. package/dist/esm/organizations/organization-preferences.shared.schemas.js +3 -0
  476. package/dist/esm/organizations/organization-preferences.shared.schemas.js.map +1 -1
  477. package/dist/esm/organizations/organization-profile.shared.schemas.d.ts +3 -1
  478. package/dist/esm/organizations/organization-profile.shared.schemas.d.ts.map +1 -1
  479. package/dist/esm/organizations/organization-profile.shared.schemas.js +4 -2
  480. package/dist/esm/organizations/organization-profile.shared.schemas.js.map +1 -1
  481. package/dist/esm/organizations/organization-unit-narrowing.shared.d.ts +29 -2
  482. package/dist/esm/organizations/organization-unit-narrowing.shared.d.ts.map +1 -1
  483. package/dist/esm/organizations/organization-unit-narrowing.shared.js +27 -0
  484. package/dist/esm/organizations/organization-unit-narrowing.shared.js.map +1 -1
  485. package/dist/esm/organizations/organization-units.shared.resources-config.schemas.d.ts +2 -0
  486. package/dist/esm/organizations/organization-units.shared.resources-config.schemas.d.ts.map +1 -1
  487. package/dist/esm/organizations/organization-units.shared.resources-config.schemas.js +3 -0
  488. package/dist/esm/organizations/organization-units.shared.resources-config.schemas.js.map +1 -1
  489. package/dist/esm/organizations/organization-units.shared.schemas.d.ts +17 -5
  490. package/dist/esm/organizations/organization-units.shared.schemas.d.ts.map +1 -1
  491. package/dist/esm/organizations/organization-units.shared.schemas.js +65 -5
  492. package/dist/esm/organizations/organization-units.shared.schemas.js.map +1 -1
  493. package/dist/esm/organizations/organizations.shared.resources-config.schemas.d.ts +51 -7
  494. package/dist/esm/organizations/organizations.shared.resources-config.schemas.d.ts.map +1 -1
  495. package/dist/esm/organizations/organizations.shared.resources-config.schemas.js +151 -7
  496. package/dist/esm/organizations/organizations.shared.resources-config.schemas.js.map +1 -1
  497. package/dist/esm/organizations/organizations.shared.schemas.d.ts +18 -83
  498. package/dist/esm/organizations/organizations.shared.schemas.d.ts.map +1 -1
  499. package/dist/esm/organizations/organizations.shared.schemas.js +37 -19
  500. package/dist/esm/organizations/organizations.shared.schemas.js.map +1 -1
  501. package/dist/esm/organizations/tenant-teardown-config.shared.schemas.d.ts +13 -0
  502. package/dist/esm/organizations/tenant-teardown-config.shared.schemas.d.ts.map +1 -1
  503. package/dist/esm/organizations/tenant-teardown-config.shared.schemas.js +13 -0
  504. package/dist/esm/organizations/tenant-teardown-config.shared.schemas.js.map +1 -1
  505. package/dist/esm/provider-registration-runtime.exports.d.ts +1 -0
  506. package/dist/esm/provider-registration-runtime.exports.d.ts.map +1 -1
  507. package/dist/esm/provider-registration-runtime.exports.js +1 -0
  508. package/dist/esm/provider-registration-runtime.exports.js.map +1 -1
  509. package/dist/esm/public-runtime/index.d.ts +53 -2
  510. package/dist/esm/public-runtime/index.d.ts.map +1 -1
  511. package/dist/esm/public-runtime/index.js +45 -2
  512. package/dist/esm/public-runtime/index.js.map +1 -1
  513. package/dist/esm/queue/jobs.shared.resources-config.schemas.d.ts +7 -8
  514. package/dist/esm/queue/jobs.shared.resources-config.schemas.d.ts.map +1 -1
  515. package/dist/esm/queue/jobs.shared.resources-config.schemas.js +30 -6
  516. package/dist/esm/queue/jobs.shared.resources-config.schemas.js.map +1 -1
  517. package/dist/esm/queue/jobs.shared.schemas.d.ts +388 -2
  518. package/dist/esm/queue/jobs.shared.schemas.d.ts.map +1 -1
  519. package/dist/esm/queue/jobs.shared.schemas.js +315 -11
  520. package/dist/esm/queue/jobs.shared.schemas.js.map +1 -1
  521. package/dist/esm/queue/jobs.shared.utils.d.ts +6 -4
  522. package/dist/esm/queue/jobs.shared.utils.d.ts.map +1 -1
  523. package/dist/esm/queue/jobs.shared.utils.js +5 -4
  524. package/dist/esm/queue/jobs.shared.utils.js.map +1 -1
  525. package/dist/esm/queue/queues.shared.schemas.d.ts +20 -8
  526. package/dist/esm/queue/queues.shared.schemas.d.ts.map +1 -1
  527. package/dist/esm/queue/queues.shared.schemas.js +23 -18
  528. package/dist/esm/queue/queues.shared.schemas.js.map +1 -1
  529. package/dist/esm/queue/queues.shared.utils.d.ts +4 -2
  530. package/dist/esm/queue/queues.shared.utils.d.ts.map +1 -1
  531. package/dist/esm/queue/queues.shared.utils.js +4 -2
  532. package/dist/esm/queue/queues.shared.utils.js.map +1 -1
  533. package/dist/esm/rag/rag-retrieval-health.shared.d.ts +27 -0
  534. package/dist/esm/rag/rag-retrieval-health.shared.d.ts.map +1 -0
  535. package/dist/esm/rag/rag-retrieval-health.shared.js +29 -0
  536. package/dist/esm/rag/rag-retrieval-health.shared.js.map +1 -0
  537. package/dist/esm/requests/header-keys.shared.d.ts +6 -0
  538. package/dist/esm/requests/header-keys.shared.d.ts.map +1 -1
  539. package/dist/esm/requests/header-keys.shared.js +7 -0
  540. package/dist/esm/requests/header-keys.shared.js.map +1 -1
  541. package/dist/esm/requests/idempotency-key.shared.d.ts +76 -0
  542. package/dist/esm/requests/idempotency-key.shared.d.ts.map +1 -0
  543. package/dist/esm/requests/idempotency-key.shared.js +112 -0
  544. package/dist/esm/requests/idempotency-key.shared.js.map +1 -0
  545. package/dist/esm/requests/manual-controllers-routes-documentation.d.ts.map +1 -1
  546. package/dist/esm/requests/manual-controllers-routes-documentation.js +275 -20
  547. package/dist/esm/requests/manual-controllers-routes-documentation.js.map +1 -1
  548. package/dist/esm/requests/manual-controllers-routes-urls.d.ts +134 -0
  549. package/dist/esm/requests/manual-controllers-routes-urls.d.ts.map +1 -1
  550. package/dist/esm/requests/manual-controllers-routes-urls.js +153 -0
  551. package/dist/esm/requests/manual-controllers-routes-urls.js.map +1 -1
  552. package/dist/esm/requests/websocket.shared.schemas.d.ts +198 -20
  553. package/dist/esm/requests/websocket.shared.schemas.d.ts.map +1 -1
  554. package/dist/esm/requests/websocket.shared.schemas.js +236 -5
  555. package/dist/esm/requests/websocket.shared.schemas.js.map +1 -1
  556. package/dist/esm/resources/child-operations.shared.schemas.d.ts +56 -5
  557. package/dist/esm/resources/child-operations.shared.schemas.d.ts.map +1 -1
  558. package/dist/esm/resources/child-operations.shared.schemas.js +97 -5
  559. package/dist/esm/resources/child-operations.shared.schemas.js.map +1 -1
  560. package/dist/esm/resources/context-policy.shared.schemas.d.ts +20 -0
  561. package/dist/esm/resources/context-policy.shared.schemas.d.ts.map +1 -1
  562. package/dist/esm/resources/context-policy.shared.schemas.js +3 -0
  563. package/dist/esm/resources/context-policy.shared.schemas.js.map +1 -1
  564. package/dist/esm/resources/resources-config.shared.factory.d.ts.map +1 -1
  565. package/dist/esm/resources/resources-config.shared.factory.js +596 -34
  566. package/dist/esm/resources/resources-config.shared.factory.js.map +1 -1
  567. package/dist/esm/resources/resources-config.shared.schemas.d.ts +665 -40
  568. package/dist/esm/resources/resources-config.shared.schemas.d.ts.map +1 -1
  569. package/dist/esm/resources/resources-config.shared.schemas.js +315 -22
  570. package/dist/esm/resources/resources-config.shared.schemas.js.map +1 -1
  571. package/dist/esm/resources/resources-registry.shared.core.definitions.d.ts.map +1 -1
  572. package/dist/esm/resources/resources-registry.shared.core.definitions.js +431 -69
  573. package/dist/esm/resources/resources-registry.shared.core.definitions.js.map +1 -1
  574. package/dist/esm/resources/resources.shared.core.definitions.d.ts +36 -0
  575. package/dist/esm/resources/resources.shared.core.definitions.d.ts.map +1 -1
  576. package/dist/esm/resources/resources.shared.core.definitions.js +46 -0
  577. package/dist/esm/resources/resources.shared.core.definitions.js.map +1 -1
  578. package/dist/esm/resources/resources.shared.schemas.d.ts +256 -10
  579. package/dist/esm/resources/resources.shared.schemas.d.ts.map +1 -1
  580. package/dist/esm/resources/resources.shared.schemas.js +209 -9
  581. package/dist/esm/resources/resources.shared.schemas.js.map +1 -1
  582. package/dist/esm/resources/resources.shared.utils.d.ts +34 -8
  583. package/dist/esm/resources/resources.shared.utils.d.ts.map +1 -1
  584. package/dist/esm/resources/resources.shared.utils.js +69 -12
  585. package/dist/esm/resources/resources.shared.utils.js.map +1 -1
  586. package/dist/esm/resources/utils/composition-cascade-deletability.validation.d.ts +44 -12
  587. package/dist/esm/resources/utils/composition-cascade-deletability.validation.d.ts.map +1 -1
  588. package/dist/esm/resources/utils/composition-cascade-deletability.validation.js +46 -23
  589. package/dist/esm/resources/utils/composition-cascade-deletability.validation.js.map +1 -1
  590. package/dist/esm/resources/utils/dependent-lifecycle-classification.validation.d.ts +61 -0
  591. package/dist/esm/resources/utils/dependent-lifecycle-classification.validation.d.ts.map +1 -0
  592. package/dist/esm/resources/utils/dependent-lifecycle-classification.validation.js +79 -0
  593. package/dist/esm/resources/utils/dependent-lifecycle-classification.validation.js.map +1 -0
  594. package/dist/esm/resources/utils/initiator-stamped-field-satisfiability.validation.d.ts +60 -0
  595. package/dist/esm/resources/utils/initiator-stamped-field-satisfiability.validation.d.ts.map +1 -0
  596. package/dist/esm/resources/utils/initiator-stamped-field-satisfiability.validation.js +80 -0
  597. package/dist/esm/resources/utils/initiator-stamped-field-satisfiability.validation.js.map +1 -0
  598. package/dist/esm/resources/utils/populated-file-fields.shared.utils.d.ts +21 -0
  599. package/dist/esm/resources/utils/populated-file-fields.shared.utils.d.ts.map +1 -0
  600. package/dist/esm/resources/utils/populated-file-fields.shared.utils.js +159 -0
  601. package/dist/esm/resources/utils/populated-file-fields.shared.utils.js.map +1 -0
  602. package/dist/esm/resources/utils/resources-config-naming.utils.d.ts +15 -0
  603. package/dist/esm/resources/utils/resources-config-naming.utils.d.ts.map +1 -1
  604. package/dist/esm/resources/utils/resources-config-naming.utils.js +56 -11
  605. package/dist/esm/resources/utils/resources-config-naming.utils.js.map +1 -1
  606. package/dist/esm/resources/utils/resources-config-operations.dtos-builder.utils.d.ts +51 -1
  607. package/dist/esm/resources/utils/resources-config-operations.dtos-builder.utils.d.ts.map +1 -1
  608. package/dist/esm/resources/utils/resources-config-operations.dtos-builder.utils.js +210 -51
  609. package/dist/esm/resources/utils/resources-config-operations.dtos-builder.utils.js.map +1 -1
  610. package/dist/esm/resources/utils/resources-config-operations.urls-builder.utils.d.ts +34 -0
  611. package/dist/esm/resources/utils/resources-config-operations.urls-builder.utils.d.ts.map +1 -1
  612. package/dist/esm/resources/utils/resources-config-operations.urls-builder.utils.js +45 -1
  613. package/dist/esm/resources/utils/resources-config-operations.urls-builder.utils.js.map +1 -1
  614. package/dist/esm/resources/utils/shared-persistence-collection.utils.d.ts +29 -0
  615. package/dist/esm/resources/utils/shared-persistence-collection.utils.d.ts.map +1 -1
  616. package/dist/esm/resources/utils/shared-persistence-collection.utils.js +30 -0
  617. package/dist/esm/resources/utils/shared-persistence-collection.utils.js.map +1 -1
  618. package/dist/esm/resources/utils/templatable-file-fields.shared.utils.d.ts.map +1 -1
  619. package/dist/esm/resources/utils/templatable-file-fields.shared.utils.js +49 -11
  620. package/dist/esm/resources/utils/templatable-file-fields.shared.utils.js.map +1 -1
  621. package/dist/esm/security/api-keys/api-keys-application.shared.resources-config.schemas.d.ts.map +1 -1
  622. package/dist/esm/security/api-keys/api-keys-application.shared.resources-config.schemas.js +4 -1
  623. package/dist/esm/security/api-keys/api-keys-application.shared.resources-config.schemas.js.map +1 -1
  624. package/dist/esm/security/api-keys/api-keys-organization.shared.resources-config.schemas.d.ts.map +1 -1
  625. package/dist/esm/security/api-keys/api-keys-organization.shared.resources-config.schemas.js +4 -1
  626. package/dist/esm/security/api-keys/api-keys-organization.shared.resources-config.schemas.js.map +1 -1
  627. package/dist/esm/security/authentications/authentication.shared.dto.schemas.d.ts +129 -17
  628. package/dist/esm/security/authentications/authentication.shared.dto.schemas.d.ts.map +1 -1
  629. package/dist/esm/security/authentications/authentication.shared.dto.schemas.js +160 -6
  630. package/dist/esm/security/authentications/authentication.shared.dto.schemas.js.map +1 -1
  631. package/dist/esm/security/authentications/authentication.shared.schemas.d.ts +324 -9
  632. package/dist/esm/security/authentications/authentication.shared.schemas.d.ts.map +1 -1
  633. package/dist/esm/security/authentications/authentication.shared.schemas.js +411 -8
  634. package/dist/esm/security/authentications/authentication.shared.schemas.js.map +1 -1
  635. package/dist/esm/security/authentications/authentication.shared.utils.d.ts +87 -4
  636. package/dist/esm/security/authentications/authentication.shared.utils.d.ts.map +1 -1
  637. package/dist/esm/security/authentications/authentication.shared.utils.js +95 -6
  638. package/dist/esm/security/authentications/authentication.shared.utils.js.map +1 -1
  639. package/dist/esm/security/authentications/consumable-token.shared.schemas.d.ts +23 -1
  640. package/dist/esm/security/authentications/consumable-token.shared.schemas.d.ts.map +1 -1
  641. package/dist/esm/security/authentications/consumable-token.shared.schemas.js +23 -1
  642. package/dist/esm/security/authentications/consumable-token.shared.schemas.js.map +1 -1
  643. package/dist/esm/security/authentications/cross-frontend-handoff.shared.dto.schemas.d.ts +7 -1
  644. package/dist/esm/security/authentications/cross-frontend-handoff.shared.dto.schemas.d.ts.map +1 -1
  645. package/dist/esm/security/authentications/cross-frontend-handoff.shared.dto.schemas.js +7 -1
  646. package/dist/esm/security/authentications/cross-frontend-handoff.shared.dto.schemas.js.map +1 -1
  647. package/dist/esm/security/authentications/password-blocklist.shared.utils.d.ts +74 -0
  648. package/dist/esm/security/authentications/password-blocklist.shared.utils.d.ts.map +1 -0
  649. package/dist/esm/security/authentications/password-blocklist.shared.utils.js +122 -0
  650. package/dist/esm/security/authentications/password-blocklist.shared.utils.js.map +1 -0
  651. package/dist/esm/security/authentications/registration.shared.dto.schemas.d.ts +88 -2
  652. package/dist/esm/security/authentications/registration.shared.dto.schemas.d.ts.map +1 -1
  653. package/dist/esm/security/authentications/registration.shared.dto.schemas.js +149 -2
  654. package/dist/esm/security/authentications/registration.shared.dto.schemas.js.map +1 -1
  655. package/dist/esm/security/authentications/scim/scim-organization-unit-mapping.shared.d.ts +57 -11
  656. package/dist/esm/security/authentications/scim/scim-organization-unit-mapping.shared.d.ts.map +1 -1
  657. package/dist/esm/security/authentications/scim/scim-organization-unit-mapping.shared.js +44 -11
  658. package/dist/esm/security/authentications/scim/scim-organization-unit-mapping.shared.js.map +1 -1
  659. package/dist/esm/security/authentications/scim/scim-provisioning-config.shared.resources-config.schemas.d.ts.map +1 -1
  660. package/dist/esm/security/authentications/scim/scim-provisioning-config.shared.resources-config.schemas.js +20 -7
  661. package/dist/esm/security/authentications/scim/scim-provisioning-config.shared.resources-config.schemas.js.map +1 -1
  662. package/dist/esm/security/authentications/scim/scim-provisioning-config.shared.schemas.d.ts +16 -2
  663. package/dist/esm/security/authentications/scim/scim-provisioning-config.shared.schemas.d.ts.map +1 -1
  664. package/dist/esm/security/authentications/scim/scim-provisioning-config.shared.schemas.js +32 -2
  665. package/dist/esm/security/authentications/scim/scim-provisioning-config.shared.schemas.js.map +1 -1
  666. package/dist/esm/security/authentications/scim/scim-tokens.shared.resources-config.schemas.d.ts.map +1 -1
  667. package/dist/esm/security/authentications/scim/scim-tokens.shared.resources-config.schemas.js +7 -1
  668. package/dist/esm/security/authentications/scim/scim-tokens.shared.resources-config.schemas.js.map +1 -1
  669. package/dist/esm/security/authentications/siem/siem-delivery-dlq.shared.resources-config.schemas.d.ts.map +1 -1
  670. package/dist/esm/security/authentications/siem/siem-delivery-dlq.shared.resources-config.schemas.js +4 -1
  671. package/dist/esm/security/authentications/siem/siem-delivery-dlq.shared.resources-config.schemas.js.map +1 -1
  672. package/dist/esm/security/authentications/siem/siem-delivery-outbox.shared.resources-config.schemas.d.ts +27 -0
  673. package/dist/esm/security/authentications/siem/siem-delivery-outbox.shared.resources-config.schemas.d.ts.map +1 -0
  674. package/dist/esm/security/authentications/siem/siem-delivery-outbox.shared.resources-config.schemas.js +109 -0
  675. package/dist/esm/security/authentications/siem/siem-delivery-outbox.shared.resources-config.schemas.js.map +1 -0
  676. package/dist/esm/security/authentications/siem/siem-delivery-outbox.shared.schemas.d.ts +66 -0
  677. package/dist/esm/security/authentications/siem/siem-delivery-outbox.shared.schemas.d.ts.map +1 -0
  678. package/dist/esm/security/authentications/siem/siem-delivery-outbox.shared.schemas.js +107 -0
  679. package/dist/esm/security/authentications/siem/siem-delivery-outbox.shared.schemas.js.map +1 -0
  680. package/dist/esm/security/authentications/siem/siem-export-config.shared.resources-config.schemas.d.ts +19 -0
  681. package/dist/esm/security/authentications/siem/siem-export-config.shared.resources-config.schemas.d.ts.map +1 -1
  682. package/dist/esm/security/authentications/siem/siem-export-config.shared.resources-config.schemas.js +50 -13
  683. package/dist/esm/security/authentications/siem/siem-export-config.shared.resources-config.schemas.js.map +1 -1
  684. package/dist/esm/security/authentications/siem/siem-export-config.shared.schemas.d.ts +18 -6
  685. package/dist/esm/security/authentications/siem/siem-export-config.shared.schemas.d.ts.map +1 -1
  686. package/dist/esm/security/authentications/siem/siem-export-config.shared.schemas.js +133 -4
  687. package/dist/esm/security/authentications/siem/siem-export-config.shared.schemas.js.map +1 -1
  688. package/dist/esm/security/authentications/sso/sso-config.shared.resources-config.schemas.d.ts +29 -3
  689. package/dist/esm/security/authentications/sso/sso-config.shared.resources-config.schemas.d.ts.map +1 -1
  690. package/dist/esm/security/authentications/sso/sso-config.shared.resources-config.schemas.js +81 -22
  691. package/dist/esm/security/authentications/sso/sso-config.shared.resources-config.schemas.js.map +1 -1
  692. package/dist/esm/security/authentications/sso/sso-config.shared.schemas.d.ts +0 -40
  693. package/dist/esm/security/authentications/sso/sso-config.shared.schemas.d.ts.map +1 -1
  694. package/dist/esm/security/authentications/sso/sso-config.shared.schemas.js +100 -26
  695. package/dist/esm/security/authentications/sso/sso-config.shared.schemas.js.map +1 -1
  696. package/dist/esm/security/authentications/sso/sso-connection.shared.resources-config.schemas.d.ts +9 -1
  697. package/dist/esm/security/authentications/sso/sso-connection.shared.resources-config.schemas.d.ts.map +1 -1
  698. package/dist/esm/security/authentications/sso/sso-connection.shared.resources-config.schemas.js +9 -1
  699. package/dist/esm/security/authentications/sso/sso-connection.shared.resources-config.schemas.js.map +1 -1
  700. package/dist/esm/security/authentications/sso/sso-connection.shared.schemas.d.ts +8 -2
  701. package/dist/esm/security/authentications/sso/sso-connection.shared.schemas.d.ts.map +1 -1
  702. package/dist/esm/security/authentications/sso/sso-connection.shared.schemas.js +91 -4
  703. package/dist/esm/security/authentications/sso/sso-connection.shared.schemas.js.map +1 -1
  704. package/dist/esm/security/authorizations/administrative-continuity.shared.schemas.d.ts +50 -6
  705. package/dist/esm/security/authorizations/administrative-continuity.shared.schemas.d.ts.map +1 -1
  706. package/dist/esm/security/authorizations/administrative-continuity.shared.schemas.js +50 -6
  707. package/dist/esm/security/authorizations/administrative-continuity.shared.schemas.js.map +1 -1
  708. package/dist/esm/security/authorizations/application-access-grants.shared.resources-config.schemas.d.ts +39 -0
  709. package/dist/esm/security/authorizations/application-access-grants.shared.resources-config.schemas.d.ts.map +1 -0
  710. package/dist/esm/security/authorizations/application-access-grants.shared.resources-config.schemas.js +265 -0
  711. package/dist/esm/security/authorizations/application-access-grants.shared.resources-config.schemas.js.map +1 -0
  712. package/dist/esm/security/authorizations/application-access-grants.shared.schemas.d.ts +187 -0
  713. package/dist/esm/security/authorizations/application-access-grants.shared.schemas.d.ts.map +1 -0
  714. package/dist/esm/security/authorizations/application-access-grants.shared.schemas.js +271 -0
  715. package/dist/esm/security/authorizations/application-access-grants.shared.schemas.js.map +1 -0
  716. package/dist/esm/security/authorizations/platform-access-grants.shared.schemas.d.ts +23 -0
  717. package/dist/esm/security/authorizations/platform-access-grants.shared.schemas.d.ts.map +1 -1
  718. package/dist/esm/security/authorizations/platform-access-grants.shared.schemas.js +24 -0
  719. package/dist/esm/security/authorizations/platform-access-grants.shared.schemas.js.map +1 -1
  720. package/dist/esm/security/authorizations/roles.shared.defaults.d.ts.map +1 -1
  721. package/dist/esm/security/authorizations/roles.shared.defaults.js +6 -0
  722. package/dist/esm/security/authorizations/roles.shared.defaults.js.map +1 -1
  723. package/dist/esm/security/authorizations/roles.shared.schemas.d.ts +14 -0
  724. package/dist/esm/security/authorizations/roles.shared.schemas.d.ts.map +1 -1
  725. package/dist/esm/security/authorizations/roles.shared.schemas.js +19 -0
  726. package/dist/esm/security/authorizations/roles.shared.schemas.js.map +1 -1
  727. package/dist/esm/security/authorizations/roles.shared.utils.d.ts.map +1 -1
  728. package/dist/esm/security/authorizations/roles.shared.utils.js +2 -0
  729. package/dist/esm/security/authorizations/roles.shared.utils.js.map +1 -1
  730. package/dist/esm/security/connected-accounts/provider-credentials-organization.shared.resources-config.schemas.d.ts +4 -1
  731. package/dist/esm/security/connected-accounts/provider-credentials-organization.shared.resources-config.schemas.d.ts.map +1 -1
  732. package/dist/esm/security/connected-accounts/provider-credentials-user.shared.resources-config.schemas.d.ts +5 -2
  733. package/dist/esm/security/connected-accounts/provider-credentials-user.shared.resources-config.schemas.d.ts.map +1 -1
  734. package/dist/esm/security/connected-accounts/provider-credentials-user.shared.resources-config.schemas.js +13 -42
  735. package/dist/esm/security/connected-accounts/provider-credentials-user.shared.resources-config.schemas.js.map +1 -1
  736. package/dist/esm/security/connected-accounts/provider-credentials.shared.schemas.d.ts +257 -13
  737. package/dist/esm/security/connected-accounts/provider-credentials.shared.schemas.d.ts.map +1 -1
  738. package/dist/esm/security/connected-accounts/provider-credentials.shared.schemas.js +281 -49
  739. package/dist/esm/security/connected-accounts/provider-credentials.shared.schemas.js.map +1 -1
  740. package/dist/esm/security/oauth-clients/oauth-clients-application.shared.resources-config.schemas.d.ts +6 -3
  741. package/dist/esm/security/oauth-clients/oauth-clients-application.shared.resources-config.schemas.d.ts.map +1 -1
  742. package/dist/esm/security/oauth-clients/oauth-clients-application.shared.resources-config.schemas.js +74 -4
  743. package/dist/esm/security/oauth-clients/oauth-clients-application.shared.resources-config.schemas.js.map +1 -1
  744. package/dist/esm/security/oauth-clients/oauth-clients-organization.shared.resources-config.schemas.d.ts +5 -2
  745. package/dist/esm/security/oauth-clients/oauth-clients-organization.shared.resources-config.schemas.d.ts.map +1 -1
  746. package/dist/esm/security/oauth-clients/oauth-clients-organization.shared.resources-config.schemas.js +105 -3
  747. package/dist/esm/security/oauth-clients/oauth-clients-organization.shared.resources-config.schemas.js.map +1 -1
  748. package/dist/esm/security/outbound-target-control.shared.schemas.d.ts +67 -0
  749. package/dist/esm/security/outbound-target-control.shared.schemas.d.ts.map +1 -0
  750. package/dist/esm/security/outbound-target-control.shared.schemas.js +69 -0
  751. package/dist/esm/security/outbound-target-control.shared.schemas.js.map +1 -0
  752. package/dist/esm/systems-of-record/system-of-record-credential-kind.shared.d.ts +159 -0
  753. package/dist/esm/systems-of-record/system-of-record-credential-kind.shared.d.ts.map +1 -0
  754. package/dist/esm/systems-of-record/system-of-record-credential-kind.shared.js +164 -0
  755. package/dist/esm/systems-of-record/system-of-record-credential-kind.shared.js.map +1 -0
  756. package/dist/esm/systems-of-record/system-of-record-declaration.shared.schemas.d.ts +209 -0
  757. package/dist/esm/systems-of-record/system-of-record-declaration.shared.schemas.d.ts.map +1 -0
  758. package/dist/esm/systems-of-record/system-of-record-declaration.shared.schemas.js +150 -0
  759. package/dist/esm/systems-of-record/system-of-record-declaration.shared.schemas.js.map +1 -0
  760. package/dist/esm/systems-of-record/system-of-record-env.shared.d.ts +79 -0
  761. package/dist/esm/systems-of-record/system-of-record-env.shared.d.ts.map +1 -0
  762. package/dist/esm/systems-of-record/system-of-record-env.shared.js +116 -0
  763. package/dist/esm/systems-of-record/system-of-record-env.shared.js.map +1 -0
  764. package/dist/esm/systems-of-record/system-of-record-error-codes.shared.d.ts +145 -0
  765. package/dist/esm/systems-of-record/system-of-record-error-codes.shared.d.ts.map +1 -0
  766. package/dist/esm/systems-of-record/system-of-record-error-codes.shared.js +146 -0
  767. package/dist/esm/systems-of-record/system-of-record-error-codes.shared.js.map +1 -0
  768. package/dist/esm/systems-of-record/system-of-record-facet.shared.schemas.d.ts +478 -0
  769. package/dist/esm/systems-of-record/system-of-record-facet.shared.schemas.d.ts.map +1 -0
  770. package/dist/esm/systems-of-record/system-of-record-facet.shared.schemas.js +619 -0
  771. package/dist/esm/systems-of-record/system-of-record-facet.shared.schemas.js.map +1 -0
  772. package/dist/esm/systems-of-record/system-of-record-partition-assignments.shared.resources-config.schemas.d.ts +31 -0
  773. package/dist/esm/systems-of-record/system-of-record-partition-assignments.shared.resources-config.schemas.d.ts.map +1 -0
  774. package/dist/esm/systems-of-record/system-of-record-partition-assignments.shared.resources-config.schemas.js +232 -0
  775. package/dist/esm/systems-of-record/system-of-record-partition-assignments.shared.resources-config.schemas.js.map +1 -0
  776. package/dist/esm/systems-of-record/system-of-record-partition-assignments.shared.schemas.d.ts +127 -0
  777. package/dist/esm/systems-of-record/system-of-record-partition-assignments.shared.schemas.d.ts.map +1 -0
  778. package/dist/esm/systems-of-record/system-of-record-partition-assignments.shared.schemas.js +204 -0
  779. package/dist/esm/systems-of-record/system-of-record-partition-assignments.shared.schemas.js.map +1 -0
  780. package/dist/esm/testing/resource-config-builders.d.ts.map +1 -1
  781. package/dist/esm/testing/resource-config-builders.js +10 -4
  782. package/dist/esm/testing/resource-config-builders.js.map +1 -1
  783. package/dist/esm/users/anonymous-user-marketing-metadata.shared.schemas.d.ts +2 -1
  784. package/dist/esm/users/anonymous-user-marketing-metadata.shared.schemas.d.ts.map +1 -1
  785. package/dist/esm/users/anonymous-user-marketing-metadata.shared.schemas.js +2 -1
  786. package/dist/esm/users/anonymous-user-marketing-metadata.shared.schemas.js.map +1 -1
  787. package/dist/esm/users/anonymous-users.shared.resources-config.schemas.d.ts +139 -24
  788. package/dist/esm/users/anonymous-users.shared.resources-config.schemas.d.ts.map +1 -1
  789. package/dist/esm/users/anonymous-users.shared.resources-config.schemas.js +255 -0
  790. package/dist/esm/users/anonymous-users.shared.resources-config.schemas.js.map +1 -1
  791. package/dist/esm/users/anonymous-users.shared.schema.d.ts +5 -3
  792. package/dist/esm/users/anonymous-users.shared.schema.d.ts.map +1 -1
  793. package/dist/esm/users/anonymous-users.shared.schema.js +18 -1
  794. package/dist/esm/users/anonymous-users.shared.schema.js.map +1 -1
  795. package/dist/esm/users/inbound-contacts.shared.resources-config.schemas.d.ts +2 -1
  796. package/dist/esm/users/inbound-contacts.shared.resources-config.schemas.d.ts.map +1 -1
  797. package/dist/esm/users/inbound-contacts.shared.resources-config.schemas.js +23 -0
  798. package/dist/esm/users/inbound-contacts.shared.resources-config.schemas.js.map +1 -1
  799. package/dist/esm/users/inbound-contacts.shared.schemas.d.ts +2 -1
  800. package/dist/esm/users/inbound-contacts.shared.schemas.d.ts.map +1 -1
  801. package/dist/esm/users/user-consent-decision.shared.utils.d.ts +127 -0
  802. package/dist/esm/users/user-consent-decision.shared.utils.d.ts.map +1 -0
  803. package/dist/esm/users/user-consent-decision.shared.utils.js +189 -0
  804. package/dist/esm/users/user-consent-decision.shared.utils.js.map +1 -0
  805. package/dist/esm/users/user-identity-links.shared.resources-config.schemas.d.ts +1 -0
  806. package/dist/esm/users/user-identity-links.shared.resources-config.schemas.d.ts.map +1 -1
  807. package/dist/esm/users/user-identity-links.shared.schemas.d.ts +1 -0
  808. package/dist/esm/users/user-identity-links.shared.schemas.d.ts.map +1 -1
  809. package/dist/esm/users/user-identity-links.shared.schemas.js +30 -0
  810. package/dist/esm/users/user-identity-links.shared.schemas.js.map +1 -1
  811. package/dist/esm/users/user-preferences-reset.shared.utils.d.ts +6 -6
  812. package/dist/esm/users/user-preferences-reset.shared.utils.js +6 -6
  813. package/dist/esm/users/user-preferences-reset.shared.utils.js.map +1 -1
  814. package/dist/esm/users/user-preferences.shared.resources-config.schemas.d.ts +74 -29
  815. package/dist/esm/users/user-preferences.shared.resources-config.schemas.d.ts.map +1 -1
  816. package/dist/esm/users/user-preferences.shared.resources-config.schemas.js +99 -0
  817. package/dist/esm/users/user-preferences.shared.resources-config.schemas.js.map +1 -1
  818. package/dist/esm/users/user-profiles.shared.resources-config.schemas.d.ts.map +1 -1
  819. package/dist/esm/users/user-profiles.shared.resources-config.schemas.js +25 -9
  820. package/dist/esm/users/user-profiles.shared.resources-config.schemas.js.map +1 -1
  821. package/dist/esm/users/user-self-preferences.shared.resources-config.schemas.d.ts +4 -4
  822. package/dist/esm/users/user-self-preferences.shared.resources-config.schemas.d.ts.map +1 -1
  823. package/dist/esm/users/user-self-preferences.shared.resources-config.schemas.js +12 -1
  824. package/dist/esm/users/user-self-preferences.shared.resources-config.schemas.js.map +1 -1
  825. package/dist/esm/users/user-self.shared.resources-config.schemas.d.ts +1 -0
  826. package/dist/esm/users/user-self.shared.resources-config.schemas.d.ts.map +1 -1
  827. package/dist/esm/users/user-self.shared.resources-config.schemas.js +2 -2
  828. package/dist/esm/users/user-self.shared.resources-config.schemas.js.map +1 -1
  829. package/dist/esm/users/users.shared.resources-config.schemas.d.ts +1 -0
  830. package/dist/esm/users/users.shared.resources-config.schemas.d.ts.map +1 -1
  831. package/dist/esm/users/users.shared.resources-config.schemas.js +2 -2
  832. package/dist/esm/users/users.shared.resources-config.schemas.js.map +1 -1
  833. package/dist/esm/users/users.shared.schemas.d.ts +28 -10
  834. package/dist/esm/users/users.shared.schemas.d.ts.map +1 -1
  835. package/dist/esm/users/users.shared.schemas.js +86 -11
  836. package/dist/esm/users/users.shared.schemas.js.map +1 -1
  837. package/dist/tsconfig.build.tsbuildinfo +1 -1
  838. package/package.json +14 -35
  839. package/dist/esm/flows-actors/apps-blueprint/apps-blueprint-agent-personas.shared.enums.d.ts +0 -19
  840. package/dist/esm/flows-actors/apps-blueprint/apps-blueprint-agent-personas.shared.enums.d.ts.map +0 -1
  841. package/dist/esm/flows-actors/apps-blueprint/apps-blueprint-agent-personas.shared.enums.js +0 -35
  842. package/dist/esm/flows-actors/apps-blueprint/apps-blueprint-agent-personas.shared.enums.js.map +0 -1
  843. package/dist/esm/flows-actors/apps-blueprint/apps-blueprint.shared.schemas.d.ts +0 -213
  844. package/dist/esm/flows-actors/apps-blueprint/apps-blueprint.shared.schemas.d.ts.map +0 -1
  845. package/dist/esm/flows-actors/apps-blueprint/apps-blueprint.shared.schemas.js +0 -287
  846. package/dist/esm/flows-actors/apps-blueprint/apps-blueprint.shared.schemas.js.map +0 -1
  847. package/dist/esm/flows-actors/apps-blueprint/artifacts.apps-blueprint.shared.schemas.d.ts +0 -236
  848. package/dist/esm/flows-actors/apps-blueprint/artifacts.apps-blueprint.shared.schemas.d.ts.map +0 -1
  849. package/dist/esm/flows-actors/apps-blueprint/artifacts.apps-blueprint.shared.schemas.js +0 -212
  850. package/dist/esm/flows-actors/apps-blueprint/artifacts.apps-blueprint.shared.schemas.js.map +0 -1
  851. package/dist/esm/flows-actors/meta-workflows/actions.meta-workflows.shared.schemas.d.ts.map +0 -1
  852. package/dist/esm/flows-actors/meta-workflows/actions.meta-workflows.shared.schemas.js.map +0 -1
  853. package/dist/esm/flows-actors/meta-workflows/budget-authority.meta-workflows.shared.schemas.d.ts +0 -17
  854. package/dist/esm/flows-actors/meta-workflows/budget-authority.meta-workflows.shared.schemas.d.ts.map +0 -1
  855. package/dist/esm/flows-actors/meta-workflows/budget-authority.meta-workflows.shared.schemas.js +0 -31
  856. package/dist/esm/flows-actors/meta-workflows/budget-authority.meta-workflows.shared.schemas.js.map +0 -1
  857. package/dist/esm/flows-actors/meta-workflows/catalog.meta-workflows.shared.schemas.d.ts.map +0 -1
  858. package/dist/esm/flows-actors/meta-workflows/catalog.meta-workflows.shared.schemas.js.map +0 -1
  859. package/dist/esm/flows-actors/meta-workflows/context-selection.meta-workflows.shared.schemas.d.ts.map +0 -1
  860. package/dist/esm/flows-actors/meta-workflows/context-selection.meta-workflows.shared.schemas.js.map +0 -1
  861. package/dist/esm/flows-actors/meta-workflows/continuity-identifiers.meta-workflows.shared.schemas.d.ts +0 -28
  862. package/dist/esm/flows-actors/meta-workflows/continuity-identifiers.meta-workflows.shared.schemas.d.ts.map +0 -1
  863. package/dist/esm/flows-actors/meta-workflows/continuity-identifiers.meta-workflows.shared.schemas.js +0 -28
  864. package/dist/esm/flows-actors/meta-workflows/continuity-identifiers.meta-workflows.shared.schemas.js.map +0 -1
  865. package/dist/esm/flows-actors/meta-workflows/decisions.meta-workflows.shared.schemas.d.ts.map +0 -1
  866. package/dist/esm/flows-actors/meta-workflows/decisions.meta-workflows.shared.schemas.js.map +0 -1
  867. package/dist/esm/flows-actors/meta-workflows/execution-binding-common.meta-workflows.shared.schemas.d.ts +0 -100
  868. package/dist/esm/flows-actors/meta-workflows/execution-binding-common.meta-workflows.shared.schemas.d.ts.map +0 -1
  869. package/dist/esm/flows-actors/meta-workflows/execution-binding-common.meta-workflows.shared.schemas.js +0 -232
  870. package/dist/esm/flows-actors/meta-workflows/execution-binding-common.meta-workflows.shared.schemas.js.map +0 -1
  871. package/dist/esm/flows-actors/meta-workflows/execution-binding-vocabularies.meta-workflows.shared.schemas.d.ts +0 -29
  872. package/dist/esm/flows-actors/meta-workflows/execution-binding-vocabularies.meta-workflows.shared.schemas.d.ts.map +0 -1
  873. package/dist/esm/flows-actors/meta-workflows/execution-binding-vocabularies.meta-workflows.shared.schemas.js +0 -58
  874. package/dist/esm/flows-actors/meta-workflows/execution-binding-vocabularies.meta-workflows.shared.schemas.js.map +0 -1
  875. package/dist/esm/flows-actors/meta-workflows/portable-primitives.meta-workflows.shared.schemas.d.ts.map +0 -1
  876. package/dist/esm/flows-actors/meta-workflows/portable-primitives.meta-workflows.shared.schemas.js.map +0 -1
  877. package/dist/esm/flows-actors/task-continuity-binding.actors.shared.schemas.d.ts +0 -81
  878. package/dist/esm/flows-actors/task-continuity-binding.actors.shared.schemas.d.ts.map +0 -1
  879. package/dist/esm/flows-actors/task-continuity-binding.actors.shared.schemas.js +0 -82
  880. package/dist/esm/flows-actors/task-continuity-binding.actors.shared.schemas.js.map +0 -1
  881. package/dist/esm/flows-actors/utils/flow-actors.context-builder.apps-context.shared.utils.d.ts +0 -2
  882. package/dist/esm/flows-actors/utils/flow-actors.context-builder.apps-context.shared.utils.d.ts.map +0 -1
  883. package/dist/esm/flows-actors/utils/flow-actors.context-builder.apps-context.shared.utils.js +0 -1
  884. package/dist/esm/flows-actors/utils/flow-actors.context-builder.apps-context.shared.utils.js.map +0 -1
  885. /package/dist/esm/{flows-actors/meta-workflows → meta-workflows}/actions.meta-workflows.shared.schemas.d.ts +0 -0
  886. /package/dist/esm/{flows-actors/meta-workflows → meta-workflows}/actions.meta-workflows.shared.schemas.js +0 -0
  887. /package/dist/esm/{flows-actors/meta-workflows → meta-workflows}/catalog.meta-workflows.shared.schemas.d.ts +0 -0
  888. /package/dist/esm/{flows-actors/meta-workflows → meta-workflows}/catalog.meta-workflows.shared.schemas.js +0 -0
  889. /package/dist/esm/{flows-actors/meta-workflows → meta-workflows}/context-selection.meta-workflows.shared.schemas.d.ts +0 -0
  890. /package/dist/esm/{flows-actors/meta-workflows → meta-workflows}/context-selection.meta-workflows.shared.schemas.js +0 -0
@@ -3,10 +3,10 @@ import { ResourceType, CoreResourceOperation } from '../resources.shared.core.de
3
3
  import { ChildLifecycleStrategy } from '../child-operations.shared.schemas';
4
4
  import type { ErasureRetentionMode } from '../../compliance/privacy/impersonalization.shared.schemas';
5
5
  /**
6
- * Registry-level guardrail for the composition `onParentDelete` lifecycle — the
6
+ * Registry-level guardrail for the effective `onParentDelete` lifecycle — the
7
7
  * DELETE-side counterpart to `validateCompositionSeedability`.
8
8
  *
9
- * A composition relationship that OPTS IN to the delete cascade
9
+ * A relationship that OPTS IN to the delete cascade
10
10
  * (`childOperations.lifecycle.onParentDelete.enabled = true`) must actually be
11
11
  * cascade-deletable, or the runtime cascade throws `ErrorType.CONFIGURATION`
12
12
  * INSIDE the parent's delete transaction and ROLLS BACK the parent delete. Two
@@ -29,6 +29,10 @@ import type { ErasureRetentionMode } from '../../compliance/privacy/impersonaliz
29
29
  * which the resource factory guarantees also carries the UPDATE_MANY scrub grant +
30
30
  * the `retentionStatus` marker). Discovery (point 1) is shared by both strategies.
31
31
  *
32
+ * REFUSE_WHILE_CHILDREN_EXIST tears nothing down and lists nothing. The parent's delete probes for one
33
+ * remaining child with a repository READ on the edge's foreign key, whatever the cardinality, so READ
34
+ * is its whole requirement. Without it every delete of the parent would be refused with CONFIGURATION.
35
+ *
32
36
  * ## Why this is separate from (and dual to) seedability
33
37
  *
34
38
  * `onParentCreate` (seed) and `onParentDelete` (cascade) are orthogonal DDD axes
@@ -57,8 +61,8 @@ import type { ErasureRetentionMode } from '../../compliance/privacy/impersonaliz
57
61
  *
58
62
  * ## Fail-closed, fail-open on ambiguity
59
63
  *
60
- * A genuine violation (a reachable adopter missing a discovery/teardown op) is a
61
- * boot-time throw. When the edge cannot be classified (parent absent from the
64
+ * A retention violation is a boot-time throw; hard-delete prerequisite findings
65
+ * are reported separately by the startup caller. When the edge cannot be classified (parent absent from the
62
66
  * map) the check skips (fail-open) so it never false-positives or blocks
63
67
  * startup. Pure and side-effect free.
64
68
  */
@@ -66,8 +70,9 @@ import type { ErasureRetentionMode } from '../../compliance/privacy/impersonaliz
66
70
  export interface CompositionCascadeDeletabilityResourceInput {
67
71
  resourceIdentifier: ResourceType;
68
72
  /**
69
- * Flattened per-variant operations — read exactly like the runtime
70
- * `supportsOperation` (`op.operationIdentifier === verb && op.isOperationDefault`).
73
+ * Flattened per-variant operations. Parent reachability includes every callable
74
+ * variant; child discovery/teardown follows runtime `supportsOperation`
75
+ * (`op.operationIdentifier === verb && op.isOperationDefault`).
71
76
  *
72
77
  * `resourceOperationLike` is carried because a CUSTOM operation borrowing a core verb reaches the
73
78
  * same repository primitive as the core operation, and so fires the same cascade — see
@@ -92,15 +97,19 @@ export interface CompositionCascadeDeletabilityResourceInput {
92
97
  };
93
98
  resourceRelationships?: {
94
99
  parentRelationships?: ResourceRelationship[];
100
+ selfRelationships?: ResourceRelationship[];
95
101
  };
96
102
  }
97
103
  export interface CompositionCascadeDeletabilityViolation {
98
104
  childResourceType: ResourceType;
99
105
  parentResourceType: ResourceType;
100
106
  cardinality: 'one-to-one' | 'one-to-many';
101
- /** The teardown strategy the edge declared: DELETE (hard-delete) or IMPERSONALIZE_AND_RETAIN (scrub+keep). */
107
+ /** The strategy the edge declared: DELETE (hard-delete), IMPERSONALIZE_AND_RETAIN (scrub+keep) or REFUSE_WHILE_CHILDREN_EXIST. */
102
108
  strategy: ChildLifecycleStrategy;
103
- /** The discovery op the cascade needs but the child lacks (READ for 1:1, LIST for 1:many), if any. Shared by both strategies. */
109
+ /**
110
+ * The op the edge needs but the child lacks, if any: the cascade's discovery op (READ for 1:1, LIST for
111
+ * 1:many, shared by DELETE and IMPERSONALIZE_AND_RETAIN), or READ, the existence probe, for REFUSE_WHILE_CHILDREN_EXIST.
112
+ */
104
113
  missingDiscoveryOp?: CoreResourceOperation;
105
114
  /** DELETE strategy only: true when the child supports neither DELETE nor DELETE_MANY. */
106
115
  missingTeardownOp: boolean;
@@ -118,16 +127,39 @@ export interface CompositionCascadeDeletabilityViolation {
118
127
  message: string;
119
128
  }
120
129
  /**
121
- * Validate that every composition relationship which opted into
130
+ * Whether this resource can reach the DELETE post-op logic that fires an `onParentDelete` cascade.
131
+ *
132
+ * NOT the same question as `supportsOperation(resource, DELETE)`. A CUSTOM operation declaring
133
+ * `resourceOperationLike: DELETE` carries its own `operationIdentifier`, so `supportsOperation`
134
+ * says no — yet it reaches `_doDelete` all the same: the service resolves the core verb through
135
+ * `getCoreResourceOperationFromOperation` (which falls back to `resourceOperationLike`) and calls
136
+ * the repository by OPERATION PATH, and the repository's operations map is built from EVERY
137
+ * configured operation, custom ones included. The `coreOperations` gate on the public
138
+ * `RepositoryResourceBackendService.delete()` convenience method is simply not on that path.
139
+ *
140
+ * Reading only the core verb made the parent-reachability skip below unsound, and it cost real
141
+ * damage: `user_self | delete_account` (removed 2026-08-01) declared no core DELETE, so this guard
142
+ * cleared its two `onParentDelete` edges as dormant — while at runtime the custom op fired the
143
+ * cascade into `USER_SELF_PROFILES` / `USER_SELF_PREFERENCES`, neither of which declares a
144
+ * teardown op. The cascade threw `ErrorType.CONFIGURATION` inside the delete transaction, so the
145
+ * delete rolled back for any user who had one of those rows and committed for any user who had
146
+ * neither. A boot guard that cannot see custom delete-like ops cannot protect that edge.
147
+ *
148
+ * `DELETE_MANY` is included for the same reason: `deleteMany` is the cascade's preferred teardown
149
+ * path and a custom op may borrow it just as readily.
150
+ */
151
+ export declare function canFireDeleteCascade(resource: CompositionCascadeDeletabilityResourceInput | undefined): boolean;
152
+ /**
153
+ * Validate that every effective relationship lifecycle which opted into
122
154
  * `onParentDelete.enabled` is actually cascade-deletable (its child has the
123
155
  * cardinality-appropriate discovery op + a DELETE/DELETE_MANY teardown op),
124
156
  * unless the edge is structurally unreachable because the parent cannot fire the
125
- * cascade. Returns the list of violations (empty when clean); the caller throws
126
- * on any (fail-closed).
157
+ * cascade. Returns the list of violations (empty when clean); startup rejects
158
+ * retention violations and reports hard-delete prerequisites separately.
127
159
  *
128
160
  * @param resourceConfigurations - the registry's `resourceConfigurations` map
129
161
  * (`resourceType → built configuration`). Each entry is the CHILD in its
130
- * `parentRelationships`; parents are looked up in the same map for the
162
+ * `parentRelationships` and `selfRelationships`; parents are looked up in the same map for the
131
163
  * reachability skip.
132
164
  */
133
165
  export declare function validateCompositionCascadeDeletability(resourceConfigurations: Record<string, CompositionCascadeDeletabilityResourceInput>): CompositionCascadeDeletabilityViolation[];
@@ -1 +1 @@
1
- {"version":3,"file":"composition-cascade-deletability.validation.d.ts","sourceRoot":"","sources":["../../../../../src/resources/utils/composition-cascade-deletability.validation.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,oBAAoB,EAGrB,MAAM,6BAA6B,CAAC;AACrC,OAAO,EAAE,YAAY,EAAE,qBAAqB,EAAE,MAAM,sCAAsC,CAAC;AAC3F,OAAO,EAAsB,sBAAsB,EAAE,MAAM,oCAAoC,CAAC;AAChG,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,2DAA2D,CAAC;AAEtG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2DG;AAEH,gFAAgF;AAChF,MAAM,WAAW,2CAA2C;IAC1D,kBAAkB,EAAE,YAAY,CAAC;IACjC;;;;;;;;;OASG;IACH,UAAU,EAAE,aAAa,CAAC;QACxB,mBAAmB,EAAE,MAAM,CAAC;QAC5B,kBAAkB,CAAC,EAAE,OAAO,CAAC;QAC7B,qBAAqB,CAAC,EAAE,qBAAqB,CAAC;KAC/C,CAAC,CAAC;IACH;;;;;;OAMG;IACH,eAAe,CAAC,EAAE;QAAE,IAAI,CAAC,EAAE,oBAAoB,CAAA;KAAE,CAAC;IAClD,qBAAqB,CAAC,EAAE;QACtB,mBAAmB,CAAC,EAAE,oBAAoB,EAAE,CAAC;KAC9C,CAAC;CACH;AAED,MAAM,WAAW,uCAAuC;IACtD,iBAAiB,EAAE,YAAY,CAAC;IAChC,kBAAkB,EAAE,YAAY,CAAC;IACjC,WAAW,EAAE,YAAY,GAAG,aAAa,CAAC;IAC1C,8GAA8G;IAC9G,QAAQ,EAAE,sBAAsB,CAAC;IACjC,iIAAiI;IACjI,kBAAkB,CAAC,EAAE,qBAAqB,CAAC;IAC3C,yFAAyF;IACzF,iBAAiB,EAAE,OAAO,CAAC;IAC3B;;;;OAIG;IACH,0BAA0B,CAAC,EAAE,OAAO,CAAC;IACrC;;;OAGG;IACH,yBAAyB,CAAC,EAAE,OAAO,CAAC;IACpC,OAAO,EAAE,MAAM,CAAC;CACjB;AAoDD;;;;;;;;;;;;GAYG;AACH,wBAAgB,sCAAsC,CACpD,sBAAsB,EAAE,MAAM,CAAC,MAAM,EAAE,2CAA2C,CAAC,GAClF,uCAAuC,EAAE,CA6H3C"}
1
+ {"version":3,"file":"composition-cascade-deletability.validation.d.ts","sourceRoot":"","sources":["../../../../../src/resources/utils/composition-cascade-deletability.validation.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,oBAAoB,EAErB,MAAM,6BAA6B,CAAC;AACrC,OAAO,EAAE,YAAY,EAAE,qBAAqB,EAAE,MAAM,sCAAsC,CAAC;AAC3F,OAAO,EAAsB,sBAAsB,EAAyC,MAAM,oCAAoC,CAAC;AAGvI,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,2DAA2D,CAAC;AAEtG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+DG;AAEH,gFAAgF;AAChF,MAAM,WAAW,2CAA2C;IAC1D,kBAAkB,EAAE,YAAY,CAAC;IACjC;;;;;;;;;;OAUG;IACH,UAAU,EAAE,aAAa,CAAC;QACxB,mBAAmB,EAAE,MAAM,CAAC;QAC5B,kBAAkB,CAAC,EAAE,OAAO,CAAC;QAC7B,qBAAqB,CAAC,EAAE,qBAAqB,CAAC;KAC/C,CAAC,CAAC;IACH;;;;;;OAMG;IACH,eAAe,CAAC,EAAE;QAAE,IAAI,CAAC,EAAE,oBAAoB,CAAA;KAAE,CAAC;IAClD,qBAAqB,CAAC,EAAE;QACtB,mBAAmB,CAAC,EAAE,oBAAoB,EAAE,CAAC;QAC7C,iBAAiB,CAAC,EAAE,oBAAoB,EAAE,CAAC;KAC5C,CAAC;CACH;AAED,MAAM,WAAW,uCAAuC;IACtD,iBAAiB,EAAE,YAAY,CAAC;IAChC,kBAAkB,EAAE,YAAY,CAAC;IACjC,WAAW,EAAE,YAAY,GAAG,aAAa,CAAC;IAC1C,kIAAkI;IAClI,QAAQ,EAAE,sBAAsB,CAAC;IACjC;;;OAGG;IACH,kBAAkB,CAAC,EAAE,qBAAqB,CAAC;IAC3C,yFAAyF;IACzF,iBAAiB,EAAE,OAAO,CAAC;IAC3B;;;;OAIG;IACH,0BAA0B,CAAC,EAAE,OAAO,CAAC;IACrC;;;OAGG;IACH,yBAAyB,CAAC,EAAE,OAAO,CAAC;IACpC,OAAO,EAAE,MAAM,CAAC;CACjB;AAcD;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,wBAAgB,oBAAoB,CAClC,QAAQ,EAAE,2CAA2C,GAAG,SAAS,GAChE,OAAO,CAaT;AAED;;;;;;;;;;;;GAYG;AACH,wBAAgB,sCAAsC,CACpD,sBAAsB,EAAE,MAAM,CAAC,MAAM,EAAE,2CAA2C,CAAC,GAClF,uCAAuC,EAAE,CAmJ3C"}
@@ -1,6 +1,8 @@
1
- import { RelationshipNature, isOneToOneCardinality, } from '../resources.shared.schemas.js';
1
+ import { isOneToOneCardinality, } from '../resources.shared.schemas.js';
2
2
  import { CoreResourceOperation } from '../resources.shared.core.definitions.js';
3
- import { ChildLifecycleMode, ChildLifecycleStrategy } from '../child-operations.shared.schemas.js';
3
+ import { ChildLifecycleMode, ChildLifecycleStrategy, resolveChildLifecycleTeardownStrategy } from '../child-operations.shared.schemas.js';
4
+ import { Resources_SharedUtils } from '../resources.shared.utils.js';
5
+ import { getParentDirectionRelationships } from '../resources-config.shared.schemas.js';
4
6
  /** Runtime-truthful `supportsOperation`: a default variant for the verb exists. */
5
7
  function supportsOperation(resource, verb) {
6
8
  return (resource?.operations?.some((op) => op.operationIdentifier === verb && op.isOperationDefault === true) ?? false);
@@ -27,12 +29,12 @@ function supportsOperation(resource, verb) {
27
29
  * `DELETE_MANY` is included for the same reason: `deleteMany` is the cascade's preferred teardown
28
30
  * path and a custom op may borrow it just as readily.
29
31
  */
30
- function canFireDeleteCascade(resource) {
32
+ export function canFireDeleteCascade(resource) {
31
33
  if (!resource?.operations)
32
34
  return false;
33
35
  return resource.operations.some((op) => {
34
- if (op.isOperationDefault !== true)
35
- return false;
36
+ // A selected operation path can invoke any variant. Only child discovery/teardown
37
+ // convenience calls require defaults; parent reachability must include keyed variants.
36
38
  // A core operation carries the verb as its own identifier; a custom one borrows it.
37
39
  const effectiveVerb = op.operationIdentifier === CoreResourceOperation.DELETE
38
40
  || op.operationIdentifier === CoreResourceOperation.DELETE_MANY
@@ -43,30 +45,30 @@ function canFireDeleteCascade(resource) {
43
45
  });
44
46
  }
45
47
  /**
46
- * Validate that every composition relationship which opted into
48
+ * Validate that every effective relationship lifecycle which opted into
47
49
  * `onParentDelete.enabled` is actually cascade-deletable (its child has the
48
50
  * cardinality-appropriate discovery op + a DELETE/DELETE_MANY teardown op),
49
51
  * unless the edge is structurally unreachable because the parent cannot fire the
50
- * cascade. Returns the list of violations (empty when clean); the caller throws
51
- * on any (fail-closed).
52
+ * cascade. Returns the list of violations (empty when clean); startup rejects
53
+ * retention violations and reports hard-delete prerequisites separately.
52
54
  *
53
55
  * @param resourceConfigurations - the registry's `resourceConfigurations` map
54
56
  * (`resourceType → built configuration`). Each entry is the CHILD in its
55
- * `parentRelationships`; parents are looked up in the same map for the
57
+ * `parentRelationships` and `selfRelationships`; parents are looked up in the same map for the
56
58
  * reachability skip.
57
59
  */
58
60
  export function validateCompositionCascadeDeletability(resourceConfigurations) {
59
61
  const violations = [];
60
62
  for (const child of Object.values(resourceConfigurations)) {
61
- const parentRelationships = child.resourceRelationships?.parentRelationships ?? [];
63
+ const parentRelationships = getParentDirectionRelationships({
64
+ parentRelationships: child.resourceRelationships?.parentRelationships ?? [],
65
+ selfRelationships: child.resourceRelationships?.selfRelationships ?? [],
66
+ childRelationships: [],
67
+ });
62
68
  for (const relationship of parentRelationships) {
63
- if (relationship.nature !== RelationshipNature.COMPOSITION) {
64
- continue;
65
- }
66
- // Only an ENABLED onParentDelete cascade must be cascade-deletable. A
67
- // composition WITHOUT it leaves orphans by design choice — not this guard's
68
- // concern.
69
- const onParentDelete = relationship.childOperations?.lifecycle?.onParentDelete;
69
+ // Use the same compiled lifecycle policy as execution. Authored nature alone
70
+ // misses association-to-junction cascades; INDEPENDENT relationships are dormant.
71
+ const onParentDelete = Resources_SharedUtils.resolveRelationshipLifecycleOnParentDeleteConfig(relationship);
70
72
  if (onParentDelete?.enabled !== true) {
71
73
  continue;
72
74
  }
@@ -86,6 +88,27 @@ export function validateCompositionCascadeDeletability(resourceConfigurations) {
86
88
  if (!canFireDeleteCascade(parent)) {
87
89
  continue; // structurally unreachable edge — no core AND no delete-like custom op
88
90
  }
91
+ // RESTRICT posture: no discovery list and no teardown. The refusal probes existence with ONE
92
+ // repository READ on the edge's foreign key, whatever the cardinality, so READ is the whole requirement.
93
+ if (onParentDelete.strategy === ChildLifecycleStrategy.REFUSE_WHILE_CHILDREN_EXIST) {
94
+ if (supportsOperation(child, CoreResourceOperation.READ)) {
95
+ continue;
96
+ }
97
+ violations.push({
98
+ childResourceType: child.resourceIdentifier,
99
+ parentResourceType: relationship.resourceType1,
100
+ cardinality: isOneToOneCardinality(relationship.cardinality2) ? 'one-to-one' : 'one-to-many',
101
+ strategy: ChildLifecycleStrategy.REFUSE_WHILE_CHILDREN_EXIST,
102
+ missingDiscoveryOp: CoreResourceOperation.READ,
103
+ missingTeardownOp: false,
104
+ message: `Lifecycle child '${child.resourceIdentifier}' (parent '${relationship.resourceType1}') ` +
105
+ `declares onParentDelete strategy REFUSE_WHILE_CHILDREN_EXIST but does not support READ. The ` +
106
+ `parent's delete probes for a remaining child with a repository READ before it writes anything, ` +
107
+ `so every delete of the parent would be refused with CONFIGURATION. Add a READ operation to the ` +
108
+ `child (a REPOSITORY_ONLY variant is enough), or declare another strategy.`,
109
+ });
110
+ continue;
111
+ }
89
112
  // Discovery op depends on cardinality: 1:1 discovered via READ, 1:many via LIST. SHARED by both
90
113
  // teardown strategies — impersonalizeChildrenImmediate reads the same way before scrubbing.
91
114
  const oneToOne = isOneToOneCardinality(relationship.cardinality2);
@@ -93,15 +116,15 @@ export function validateCompositionCascadeDeletability(resourceConfigurations) {
93
116
  const hasDiscovery = supportsOperation(child, discoveryOp);
94
117
  // The teardown STRATEGY decides what the child needs beyond discovery: DELETE (default) needs a
95
118
  // DELETE/DELETE_MANY op; IMPERSONALIZE_AND_RETAIN needs the child to be retention-governed.
96
- const strategy = onParentDelete.strategy ?? ChildLifecycleStrategy.DELETE;
119
+ const strategy = resolveChildLifecycleTeardownStrategy(onParentDelete);
97
120
  if (strategy === ChildLifecycleStrategy.IMPERSONALIZE_AND_RETAIN) {
98
121
  // Retain-and-scrub teardown (via updateManyAsSystem), NOT a hard delete. The child must be
99
122
  // retention-governed: only `retentionPolicy` injects the retentionStatus
100
123
  // marker AND derives the UPDATE_MANY scrub grant. A non-retention child has nothing to flip →
101
124
  // impersonalizeChildrenImmediate throws CONFIGURATION and rolls back the parent delete.
102
125
  const isRetentionGoverned = child.retentionPolicy?.mode !== undefined;
103
- // v1 executes the retain-and-scrub only in IMMEDIATE mode. A LAZY retain edge parses, boots and
104
- // passes CI, then throws on the FIRST production erasure — inside the parent transaction, so a
126
+ // v1 executes retain-and-scrub only in IMMEDIATE mode. Without this guard, a LAZY retain
127
+ // edge could pass startup and throw on the first erasure — inside the parent transaction, so a
105
128
  // GDPR deletion request fails. Catch the unsupported combination here instead.
106
129
  const isUnsupportedLazyMode = onParentDelete.mode === ChildLifecycleMode.LAZY;
107
130
  if (hasDiscovery && isRetentionGoverned && !isUnsupportedLazyMode) {
@@ -126,10 +149,10 @@ export function validateCompositionCascadeDeletability(resourceConfigurations) {
126
149
  missingTeardownOp: false, // teardown is a scrub, not a delete op
127
150
  missingRetentionGovernance: !isRetentionGoverned,
128
151
  unsupportedLazyRetainMode: isUnsupportedLazyMode,
129
- message: `Composition child '${child.resourceIdentifier}' (parent '${relationship.resourceType1}') ` +
152
+ message: `Lifecycle child '${child.resourceIdentifier}' (parent '${relationship.resourceType1}') ` +
130
153
  `enabled onParentDelete with strategy IMPERSONALIZE_AND_RETAIN but is NOT impersonalize-able: ` +
131
154
  `missing ${missing.join(' and ')}. The retain-and-scrub cascade (impersonalizeChildrenImmediate) ` +
132
- `would throw ErrorType.CONFIGURATION and roll back the parent delete once a child row exists. ` +
155
+ `would fail during parent deletion once a child row exists. ` +
133
156
  `Opt the child into retentionPolicy (RETAIN_ONLY or RETAIN_AND_IMPERSONALIZE), or use strategy DELETE.`,
134
157
  });
135
158
  continue;
@@ -154,7 +177,7 @@ export function validateCompositionCascadeDeletability(resourceConfigurations) {
154
177
  strategy,
155
178
  missingDiscoveryOp: hasDiscovery ? undefined : discoveryOp,
156
179
  missingTeardownOp: !hasTeardown,
157
- message: `Composition child '${child.resourceIdentifier}' (parent '${relationship.resourceType1}') ` +
180
+ message: `Lifecycle child '${child.resourceIdentifier}' (parent '${relationship.resourceType1}') ` +
158
181
  `enabled onParentDelete but is NOT cascade-deletable: missing ${missing.join(' and ')}. ` +
159
182
  `The delete cascade (deleteChildrenImmediate) would throw ErrorType.CONFIGURATION and roll ` +
160
183
  `back the parent delete once a child row exists. Add the missing op(s) (a REPOSITORY_ONLY ` +
@@ -1 +1 @@
1
- {"version":3,"file":"composition-cascade-deletability.validation.js","sourceRoot":"","sources":["../../../../../src/resources/utils/composition-cascade-deletability.validation.ts"],"names":[],"mappings":"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","sourcesContent":["import {\n ResourceRelationship,\n RelationshipNature,\n isOneToOneCardinality,\n} from '../resources.shared.schemas';\nimport { ResourceType, CoreResourceOperation } from '../resources.shared.core.definitions';\nimport { ChildLifecycleMode, ChildLifecycleStrategy } from '../child-operations.shared.schemas';\nimport type { ErasureRetentionMode } from '../../compliance/privacy/impersonalization.shared.schemas';\n\n/**\n * Registry-level guardrail for the composition `onParentDelete` lifecycle — the\n * DELETE-side counterpart to `validateCompositionSeedability`.\n *\n * A composition relationship that OPTS IN to the delete cascade\n * (`childOperations.lifecycle.onParentDelete.enabled = true`) must actually be\n * cascade-deletable, or the runtime cascade throws `ErrorType.CONFIGURATION`\n * INSIDE the parent's delete transaction and ROLLS BACK the parent delete. Two\n * things must hold on the child, checked here with the exact predicate the\n * runtime uses (`supportsOperation`: the op has a default variant):\n *\n * 1. **Discovery** — `deleteChildrenImmediate` loads the children before\n * deleting them: a 1:1 child via READ, a 1:many child via LIST. Missing that\n * op → `CONFIGURATION` throw.\n * 2. **Teardown** — it then removes them via DELETE_MANY (preferred) or a\n * per-row DELETE loop. Missing BOTH → `CONFIGURATION` throw. (DELETE strategy.)\n *\n * ## Two teardown strategies (`onParentDelete.strategy`)\n *\n * DELETE (default) hard-deletes the child, so it needs the DELETE/DELETE_MANY\n * teardown op above. IMPERSONALIZE_AND_RETAIN instead scrubs the child's personal\n * fields IN PLACE and KEEPS the row (retain-for-audit, GDPR Art. 17(3)(b)), via the\n * trusted `updateManyAsSystem` writer — so it needs NO delete op. It instead needs\n * the child to be retention-governed (`retentionPolicy`,\n * which the resource factory guarantees also carries the UPDATE_MANY scrub grant +\n * the `retentionStatus` marker). Discovery (point 1) is shared by both strategies.\n *\n * ## Why this is separate from (and dual to) seedability\n *\n * `onParentCreate` (seed) and `onParentDelete` (cascade) are orthogonal DDD axes\n * (created-with vs dies-with). The seed resolves the child's CREATE through the\n * SERVICE tier (rejects REPOSITORY_ONLY); the cascade deletes through the\n * REPOSITORY tier (variant-agnostic). So the two guards check different ops on\n * different resolution paths and neither implies the other — a child can be\n * seedable but not cascade-deletable (exactly the gap that shipped for the\n * lifecycle / guidance / progression / preferences / notifications adopters).\n *\n * ## Unreachable edges are NOT violations (parent-reachability skip)\n *\n * The cascade runs ONLY from the PARENT's DELETE / DELETE_MANY post-op logic. If\n * the parent can reach neither, the edge is structurally unreachable — dormant,\n * never fired — and is intentionally skipped (e.g. `USER_SELF` exposes only\n * READ/UPDATE, so `USER_SELF → USER_SELF_PREFERENCES/PROFILES` never cascades;\n * real user deletion runs through `USERS`, whose profile/preferences children DO\n * carry DELETE). This skip is self-correcting: the day the parent gains a delete\n * path, its dormant edges become reachable and this guard fires.\n *\n * \"Can reach\" means {@link canFireDeleteCascade}, not `supportsOperation` — a\n * CUSTOM operation borrowing the verb through `resourceOperationLike` fires the\n * cascade exactly as a core DELETE does. Reading only the core verb made this\n * skip unsound; `user_self | delete_account` (removed 2026-08-01) was the live\n * case, and its two edges reported clean here while throwing at runtime.\n *\n * ## Fail-closed, fail-open on ambiguity\n *\n * A genuine violation (a reachable adopter missing a discovery/teardown op) is a\n * boot-time throw. When the edge cannot be classified (parent absent from the\n * map) the check skips (fail-open) so it never false-positives or blocks\n * startup. Pure and side-effect free.\n */\n\n/** Structural subset of a built resource configuration this validator needs. */\nexport interface CompositionCascadeDeletabilityResourceInput {\n resourceIdentifier: ResourceType;\n /**\n * Flattened per-variant operations — read exactly like the runtime\n * `supportsOperation` (`op.operationIdentifier === verb && op.isOperationDefault`).\n *\n * `resourceOperationLike` is carried because a CUSTOM operation borrowing a core verb reaches the\n * same repository primitive as the core operation, and so fires the same cascade — see\n * {@link canFireDeleteCascade}. A child's teardown capability is still read through\n * {@link supportsOperation} (the runtime `supportsOperation` the cascade itself calls), so the\n * extra field matters only on the PARENT side.\n */\n operations: ReadonlyArray<{\n operationIdentifier: string;\n isOperationDefault?: boolean;\n resourceOperationLike?: CoreResourceOperation;\n }>;\n /**\n * Resolved retention policy, present (and normalized to opted-in) IFF this resource is\n * retention-governed (`retentionPolicy`). Only such resources carry the\n * factory-injected `retentionStatus` marker AND the derived UPDATE_MANY scrub grant, so only they\n * can be the CHILD of an `IMPERSONALIZE_AND_RETAIN` onParentDelete edge. Absent = not\n * retention-governed → an `IMPERSONALIZE_AND_RETAIN` edge toward it is a violation.\n */\n retentionPolicy?: { mode?: ErasureRetentionMode };\n resourceRelationships?: {\n parentRelationships?: ResourceRelationship[];\n };\n}\n\nexport interface CompositionCascadeDeletabilityViolation {\n childResourceType: ResourceType;\n parentResourceType: ResourceType;\n cardinality: 'one-to-one' | 'one-to-many';\n /** The teardown strategy the edge declared: DELETE (hard-delete) or IMPERSONALIZE_AND_RETAIN (scrub+keep). */\n strategy: ChildLifecycleStrategy;\n /** The discovery op the cascade needs but the child lacks (READ for 1:1, LIST for 1:many), if any. Shared by both strategies. */\n missingDiscoveryOp?: CoreResourceOperation;\n /** DELETE strategy only: true when the child supports neither DELETE nor DELETE_MANY. */\n missingTeardownOp: boolean;\n /**\n * IMPERSONALIZE_AND_RETAIN strategy only: true when the child is NOT retention-governed\n * (no `retentionPolicy` → no `retentionStatus` marker + no derived\n * UPDATE_MANY scrub grant to flip it with).\n */\n missingRetentionGovernance?: boolean;\n /**\n * IMPERSONALIZE_AND_RETAIN strategy only: true when the edge declares `mode: LAZY`, which v1 cannot\n * execute (there is no async retain-and-scrub) and which would otherwise throw on the first erasure.\n */\n unsupportedLazyRetainMode?: boolean;\n message: string;\n}\n\n/** Runtime-truthful `supportsOperation`: a default variant for the verb exists. */\nfunction supportsOperation(\n resource: CompositionCascadeDeletabilityResourceInput | undefined,\n verb: CoreResourceOperation,\n): boolean {\n return (\n resource?.operations?.some(\n (op) => op.operationIdentifier === verb && op.isOperationDefault === true,\n ) ?? false\n );\n}\n\n/**\n * Whether this resource can reach the DELETE post-op logic that fires an `onParentDelete` cascade.\n *\n * NOT the same question as `supportsOperation(resource, DELETE)`. A CUSTOM operation declaring\n * `resourceOperationLike: DELETE` carries its own `operationIdentifier`, so `supportsOperation`\n * says no — yet it reaches `_doDelete` all the same: the service resolves the core verb through\n * `getCoreResourceOperationFromOperation` (which falls back to `resourceOperationLike`) and calls\n * the repository by OPERATION PATH, and the repository's operations map is built from EVERY\n * configured operation, custom ones included. The `coreOperations` gate on the public\n * `RepositoryResourceBackendService.delete()` convenience method is simply not on that path.\n *\n * Reading only the core verb made the parent-reachability skip below unsound, and it cost real\n * damage: `user_self | delete_account` (removed 2026-08-01) declared no core DELETE, so this guard\n * cleared its two `onParentDelete` edges as dormant — while at runtime the custom op fired the\n * cascade into `USER_SELF_PROFILES` / `USER_SELF_PREFERENCES`, neither of which declares a\n * teardown op. The cascade threw `ErrorType.CONFIGURATION` inside the delete transaction, so the\n * delete rolled back for any user who had one of those rows and committed for any user who had\n * neither. A boot guard that cannot see custom delete-like ops cannot protect that edge.\n *\n * `DELETE_MANY` is included for the same reason: `deleteMany` is the cascade's preferred teardown\n * path and a custom op may borrow it just as readily.\n */\nfunction canFireDeleteCascade(\n resource: CompositionCascadeDeletabilityResourceInput | undefined,\n): boolean {\n if (!resource?.operations) return false;\n return resource.operations.some((op) => {\n if (op.isOperationDefault !== true) return false;\n // A core operation carries the verb as its own identifier; a custom one borrows it.\n const effectiveVerb = op.operationIdentifier === CoreResourceOperation.DELETE\n || op.operationIdentifier === CoreResourceOperation.DELETE_MANY\n ? (op.operationIdentifier as CoreResourceOperation)\n : op.resourceOperationLike;\n return effectiveVerb === CoreResourceOperation.DELETE\n || effectiveVerb === CoreResourceOperation.DELETE_MANY;\n });\n}\n\n/**\n * Validate that every composition relationship which opted into\n * `onParentDelete.enabled` is actually cascade-deletable (its child has the\n * cardinality-appropriate discovery op + a DELETE/DELETE_MANY teardown op),\n * unless the edge is structurally unreachable because the parent cannot fire the\n * cascade. Returns the list of violations (empty when clean); the caller throws\n * on any (fail-closed).\n *\n * @param resourceConfigurations - the registry's `resourceConfigurations` map\n * (`resourceType → built configuration`). Each entry is the CHILD in its\n * `parentRelationships`; parents are looked up in the same map for the\n * reachability skip.\n */\nexport function validateCompositionCascadeDeletability(\n resourceConfigurations: Record<string, CompositionCascadeDeletabilityResourceInput>,\n): CompositionCascadeDeletabilityViolation[] {\n const violations: CompositionCascadeDeletabilityViolation[] = [];\n\n for (const child of Object.values(resourceConfigurations)) {\n const parentRelationships = child.resourceRelationships?.parentRelationships ?? [];\n\n for (const relationship of parentRelationships) {\n if (relationship.nature !== RelationshipNature.COMPOSITION) {\n continue;\n }\n\n // Only an ENABLED onParentDelete cascade must be cascade-deletable. A\n // composition WITHOUT it leaves orphans by design choice — not this guard's\n // concern.\n const onParentDelete = relationship.childOperations?.lifecycle?.onParentDelete;\n if (onParentDelete?.enabled !== true) {\n continue;\n }\n\n // Parent-reachability skip: the cascade fires from the parent's DELETE / DELETE_MANY post-op\n // logic. A parent that can reach neither can never trigger this edge → dormant, not a\n // violation. Self-correcting: the day the parent gains a delete path, this stops skipping and\n // the guard fires.\n //\n // Reachability is `canFireDeleteCascade`, NOT `supportsOperation` — a CUSTOM op borrowing the\n // verb via `resourceOperationLike` fires the cascade too, and reading only the core verb is\n // what let `user_self | delete_account` cascade into two teardown-less children while this\n // guard reported clean. See the function's JSDoc.\n const parent = resourceConfigurations[relationship.resourceType1];\n if (!parent) {\n continue; // fail-open: parent not in this map, cannot classify\n }\n if (!canFireDeleteCascade(parent)) {\n continue; // structurally unreachable edge — no core AND no delete-like custom op\n }\n\n // Discovery op depends on cardinality: 1:1 discovered via READ, 1:many via LIST. SHARED by both\n // teardown strategies — impersonalizeChildrenImmediate reads the same way before scrubbing.\n const oneToOne = isOneToOneCardinality(relationship.cardinality2);\n const discoveryOp = oneToOne ? CoreResourceOperation.READ : CoreResourceOperation.LIST;\n const hasDiscovery = supportsOperation(child, discoveryOp);\n\n // The teardown STRATEGY decides what the child needs beyond discovery: DELETE (default) needs a\n // DELETE/DELETE_MANY op; IMPERSONALIZE_AND_RETAIN needs the child to be retention-governed.\n const strategy = onParentDelete.strategy ?? ChildLifecycleStrategy.DELETE;\n\n if (strategy === ChildLifecycleStrategy.IMPERSONALIZE_AND_RETAIN) {\n // Retain-and-scrub teardown (via updateManyAsSystem), NOT a hard delete. The child must be\n // retention-governed: only `retentionPolicy` injects the retentionStatus\n // marker AND derives the UPDATE_MANY scrub grant. A non-retention child has nothing to flip →\n // impersonalizeChildrenImmediate throws CONFIGURATION and rolls back the parent delete.\n const isRetentionGoverned = child.retentionPolicy?.mode !== undefined;\n // v1 executes the retain-and-scrub only in IMMEDIATE mode. A LAZY retain edge parses, boots and\n // passes CI, then throws on the FIRST production erasure — inside the parent transaction, so a\n // GDPR deletion request fails. Catch the unsupported combination here instead.\n const isUnsupportedLazyMode = onParentDelete.mode === ChildLifecycleMode.LAZY;\n if (hasDiscovery && isRetentionGoverned && !isUnsupportedLazyMode) {\n continue; // impersonalize-able\n }\n\n const missing: string[] = [];\n if (!hasDiscovery) {\n missing.push(`${discoveryOp} (to discover ${oneToOne ? '1:1' : '1:many'} dependents)`);\n }\n if (!isRetentionGoverned) {\n missing.push('retentionPolicy (either mode — to carry the retentionStatus marker + the UPDATE_MANY retain grant)');\n }\n if (isUnsupportedLazyMode) {\n missing.push('mode: IMMEDIATE (v1 has no async retain-and-scrub; LAZY would throw on the first erasure)');\n }\n\n violations.push({\n childResourceType: child.resourceIdentifier,\n parentResourceType: relationship.resourceType1,\n cardinality: oneToOne ? 'one-to-one' : 'one-to-many',\n strategy,\n missingDiscoveryOp: hasDiscovery ? undefined : discoveryOp,\n missingTeardownOp: false, // teardown is a scrub, not a delete op\n missingRetentionGovernance: !isRetentionGoverned,\n unsupportedLazyRetainMode: isUnsupportedLazyMode,\n message:\n `Composition child '${child.resourceIdentifier}' (parent '${relationship.resourceType1}') ` +\n `enabled onParentDelete with strategy IMPERSONALIZE_AND_RETAIN but is NOT impersonalize-able: ` +\n `missing ${missing.join(' and ')}. The retain-and-scrub cascade (impersonalizeChildrenImmediate) ` +\n `would throw ErrorType.CONFIGURATION and roll back the parent delete once a child row exists. ` +\n `Opt the child into retentionPolicy (RETAIN_ONLY or RETAIN_AND_IMPERSONALIZE), or use strategy DELETE.`,\n });\n continue;\n }\n\n // DELETE strategy (default): teardown op is DELETE_MANY (preferred by the cascade) or a per-row DELETE.\n const hasTeardown =\n supportsOperation(child, CoreResourceOperation.DELETE_MANY) ||\n supportsOperation(child, CoreResourceOperation.DELETE);\n\n if (hasDiscovery && hasTeardown) {\n continue; // cascade-deletable\n }\n\n const missing: string[] = [];\n if (!hasDiscovery) {\n missing.push(`${discoveryOp} (to discover ${oneToOne ? '1:1' : '1:many'} dependents)`);\n }\n if (!hasTeardown) {\n missing.push('DELETE or DELETE_MANY (to remove the row)');\n }\n\n violations.push({\n childResourceType: child.resourceIdentifier,\n parentResourceType: relationship.resourceType1,\n cardinality: oneToOne ? 'one-to-one' : 'one-to-many',\n strategy,\n missingDiscoveryOp: hasDiscovery ? undefined : discoveryOp,\n missingTeardownOp: !hasTeardown,\n message:\n `Composition child '${child.resourceIdentifier}' (parent '${relationship.resourceType1}') ` +\n `enabled onParentDelete but is NOT cascade-deletable: missing ${missing.join(' and ')}. ` +\n `The delete cascade (deleteChildrenImmediate) would throw ErrorType.CONFIGURATION and roll ` +\n `back the parent delete once a child row exists. Add the missing op(s) (a REPOSITORY_ONLY ` +\n `DELETE is enough for teardown), or drop onParentDelete.enabled.`,\n });\n }\n }\n\n return violations;\n}\n"]}
1
+ {"version":3,"file":"composition-cascade-deletability.validation.js","sourceRoot":"","sources":["../../../../../src/resources/utils/composition-cascade-deletability.validation.ts"],"names":[],"mappings":"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","sourcesContent":["import {\n ResourceRelationship,\n isOneToOneCardinality,\n} from '../resources.shared.schemas';\nimport { ResourceType, CoreResourceOperation } from '../resources.shared.core.definitions';\nimport { ChildLifecycleMode, ChildLifecycleStrategy, resolveChildLifecycleTeardownStrategy } from '../child-operations.shared.schemas';\nimport { Resources_SharedUtils } from '../resources.shared.utils';\nimport { getParentDirectionRelationships } from '../resources-config.shared.schemas';\nimport type { ErasureRetentionMode } from '../../compliance/privacy/impersonalization.shared.schemas';\n\n/**\n * Registry-level guardrail for the effective `onParentDelete` lifecycle — the\n * DELETE-side counterpart to `validateCompositionSeedability`.\n *\n * A relationship that OPTS IN to the delete cascade\n * (`childOperations.lifecycle.onParentDelete.enabled = true`) must actually be\n * cascade-deletable, or the runtime cascade throws `ErrorType.CONFIGURATION`\n * INSIDE the parent's delete transaction and ROLLS BACK the parent delete. Two\n * things must hold on the child, checked here with the exact predicate the\n * runtime uses (`supportsOperation`: the op has a default variant):\n *\n * 1. **Discovery** — `deleteChildrenImmediate` loads the children before\n * deleting them: a 1:1 child via READ, a 1:many child via LIST. Missing that\n * op → `CONFIGURATION` throw.\n * 2. **Teardown** — it then removes them via DELETE_MANY (preferred) or a\n * per-row DELETE loop. Missing BOTH → `CONFIGURATION` throw. (DELETE strategy.)\n *\n * ## Two teardown strategies (`onParentDelete.strategy`)\n *\n * DELETE (default) hard-deletes the child, so it needs the DELETE/DELETE_MANY\n * teardown op above. IMPERSONALIZE_AND_RETAIN instead scrubs the child's personal\n * fields IN PLACE and KEEPS the row (retain-for-audit, GDPR Art. 17(3)(b)), via the\n * trusted `updateManyAsSystem` writer — so it needs NO delete op. It instead needs\n * the child to be retention-governed (`retentionPolicy`,\n * which the resource factory guarantees also carries the UPDATE_MANY scrub grant +\n * the `retentionStatus` marker). Discovery (point 1) is shared by both strategies.\n *\n * REFUSE_WHILE_CHILDREN_EXIST tears nothing down and lists nothing. The parent's delete probes for one\n * remaining child with a repository READ on the edge's foreign key, whatever the cardinality, so READ\n * is its whole requirement. Without it every delete of the parent would be refused with CONFIGURATION.\n *\n * ## Why this is separate from (and dual to) seedability\n *\n * `onParentCreate` (seed) and `onParentDelete` (cascade) are orthogonal DDD axes\n * (created-with vs dies-with). The seed resolves the child's CREATE through the\n * SERVICE tier (rejects REPOSITORY_ONLY); the cascade deletes through the\n * REPOSITORY tier (variant-agnostic). So the two guards check different ops on\n * different resolution paths and neither implies the other — a child can be\n * seedable but not cascade-deletable (exactly the gap that shipped for the\n * lifecycle / guidance / progression / preferences / notifications adopters).\n *\n * ## Unreachable edges are NOT violations (parent-reachability skip)\n *\n * The cascade runs ONLY from the PARENT's DELETE / DELETE_MANY post-op logic. If\n * the parent can reach neither, the edge is structurally unreachable — dormant,\n * never fired — and is intentionally skipped (e.g. `USER_SELF` exposes only\n * READ/UPDATE, so `USER_SELF → USER_SELF_PREFERENCES/PROFILES` never cascades;\n * real user deletion runs through `USERS`, whose profile/preferences children DO\n * carry DELETE). This skip is self-correcting: the day the parent gains a delete\n * path, its dormant edges become reachable and this guard fires.\n *\n * \"Can reach\" means {@link canFireDeleteCascade}, not `supportsOperation` — a\n * CUSTOM operation borrowing the verb through `resourceOperationLike` fires the\n * cascade exactly as a core DELETE does. Reading only the core verb made this\n * skip unsound; `user_self | delete_account` (removed 2026-08-01) was the live\n * case, and its two edges reported clean here while throwing at runtime.\n *\n * ## Fail-closed, fail-open on ambiguity\n *\n * A retention violation is a boot-time throw; hard-delete prerequisite findings\n * are reported separately by the startup caller. When the edge cannot be classified (parent absent from the\n * map) the check skips (fail-open) so it never false-positives or blocks\n * startup. Pure and side-effect free.\n */\n\n/** Structural subset of a built resource configuration this validator needs. */\nexport interface CompositionCascadeDeletabilityResourceInput {\n resourceIdentifier: ResourceType;\n /**\n * Flattened per-variant operations. Parent reachability includes every callable\n * variant; child discovery/teardown follows runtime `supportsOperation`\n * (`op.operationIdentifier === verb && op.isOperationDefault`).\n *\n * `resourceOperationLike` is carried because a CUSTOM operation borrowing a core verb reaches the\n * same repository primitive as the core operation, and so fires the same cascade — see\n * {@link canFireDeleteCascade}. A child's teardown capability is still read through\n * {@link supportsOperation} (the runtime `supportsOperation` the cascade itself calls), so the\n * extra field matters only on the PARENT side.\n */\n operations: ReadonlyArray<{\n operationIdentifier: string;\n isOperationDefault?: boolean;\n resourceOperationLike?: CoreResourceOperation;\n }>;\n /**\n * Resolved retention policy, present (and normalized to opted-in) IFF this resource is\n * retention-governed (`retentionPolicy`). Only such resources carry the\n * factory-injected `retentionStatus` marker AND the derived UPDATE_MANY scrub grant, so only they\n * can be the CHILD of an `IMPERSONALIZE_AND_RETAIN` onParentDelete edge. Absent = not\n * retention-governed → an `IMPERSONALIZE_AND_RETAIN` edge toward it is a violation.\n */\n retentionPolicy?: { mode?: ErasureRetentionMode };\n resourceRelationships?: {\n parentRelationships?: ResourceRelationship[];\n selfRelationships?: ResourceRelationship[];\n };\n}\n\nexport interface CompositionCascadeDeletabilityViolation {\n childResourceType: ResourceType;\n parentResourceType: ResourceType;\n cardinality: 'one-to-one' | 'one-to-many';\n /** The strategy the edge declared: DELETE (hard-delete), IMPERSONALIZE_AND_RETAIN (scrub+keep) or REFUSE_WHILE_CHILDREN_EXIST. */\n strategy: ChildLifecycleStrategy;\n /**\n * The op the edge needs but the child lacks, if any: the cascade's discovery op (READ for 1:1, LIST for\n * 1:many, shared by DELETE and IMPERSONALIZE_AND_RETAIN), or READ, the existence probe, for REFUSE_WHILE_CHILDREN_EXIST.\n */\n missingDiscoveryOp?: CoreResourceOperation;\n /** DELETE strategy only: true when the child supports neither DELETE nor DELETE_MANY. */\n missingTeardownOp: boolean;\n /**\n * IMPERSONALIZE_AND_RETAIN strategy only: true when the child is NOT retention-governed\n * (no `retentionPolicy` → no `retentionStatus` marker + no derived\n * UPDATE_MANY scrub grant to flip it with).\n */\n missingRetentionGovernance?: boolean;\n /**\n * IMPERSONALIZE_AND_RETAIN strategy only: true when the edge declares `mode: LAZY`, which v1 cannot\n * execute (there is no async retain-and-scrub) and which would otherwise throw on the first erasure.\n */\n unsupportedLazyRetainMode?: boolean;\n message: string;\n}\n\n/** Runtime-truthful `supportsOperation`: a default variant for the verb exists. */\nfunction supportsOperation(\n resource: CompositionCascadeDeletabilityResourceInput | undefined,\n verb: CoreResourceOperation,\n): boolean {\n return (\n resource?.operations?.some(\n (op) => op.operationIdentifier === verb && op.isOperationDefault === true,\n ) ?? false\n );\n}\n\n/**\n * Whether this resource can reach the DELETE post-op logic that fires an `onParentDelete` cascade.\n *\n * NOT the same question as `supportsOperation(resource, DELETE)`. A CUSTOM operation declaring\n * `resourceOperationLike: DELETE` carries its own `operationIdentifier`, so `supportsOperation`\n * says no — yet it reaches `_doDelete` all the same: the service resolves the core verb through\n * `getCoreResourceOperationFromOperation` (which falls back to `resourceOperationLike`) and calls\n * the repository by OPERATION PATH, and the repository's operations map is built from EVERY\n * configured operation, custom ones included. The `coreOperations` gate on the public\n * `RepositoryResourceBackendService.delete()` convenience method is simply not on that path.\n *\n * Reading only the core verb made the parent-reachability skip below unsound, and it cost real\n * damage: `user_self | delete_account` (removed 2026-08-01) declared no core DELETE, so this guard\n * cleared its two `onParentDelete` edges as dormant — while at runtime the custom op fired the\n * cascade into `USER_SELF_PROFILES` / `USER_SELF_PREFERENCES`, neither of which declares a\n * teardown op. The cascade threw `ErrorType.CONFIGURATION` inside the delete transaction, so the\n * delete rolled back for any user who had one of those rows and committed for any user who had\n * neither. A boot guard that cannot see custom delete-like ops cannot protect that edge.\n *\n * `DELETE_MANY` is included for the same reason: `deleteMany` is the cascade's preferred teardown\n * path and a custom op may borrow it just as readily.\n */\nexport function canFireDeleteCascade(\n resource: CompositionCascadeDeletabilityResourceInput | undefined,\n): boolean {\n if (!resource?.operations) return false;\n return resource.operations.some((op) => {\n // A selected operation path can invoke any variant. Only child discovery/teardown\n // convenience calls require defaults; parent reachability must include keyed variants.\n // A core operation carries the verb as its own identifier; a custom one borrows it.\n const effectiveVerb = op.operationIdentifier === CoreResourceOperation.DELETE\n || op.operationIdentifier === CoreResourceOperation.DELETE_MANY\n ? (op.operationIdentifier as CoreResourceOperation)\n : op.resourceOperationLike;\n return effectiveVerb === CoreResourceOperation.DELETE\n || effectiveVerb === CoreResourceOperation.DELETE_MANY;\n });\n}\n\n/**\n * Validate that every effective relationship lifecycle which opted into\n * `onParentDelete.enabled` is actually cascade-deletable (its child has the\n * cardinality-appropriate discovery op + a DELETE/DELETE_MANY teardown op),\n * unless the edge is structurally unreachable because the parent cannot fire the\n * cascade. Returns the list of violations (empty when clean); startup rejects\n * retention violations and reports hard-delete prerequisites separately.\n *\n * @param resourceConfigurations - the registry's `resourceConfigurations` map\n * (`resourceType → built configuration`). Each entry is the CHILD in its\n * `parentRelationships` and `selfRelationships`; parents are looked up in the same map for the\n * reachability skip.\n */\nexport function validateCompositionCascadeDeletability(\n resourceConfigurations: Record<string, CompositionCascadeDeletabilityResourceInput>,\n): CompositionCascadeDeletabilityViolation[] {\n const violations: CompositionCascadeDeletabilityViolation[] = [];\n\n for (const child of Object.values(resourceConfigurations)) {\n const parentRelationships = getParentDirectionRelationships({\n parentRelationships: child.resourceRelationships?.parentRelationships ?? [],\n selfRelationships: child.resourceRelationships?.selfRelationships ?? [],\n childRelationships: [],\n });\n\n for (const relationship of parentRelationships) {\n // Use the same compiled lifecycle policy as execution. Authored nature alone\n // misses association-to-junction cascades; INDEPENDENT relationships are dormant.\n const onParentDelete = Resources_SharedUtils.resolveRelationshipLifecycleOnParentDeleteConfig(relationship);\n if (onParentDelete?.enabled !== true) {\n continue;\n }\n\n // Parent-reachability skip: the cascade fires from the parent's DELETE / DELETE_MANY post-op\n // logic. A parent that can reach neither can never trigger this edge → dormant, not a\n // violation. Self-correcting: the day the parent gains a delete path, this stops skipping and\n // the guard fires.\n //\n // Reachability is `canFireDeleteCascade`, NOT `supportsOperation` — a CUSTOM op borrowing the\n // verb via `resourceOperationLike` fires the cascade too, and reading only the core verb is\n // what let `user_self | delete_account` cascade into two teardown-less children while this\n // guard reported clean. See the function's JSDoc.\n const parent = resourceConfigurations[relationship.resourceType1];\n if (!parent) {\n continue; // fail-open: parent not in this map, cannot classify\n }\n if (!canFireDeleteCascade(parent)) {\n continue; // structurally unreachable edge — no core AND no delete-like custom op\n }\n\n // RESTRICT posture: no discovery list and no teardown. The refusal probes existence with ONE\n // repository READ on the edge's foreign key, whatever the cardinality, so READ is the whole requirement.\n if (onParentDelete.strategy === ChildLifecycleStrategy.REFUSE_WHILE_CHILDREN_EXIST) {\n if (supportsOperation(child, CoreResourceOperation.READ)) {\n continue;\n }\n violations.push({\n childResourceType: child.resourceIdentifier,\n parentResourceType: relationship.resourceType1,\n cardinality: isOneToOneCardinality(relationship.cardinality2) ? 'one-to-one' : 'one-to-many',\n strategy: ChildLifecycleStrategy.REFUSE_WHILE_CHILDREN_EXIST,\n missingDiscoveryOp: CoreResourceOperation.READ,\n missingTeardownOp: false,\n message:\n `Lifecycle child '${child.resourceIdentifier}' (parent '${relationship.resourceType1}') ` +\n `declares onParentDelete strategy REFUSE_WHILE_CHILDREN_EXIST but does not support READ. The ` +\n `parent's delete probes for a remaining child with a repository READ before it writes anything, ` +\n `so every delete of the parent would be refused with CONFIGURATION. Add a READ operation to the ` +\n `child (a REPOSITORY_ONLY variant is enough), or declare another strategy.`,\n });\n continue;\n }\n\n // Discovery op depends on cardinality: 1:1 discovered via READ, 1:many via LIST. SHARED by both\n // teardown strategies — impersonalizeChildrenImmediate reads the same way before scrubbing.\n const oneToOne = isOneToOneCardinality(relationship.cardinality2);\n const discoveryOp = oneToOne ? CoreResourceOperation.READ : CoreResourceOperation.LIST;\n const hasDiscovery = supportsOperation(child, discoveryOp);\n\n // The teardown STRATEGY decides what the child needs beyond discovery: DELETE (default) needs a\n // DELETE/DELETE_MANY op; IMPERSONALIZE_AND_RETAIN needs the child to be retention-governed.\n const strategy = resolveChildLifecycleTeardownStrategy(onParentDelete)!;\n\n if (strategy === ChildLifecycleStrategy.IMPERSONALIZE_AND_RETAIN) {\n // Retain-and-scrub teardown (via updateManyAsSystem), NOT a hard delete. The child must be\n // retention-governed: only `retentionPolicy` injects the retentionStatus\n // marker AND derives the UPDATE_MANY scrub grant. A non-retention child has nothing to flip →\n // impersonalizeChildrenImmediate throws CONFIGURATION and rolls back the parent delete.\n const isRetentionGoverned = child.retentionPolicy?.mode !== undefined;\n // v1 executes retain-and-scrub only in IMMEDIATE mode. Without this guard, a LAZY retain\n // edge could pass startup and throw on the first erasure — inside the parent transaction, so a\n // GDPR deletion request fails. Catch the unsupported combination here instead.\n const isUnsupportedLazyMode = onParentDelete.mode === ChildLifecycleMode.LAZY;\n if (hasDiscovery && isRetentionGoverned && !isUnsupportedLazyMode) {\n continue; // impersonalize-able\n }\n\n const missing: string[] = [];\n if (!hasDiscovery) {\n missing.push(`${discoveryOp} (to discover ${oneToOne ? '1:1' : '1:many'} dependents)`);\n }\n if (!isRetentionGoverned) {\n missing.push('retentionPolicy (either mode — to carry the retentionStatus marker + the UPDATE_MANY retain grant)');\n }\n if (isUnsupportedLazyMode) {\n missing.push('mode: IMMEDIATE (v1 has no async retain-and-scrub; LAZY would throw on the first erasure)');\n }\n\n violations.push({\n childResourceType: child.resourceIdentifier,\n parentResourceType: relationship.resourceType1,\n cardinality: oneToOne ? 'one-to-one' : 'one-to-many',\n strategy,\n missingDiscoveryOp: hasDiscovery ? undefined : discoveryOp,\n missingTeardownOp: false, // teardown is a scrub, not a delete op\n missingRetentionGovernance: !isRetentionGoverned,\n unsupportedLazyRetainMode: isUnsupportedLazyMode,\n message:\n `Lifecycle child '${child.resourceIdentifier}' (parent '${relationship.resourceType1}') ` +\n `enabled onParentDelete with strategy IMPERSONALIZE_AND_RETAIN but is NOT impersonalize-able: ` +\n `missing ${missing.join(' and ')}. The retain-and-scrub cascade (impersonalizeChildrenImmediate) ` +\n `would fail during parent deletion once a child row exists. ` +\n `Opt the child into retentionPolicy (RETAIN_ONLY or RETAIN_AND_IMPERSONALIZE), or use strategy DELETE.`,\n });\n continue;\n }\n\n // DELETE strategy (default): teardown op is DELETE_MANY (preferred by the cascade) or a per-row DELETE.\n const hasTeardown =\n supportsOperation(child, CoreResourceOperation.DELETE_MANY) ||\n supportsOperation(child, CoreResourceOperation.DELETE);\n\n if (hasDiscovery && hasTeardown) {\n continue; // cascade-deletable\n }\n\n const missing: string[] = [];\n if (!hasDiscovery) {\n missing.push(`${discoveryOp} (to discover ${oneToOne ? '1:1' : '1:many'} dependents)`);\n }\n if (!hasTeardown) {\n missing.push('DELETE or DELETE_MANY (to remove the row)');\n }\n\n violations.push({\n childResourceType: child.resourceIdentifier,\n parentResourceType: relationship.resourceType1,\n cardinality: oneToOne ? 'one-to-one' : 'one-to-many',\n strategy,\n missingDiscoveryOp: hasDiscovery ? undefined : discoveryOp,\n missingTeardownOp: !hasTeardown,\n message:\n `Lifecycle child '${child.resourceIdentifier}' (parent '${relationship.resourceType1}') ` +\n `enabled onParentDelete but is NOT cascade-deletable: missing ${missing.join(' and ')}. ` +\n `The delete cascade (deleteChildrenImmediate) would throw ErrorType.CONFIGURATION and roll ` +\n `back the parent delete once a child row exists. Add the missing op(s) (a REPOSITORY_ONLY ` +\n `DELETE is enough for teardown), or drop onParentDelete.enabled.`,\n });\n }\n }\n\n return violations;\n}\n"]}
@@ -0,0 +1,61 @@
1
+ import type { ResourceType } from '../resources.shared.core.definitions';
2
+ import { SubjectErasureDisposition } from '../../compliance/privacy/subject-erasure.shared.schemas';
3
+ import { type CompositionCascadeDeletabilityResourceInput } from './composition-cascade-deletability.validation';
4
+ /**
5
+ * One DEPENDENT edge whose lifecycle nobody has classified (#1095).
6
+ *
7
+ * The classification is the erasure runtime's own — `classifySubjectErasureDisposition` — so the
8
+ * report and the runtime cannot disagree about what an edge says. Two dispositions are reported,
9
+ * exactly the ones {@link isBlockingSubjectErasureDisposition} refuses at runtime:
10
+ *
11
+ * - `UNCLASSIFIED`: a COMPOSITION edge (`lifecycleModelMode: DEPENDENT`) with NO `onParentDelete`
12
+ * at all. `enabled` defaults to `false`, so deleting the parent leaves the children in place under
13
+ * a parent that no longer exists. The tenant purge dispatches the ordinary `ORGANIZATIONS | DELETE`
14
+ * and relies on the same cascade, so an `ORGANIZATIONS → X` edge in this state leaves X's rows
15
+ * behind after the tenant is destroyed; a subject erasure reaching the edge is REFUSED outright.
16
+ * - `UNSUPPORTED_DEFERRED`: `mode: LAZY`, which a subject erasure cannot execute.
17
+ */
18
+ export interface UnclassifiedDependentLifecycleEdge {
19
+ parentResourceType: ResourceType;
20
+ childResourceType: ResourceType;
21
+ foreignKeyField?: string;
22
+ disposition: SubjectErasureDisposition;
23
+ /** The classifier's own justification, naming the declaration that would settle the edge. */
24
+ reason: string;
25
+ }
26
+ /**
27
+ * Collect every DEPENDENT edge whose parent-delete lifecycle the author never classified — the
28
+ * boot-time report `isBlockingSubjectErasureDisposition` was exported for ("the erasure analogue of
29
+ * `validateCompositionCascadeDeletability`").
30
+ *
31
+ * ## Why a REPORT and not a refusal
32
+ *
33
+ * `validateCompositionCascadeDeletability` guards edges that OPTED IN to the cascade and cannot run
34
+ * it. This guard is its complement: edges that never opted either way. An undeclared edge is a
35
+ * missing declaration, and the honest reading of "the framework asked nothing, so the author said
36
+ * nothing" is a gap to derive and surface, total over the registry, rather than a refusal wired
37
+ * into boot (`application-creation-directive.md`: mark, do not block). The two runtimes that meet
38
+ * such an edge already answer for themselves — the erasure refuses at the edge, the plain delete and
39
+ * the tenant purge orphan silently — and the second is the one nothing reported until now.
40
+ *
41
+ * ## Population
42
+ *
43
+ * Total over every relationship of every configuration, read through the SAME helper the delete
44
+ * cascade and the erasure walker read (`resolveRelationshipLifecycleOnParentDeleteConfig`, inside the
45
+ * classifier). A disabled relationship is not part of the live graph and is skipped by the
46
+ * classifier itself (`NOT_OWNED`).
47
+ *
48
+ * ## Parent-reachability skip, shared with the cascade-deletability guard
49
+ *
50
+ * The delete cascade fires only from the parent's DELETE / DELETE_MANY post-op logic. A parent that
51
+ * can reach neither can never orphan anything, so its undeclared edges are dormant and are NOT
52
+ * reported — `canFireDeleteCascade`, the same predicate the sibling guard uses, so the two guards
53
+ * agree on which edges are live. Self-correcting: the day the parent gains a delete path, its dormant
54
+ * edges are reported.
55
+ *
56
+ * @param resourceConfigurations - the registry's `resourceConfigurations` map (`resourceType →
57
+ * built configuration`). Each entry is the CHILD in its `parentRelationships` and
58
+ * `selfRelationships`; parents are looked up in the same map for the reachability skip.
59
+ */
60
+ export declare function collectUnclassifiedDependentLifecycleEdges(resourceConfigurations: Record<string, CompositionCascadeDeletabilityResourceInput>): UnclassifiedDependentLifecycleEdge[];
61
+ //# sourceMappingURL=dependent-lifecycle-classification.validation.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"dependent-lifecycle-classification.validation.d.ts","sourceRoot":"","sources":["../../../../../src/resources/utils/dependent-lifecycle-classification.validation.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,sCAAsC,CAAC;AAEzE,OAAO,EAGL,yBAAyB,EAC1B,MAAM,yDAAyD,CAAC;AACjE,OAAO,EAEL,KAAK,2CAA2C,EACjD,MAAM,+CAA+C,CAAC;AAEvD;;;;;;;;;;;;;GAaG;AACH,MAAM,WAAW,kCAAkC;IACjD,kBAAkB,EAAE,YAAY,CAAC;IACjC,iBAAiB,EAAE,YAAY,CAAC;IAChC,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,WAAW,EAAE,yBAAyB,CAAC;IACvC,6FAA6F;IAC7F,MAAM,EAAE,MAAM,CAAC;CAChB;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiCG;AACH,wBAAgB,0CAA0C,CACxD,sBAAsB,EAAE,MAAM,CAAC,MAAM,EAAE,2CAA2C,CAAC,GAClF,kCAAkC,EAAE,CAgDtC"}
@@ -0,0 +1,79 @@
1
+ import { getParentDirectionRelationships } from '../resources-config.shared.schemas.js';
2
+ import { classifySubjectErasureDisposition, isBlockingSubjectErasureDisposition, } from '../../compliance/privacy/subject-erasure.shared.schemas.js';
3
+ import { canFireDeleteCascade, } from './composition-cascade-deletability.validation.js';
4
+ /**
5
+ * Collect every DEPENDENT edge whose parent-delete lifecycle the author never classified — the
6
+ * boot-time report `isBlockingSubjectErasureDisposition` was exported for ("the erasure analogue of
7
+ * `validateCompositionCascadeDeletability`").
8
+ *
9
+ * ## Why a REPORT and not a refusal
10
+ *
11
+ * `validateCompositionCascadeDeletability` guards edges that OPTED IN to the cascade and cannot run
12
+ * it. This guard is its complement: edges that never opted either way. An undeclared edge is a
13
+ * missing declaration, and the honest reading of "the framework asked nothing, so the author said
14
+ * nothing" is a gap to derive and surface, total over the registry, rather than a refusal wired
15
+ * into boot (`application-creation-directive.md`: mark, do not block). The two runtimes that meet
16
+ * such an edge already answer for themselves — the erasure refuses at the edge, the plain delete and
17
+ * the tenant purge orphan silently — and the second is the one nothing reported until now.
18
+ *
19
+ * ## Population
20
+ *
21
+ * Total over every relationship of every configuration, read through the SAME helper the delete
22
+ * cascade and the erasure walker read (`resolveRelationshipLifecycleOnParentDeleteConfig`, inside the
23
+ * classifier). A disabled relationship is not part of the live graph and is skipped by the
24
+ * classifier itself (`NOT_OWNED`).
25
+ *
26
+ * ## Parent-reachability skip, shared with the cascade-deletability guard
27
+ *
28
+ * The delete cascade fires only from the parent's DELETE / DELETE_MANY post-op logic. A parent that
29
+ * can reach neither can never orphan anything, so its undeclared edges are dormant and are NOT
30
+ * reported — `canFireDeleteCascade`, the same predicate the sibling guard uses, so the two guards
31
+ * agree on which edges are live. Self-correcting: the day the parent gains a delete path, its dormant
32
+ * edges are reported.
33
+ *
34
+ * @param resourceConfigurations - the registry's `resourceConfigurations` map (`resourceType →
35
+ * built configuration`). Each entry is the CHILD in its `parentRelationships` and
36
+ * `selfRelationships`; parents are looked up in the same map for the reachability skip.
37
+ */
38
+ export function collectUnclassifiedDependentLifecycleEdges(resourceConfigurations) {
39
+ const edges = [];
40
+ const reported = new Set();
41
+ for (const child of Object.values(resourceConfigurations)) {
42
+ const parentRelationships = getParentDirectionRelationships({
43
+ parentRelationships: child.resourceRelationships?.parentRelationships ?? [],
44
+ selfRelationships: child.resourceRelationships?.selfRelationships ?? [],
45
+ childRelationships: [],
46
+ });
47
+ for (const relationship of parentRelationships) {
48
+ const parent = resourceConfigurations[relationship.resourceType1];
49
+ if (!parent) {
50
+ continue; // fail-open: parent not in this map, cannot classify
51
+ }
52
+ if (!canFireDeleteCascade(parent)) {
53
+ continue; // structurally unreachable edge — the parent has no delete path to orphan from
54
+ }
55
+ // #1279: the classifier reads the CHILD's own `retentionPolicy` — the declaration that states
56
+ // what an erasure does to its rows — so this guard reports exactly what the runtime will do.
57
+ // The map is keyed by resource type and already carries the resolved policy, so the lookup is
58
+ // the same one the reachability skip above makes.
59
+ const classification = classifySubjectErasureDisposition(relationship, (resourceType) => resourceConfigurations[String(resourceType)]?.retentionPolicy);
60
+ if (!isBlockingSubjectErasureDisposition(classification.disposition)) {
61
+ continue;
62
+ }
63
+ // The same relationship object is registered on both sides of the graph; report each edge once.
64
+ const key = `${String(relationship.resourceType1)}→${String(relationship.resourceType2)}:${String(relationship.foreignKeyField ?? '')}`;
65
+ if (reported.has(key))
66
+ continue;
67
+ reported.add(key);
68
+ edges.push({
69
+ parentResourceType: relationship.resourceType1,
70
+ childResourceType: relationship.resourceType2,
71
+ ...(relationship.foreignKeyField ? { foreignKeyField: relationship.foreignKeyField } : {}),
72
+ disposition: classification.disposition,
73
+ reason: classification.reason,
74
+ });
75
+ }
76
+ }
77
+ return edges;
78
+ }
79
+ //# sourceMappingURL=dependent-lifecycle-classification.validation.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"dependent-lifecycle-classification.validation.js","sourceRoot":"","sources":["../../../../../src/resources/utils/dependent-lifecycle-classification.validation.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,+BAA+B,EAAE,MAAM,oCAAoC,CAAC;AACrF,OAAO,EACL,iCAAiC,EACjC,mCAAmC,GAEpC,MAAM,yDAAyD,CAAC;AACjE,OAAO,EACL,oBAAoB,GAErB,MAAM,+CAA+C,CAAC;AAyBvD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiCG;AACH,MAAM,UAAU,0CAA0C,CACxD,sBAAmF;IAEnF,MAAM,KAAK,GAAyC,EAAE,CAAC;IACvD,MAAM,QAAQ,GAAG,IAAI,GAAG,EAAU,CAAC;IAEnC,KAAK,MAAM,KAAK,IAAI,MAAM,CAAC,MAAM,CAAC,sBAAsB,CAAC,EAAE,CAAC;QAC1D,MAAM,mBAAmB,GAAG,+BAA+B,CAAC;YAC1D,mBAAmB,EAAE,KAAK,CAAC,qBAAqB,EAAE,mBAAmB,IAAI,EAAE;YAC3E,iBAAiB,EAAE,KAAK,CAAC,qBAAqB,EAAE,iBAAiB,IAAI,EAAE;YACvE,kBAAkB,EAAE,EAAE;SACvB,CAAC,CAAC;QAEH,KAAK,MAAM,YAAY,IAAI,mBAAmB,EAAE,CAAC;YAC/C,MAAM,MAAM,GAAG,sBAAsB,CAAC,YAAY,CAAC,aAAa,CAAC,CAAC;YAClE,IAAI,CAAC,MAAM,EAAE,CAAC;gBACZ,SAAS,CAAC,qDAAqD;YACjE,CAAC;YACD,IAAI,CAAC,oBAAoB,CAAC,MAAM,CAAC,EAAE,CAAC;gBAClC,SAAS,CAAC,+EAA+E;YAC3F,CAAC;YAED,8FAA8F;YAC9F,6FAA6F;YAC7F,8FAA8F;YAC9F,kDAAkD;YAClD,MAAM,cAAc,GAAG,iCAAiC,CACtD,YAAY,EACZ,CAAC,YAAY,EAAE,EAAE,CAAC,sBAAsB,CAAC,MAAM,CAAC,YAAY,CAAC,CAAC,EAAE,eAAe,CAChF,CAAC;YACF,IAAI,CAAC,mCAAmC,CAAC,cAAc,CAAC,WAAW,CAAC,EAAE,CAAC;gBACrE,SAAS;YACX,CAAC;YAED,gGAAgG;YAChG,MAAM,GAAG,GAAG,GAAG,MAAM,CAAC,YAAY,CAAC,aAAa,CAAC,IAAI,MAAM,CAAC,YAAY,CAAC,aAAa,CAAC,IAAI,MAAM,CAAC,YAAY,CAAC,eAAe,IAAI,EAAE,CAAC,EAAE,CAAC;YACxI,IAAI,QAAQ,CAAC,GAAG,CAAC,GAAG,CAAC;gBAAE,SAAS;YAChC,QAAQ,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;YAElB,KAAK,CAAC,IAAI,CAAC;gBACT,kBAAkB,EAAE,YAAY,CAAC,aAAa;gBAC9C,iBAAiB,EAAE,YAAY,CAAC,aAAa;gBAC7C,GAAG,CAAC,YAAY,CAAC,eAAe,CAAC,CAAC,CAAC,EAAE,eAAe,EAAE,YAAY,CAAC,eAAe,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;gBAC1F,WAAW,EAAE,cAAc,CAAC,WAAW;gBACvC,MAAM,EAAE,cAAc,CAAC,MAAM;aAC9B,CAAC,CAAC;QACL,CAAC;IACH,CAAC;IAED,OAAO,KAAK,CAAC;AACf,CAAC","sourcesContent":["import type { ResourceType } from '../resources.shared.core.definitions';\nimport { getParentDirectionRelationships } from '../resources-config.shared.schemas';\nimport {\n classifySubjectErasureDisposition,\n isBlockingSubjectErasureDisposition,\n SubjectErasureDisposition,\n} from '../../compliance/privacy/subject-erasure.shared.schemas';\nimport {\n canFireDeleteCascade,\n type CompositionCascadeDeletabilityResourceInput,\n} from './composition-cascade-deletability.validation';\n\n/**\n * One DEPENDENT edge whose lifecycle nobody has classified (#1095).\n *\n * The classification is the erasure runtime's own — `classifySubjectErasureDisposition` — so the\n * report and the runtime cannot disagree about what an edge says. Two dispositions are reported,\n * exactly the ones {@link isBlockingSubjectErasureDisposition} refuses at runtime:\n *\n * - `UNCLASSIFIED`: a COMPOSITION edge (`lifecycleModelMode: DEPENDENT`) with NO `onParentDelete`\n * at all. `enabled` defaults to `false`, so deleting the parent leaves the children in place under\n * a parent that no longer exists. The tenant purge dispatches the ordinary `ORGANIZATIONS | DELETE`\n * and relies on the same cascade, so an `ORGANIZATIONS → X` edge in this state leaves X's rows\n * behind after the tenant is destroyed; a subject erasure reaching the edge is REFUSED outright.\n * - `UNSUPPORTED_DEFERRED`: `mode: LAZY`, which a subject erasure cannot execute.\n */\nexport interface UnclassifiedDependentLifecycleEdge {\n parentResourceType: ResourceType;\n childResourceType: ResourceType;\n foreignKeyField?: string;\n disposition: SubjectErasureDisposition;\n /** The classifier's own justification, naming the declaration that would settle the edge. */\n reason: string;\n}\n\n/**\n * Collect every DEPENDENT edge whose parent-delete lifecycle the author never classified — the\n * boot-time report `isBlockingSubjectErasureDisposition` was exported for (\"the erasure analogue of\n * `validateCompositionCascadeDeletability`\").\n *\n * ## Why a REPORT and not a refusal\n *\n * `validateCompositionCascadeDeletability` guards edges that OPTED IN to the cascade and cannot run\n * it. This guard is its complement: edges that never opted either way. An undeclared edge is a\n * missing declaration, and the honest reading of \"the framework asked nothing, so the author said\n * nothing\" is a gap to derive and surface, total over the registry, rather than a refusal wired\n * into boot (`application-creation-directive.md`: mark, do not block). The two runtimes that meet\n * such an edge already answer for themselves — the erasure refuses at the edge, the plain delete and\n * the tenant purge orphan silently — and the second is the one nothing reported until now.\n *\n * ## Population\n *\n * Total over every relationship of every configuration, read through the SAME helper the delete\n * cascade and the erasure walker read (`resolveRelationshipLifecycleOnParentDeleteConfig`, inside the\n * classifier). A disabled relationship is not part of the live graph and is skipped by the\n * classifier itself (`NOT_OWNED`).\n *\n * ## Parent-reachability skip, shared with the cascade-deletability guard\n *\n * The delete cascade fires only from the parent's DELETE / DELETE_MANY post-op logic. A parent that\n * can reach neither can never orphan anything, so its undeclared edges are dormant and are NOT\n * reported — `canFireDeleteCascade`, the same predicate the sibling guard uses, so the two guards\n * agree on which edges are live. Self-correcting: the day the parent gains a delete path, its dormant\n * edges are reported.\n *\n * @param resourceConfigurations - the registry's `resourceConfigurations` map (`resourceType →\n * built configuration`). Each entry is the CHILD in its `parentRelationships` and\n * `selfRelationships`; parents are looked up in the same map for the reachability skip.\n */\nexport function collectUnclassifiedDependentLifecycleEdges(\n resourceConfigurations: Record<string, CompositionCascadeDeletabilityResourceInput>,\n): UnclassifiedDependentLifecycleEdge[] {\n const edges: UnclassifiedDependentLifecycleEdge[] = [];\n const reported = new Set<string>();\n\n for (const child of Object.values(resourceConfigurations)) {\n const parentRelationships = getParentDirectionRelationships({\n parentRelationships: child.resourceRelationships?.parentRelationships ?? [],\n selfRelationships: child.resourceRelationships?.selfRelationships ?? [],\n childRelationships: [],\n });\n\n for (const relationship of parentRelationships) {\n const parent = resourceConfigurations[relationship.resourceType1];\n if (!parent) {\n continue; // fail-open: parent not in this map, cannot classify\n }\n if (!canFireDeleteCascade(parent)) {\n continue; // structurally unreachable edge — the parent has no delete path to orphan from\n }\n\n // #1279: the classifier reads the CHILD's own `retentionPolicy` — the declaration that states\n // what an erasure does to its rows — so this guard reports exactly what the runtime will do.\n // The map is keyed by resource type and already carries the resolved policy, so the lookup is\n // the same one the reachability skip above makes.\n const classification = classifySubjectErasureDisposition(\n relationship,\n (resourceType) => resourceConfigurations[String(resourceType)]?.retentionPolicy,\n );\n if (!isBlockingSubjectErasureDisposition(classification.disposition)) {\n continue;\n }\n\n // The same relationship object is registered on both sides of the graph; report each edge once.\n const key = `${String(relationship.resourceType1)}→${String(relationship.resourceType2)}:${String(relationship.foreignKeyField ?? '')}`;\n if (reported.has(key)) continue;\n reported.add(key);\n\n edges.push({\n parentResourceType: relationship.resourceType1,\n childResourceType: relationship.resourceType2,\n ...(relationship.foreignKeyField ? { foreignKeyField: relationship.foreignKeyField } : {}),\n disposition: classification.disposition,\n reason: classification.reason,\n });\n }\n }\n\n return edges;\n}\n"]}
@@ -0,0 +1,60 @@
1
+ import { z } from 'zod';
2
+ import type { ResourceType } from '../resources.shared.core.definitions';
3
+ /**
4
+ * Registry-level guard: a field the ENGINE stamps from the initiator's USER must not be REQUIRED.
5
+ *
6
+ * ## The shape (#584)
7
+ *
8
+ * `createdByUserId` is stripped from the CREATE DTO by name — a client may never author it — and is
9
+ * stamped by the repository from `executionContext.initiatorIds.userId`, guarded by `if (userId)` in
10
+ * both adapters (`addUserTracking`, and the PostgreSQL adapter's own copy). `updatedByUserId` /
11
+ * `lastUpdatedByUserId` are stamped the same way on UPDATE.
12
+ *
13
+ * **A machine principal has no `userId`.** An org or application service acting over MCP, A2A,
14
+ * client credentials, a worker or a batch supplies none, so a REQUIRED one of these fields is
15
+ * satisfied by nobody: not the client (stripped), not the repository (the guard skips). Nothing said
16
+ * so at registration or at exposure, and the write failed — or committed and then failed to describe
17
+ * itself — the first time a machine caller reached the resource. That is how `todos` and `todoLists`
18
+ * were found (#577), each only after being exposed.
19
+ *
20
+ * ## A refusal at boot, and why it was a report first
21
+ *
22
+ * The backend refuses to start when this returns anything — the engine's own measurement is that a
23
+ * declaration gets made if and only if the framework refuses to start without it.
24
+ *
25
+ * It shipped as a startup REPORT on the belief that flipping the existing declarations to optional
26
+ * changes PostgreSQL column nullability and so owes a migration in every surface. It does not: the
27
+ * schema planner's contract (version 3) records `sqlType`, `hasIndex`, `isPrimaryKey`, `unique` and
28
+ * `defaultClause` per column and no nullability, so a required-vs-optional change is enforced by the
29
+ * Zod layer alone and leaves every lockfile in sync. Measured on all three PostgreSQL surfaces
30
+ * before the promotion, with the existing declarations flipped in the same change.
31
+ *
32
+ * ## Scope
33
+ *
34
+ * - Only the user-stamped identifiers. The primary-scope foreign keys (`organizationId`, …) are also
35
+ * context-populated, but from the SCOPE, which a machine principal does carry — they are required on
36
+ * purpose.
37
+ * - System resources are skipped: the framework owns their write paths and supplies or refuses the
38
+ * attribution explicitly (the SCIM token mint refuses a principal with no user).
39
+ * - Discriminated-union (polymorphic) schemas are checked on every variant that declares the field.
40
+ */
41
+ export declare const INITIATOR_USER_STAMPED_FIELD_IDENTIFIERS: readonly ["createdByUserId", "updatedByUserId", "lastUpdatedByUserId"];
42
+ export type InitiatorUserStampedFieldIdentifier = typeof INITIATOR_USER_STAMPED_FIELD_IDENTIFIERS[number];
43
+ export interface InitiatorStampedFieldViolation {
44
+ readonly resourceType: ResourceType;
45
+ readonly field: InitiatorUserStampedFieldIdentifier;
46
+ readonly message: string;
47
+ }
48
+ /** Structural subset of a resource configuration this validator needs. */
49
+ export interface InitiatorStampedFieldResourceInput {
50
+ readonly resourceIdentifier: ResourceType;
51
+ readonly mainSchema: z.ZodTypeAny;
52
+ readonly isSystemResource?: boolean;
53
+ }
54
+ /**
55
+ * Report every non-system resource that declares an initiator-user-stamped field as REQUIRED.
56
+ * `isOptional` treats `.optional()`, `.default()` and `.nullish()` as optional; a bare `.nullable()`
57
+ * stays required, which is correct — `null` is not what the stamp's absence produces.
58
+ */
59
+ export declare function validateInitiatorStampedFieldSatisfiability(resourceConfigurations: Readonly<Record<string, InitiatorStampedFieldResourceInput>>): InitiatorStampedFieldViolation[];
60
+ //# sourceMappingURL=initiator-stamped-field-satisfiability.validation.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"initiator-stamped-field-satisfiability.validation.d.ts","sourceRoot":"","sources":["../../../../../src/resources/utils/initiator-stamped-field-satisfiability.validation.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAQxB,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,sCAAsC,CAAC;AAEzE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAqCG;AACH,eAAO,MAAM,wCAAwC,wEAAyE,CAAC;AAE/H,MAAM,MAAM,mCAAmC,GAAG,OAAO,wCAAwC,CAAC,MAAM,CAAC,CAAC;AAE1G,MAAM,WAAW,8BAA8B;IAC7C,QAAQ,CAAC,YAAY,EAAE,YAAY,CAAC;IACpC,QAAQ,CAAC,KAAK,EAAE,mCAAmC,CAAC;IACpD,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;CAC1B;AAED,0EAA0E;AAC1E,MAAM,WAAW,kCAAkC;IACjD,QAAQ,CAAC,kBAAkB,EAAE,YAAY,CAAC;IAC1C,QAAQ,CAAC,UAAU,EAAE,CAAC,CAAC,UAAU,CAAC;IAClC,QAAQ,CAAC,gBAAgB,CAAC,EAAE,OAAO,CAAC;CACrC;AAaD;;;;GAIG;AACH,wBAAgB,2CAA2C,CACzD,sBAAsB,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,kCAAkC,CAAC,CAAC,GACnF,8BAA8B,EAAE,CAoBlC"}