@wildo-ai/saas-models 1.1.8 → 1.1.10

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (951) hide show
  1. package/dist/esm/_inspect.d.ts.map +1 -1
  2. package/dist/esm/_inspect.js.map +1 -1
  3. package/dist/esm/applications/application-metadata.shared.resources-config.schemas.d.ts.map +1 -1
  4. package/dist/esm/applications/application-metadata.shared.resources-config.schemas.js.map +1 -1
  5. package/dist/esm/applications/application-subject.shared.schemas.d.ts.map +1 -1
  6. package/dist/esm/applications/application-subject.shared.schemas.js.map +1 -1
  7. package/dist/esm/applications/application-versions.shared.resources-config.schemas.d.ts.map +1 -1
  8. package/dist/esm/applications/application-versions.shared.resources-config.schemas.js.map +1 -1
  9. package/dist/esm/applications/applications-context.schemas.d.ts +68 -2
  10. package/dist/esm/applications/applications-context.schemas.d.ts.map +1 -1
  11. package/dist/esm/applications/applications-context.schemas.js.map +1 -1
  12. package/dist/esm/applications/applications.shared.resources-config.schemas.d.ts.map +1 -1
  13. package/dist/esm/applications/applications.shared.resources-config.schemas.js.map +1 -1
  14. package/dist/esm/applications/applications.shared.schemas.d.ts.map +1 -1
  15. package/dist/esm/applications/applications.shared.schemas.js.map +1 -1
  16. package/dist/esm/billing/billing-account.shared.resources-config.schemas.d.ts.map +1 -1
  17. package/dist/esm/billing/billing-account.shared.resources-config.schemas.js.map +1 -1
  18. package/dist/esm/billing/billing-account.shared.schemas.d.ts.map +1 -1
  19. package/dist/esm/billing/billing-account.shared.schemas.js.map +1 -1
  20. package/dist/esm/billing/billing-configuration.shared.schemas.d.ts.map +1 -1
  21. package/dist/esm/billing/billing-configuration.shared.schemas.js.map +1 -1
  22. package/dist/esm/billing/billing-enums.shared.schemas.d.ts.map +1 -1
  23. package/dist/esm/billing/billing-enums.shared.schemas.js.map +1 -1
  24. package/dist/esm/billing/billing-types.shared.schemas.d.ts.map +1 -1
  25. package/dist/esm/billing/billing-types.shared.schemas.js.map +1 -1
  26. package/dist/esm/billing/credit-pool.shared.resources-config.schemas.d.ts.map +1 -1
  27. package/dist/esm/billing/credit-pool.shared.resources-config.schemas.js.map +1 -1
  28. package/dist/esm/billing/credit-pool.shared.schemas.d.ts.map +1 -1
  29. package/dist/esm/billing/credit-pool.shared.schemas.js.map +1 -1
  30. package/dist/esm/billing/invoice-ref.shared.resources-config.schemas.d.ts.map +1 -1
  31. package/dist/esm/billing/invoice-ref.shared.resources-config.schemas.js.map +1 -1
  32. package/dist/esm/billing/invoice-ref.shared.schemas.d.ts.map +1 -1
  33. package/dist/esm/billing/invoice-ref.shared.schemas.js.map +1 -1
  34. package/dist/esm/billing/price.shared.resources-config.schemas.d.ts.map +1 -1
  35. package/dist/esm/billing/price.shared.resources-config.schemas.js.map +1 -1
  36. package/dist/esm/billing/price.shared.schemas.d.ts.map +1 -1
  37. package/dist/esm/billing/price.shared.schemas.js.map +1 -1
  38. package/dist/esm/billing/product-behavior-policy.shared.schemas.d.ts.map +1 -1
  39. package/dist/esm/billing/product-behavior-policy.shared.schemas.js.map +1 -1
  40. package/dist/esm/billing/product-definition.shared.schemas.d.ts.map +1 -1
  41. package/dist/esm/billing/product-definition.shared.schemas.js.map +1 -1
  42. package/dist/esm/billing/product.shared.resources-config.schemas.d.ts.map +1 -1
  43. package/dist/esm/billing/product.shared.resources-config.schemas.js.map +1 -1
  44. package/dist/esm/billing/product.shared.schemas.d.ts.map +1 -1
  45. package/dist/esm/billing/product.shared.schemas.js.map +1 -1
  46. package/dist/esm/billing/promotions.shared.resources-config.schemas.d.ts.map +1 -1
  47. package/dist/esm/billing/promotions.shared.resources-config.schemas.js.map +1 -1
  48. package/dist/esm/billing/promotions.shared.schemas.d.ts.map +1 -1
  49. package/dist/esm/billing/promotions.shared.schemas.js.map +1 -1
  50. package/dist/esm/billing/public-pricing-catalog.shared.atoms.d.ts.map +1 -1
  51. package/dist/esm/billing/public-pricing-catalog.shared.atoms.js.map +1 -1
  52. package/dist/esm/billing/public-pricing-catalog.shared.d.ts.map +1 -1
  53. package/dist/esm/billing/public-pricing-catalog.shared.js.map +1 -1
  54. package/dist/esm/billing/referral-reward.shared.schemas.d.ts.map +1 -1
  55. package/dist/esm/billing/referral-reward.shared.schemas.js.map +1 -1
  56. package/dist/esm/billing/referral.shared.resources-config.schemas.d.ts.map +1 -1
  57. package/dist/esm/billing/referral.shared.resources-config.schemas.js.map +1 -1
  58. package/dist/esm/billing/referral.shared.schemas.d.ts.map +1 -1
  59. package/dist/esm/billing/referral.shared.schemas.js.map +1 -1
  60. package/dist/esm/billing/subscription.shared.resources-config.schemas.d.ts.map +1 -1
  61. package/dist/esm/billing/subscription.shared.resources-config.schemas.js.map +1 -1
  62. package/dist/esm/billing/subscription.shared.schemas.d.ts.map +1 -1
  63. package/dist/esm/billing/subscription.shared.schemas.js.map +1 -1
  64. package/dist/esm/billing/usage-flush-evidence.shared.schemas.d.ts.map +1 -1
  65. package/dist/esm/billing/usage-flush-evidence.shared.schemas.js.map +1 -1
  66. package/dist/esm/billing/usage-record.shared.resources-config.schemas.d.ts.map +1 -1
  67. package/dist/esm/billing/usage-record.shared.resources-config.schemas.js.map +1 -1
  68. package/dist/esm/billing/usage-record.shared.schemas.d.ts.map +1 -1
  69. package/dist/esm/billing/usage-record.shared.schemas.js.map +1 -1
  70. package/dist/esm/charts/aggregation-query.shared.schemas.d.ts.map +1 -1
  71. package/dist/esm/charts/aggregation-query.shared.schemas.js.map +1 -1
  72. package/dist/esm/charts/aggregation.shared.definitions.d.ts.map +1 -1
  73. package/dist/esm/charts/aggregation.shared.definitions.js.map +1 -1
  74. package/dist/esm/charts/chart-definition-builder.shared.d.ts.map +1 -1
  75. package/dist/esm/charts/chart-definition-builder.shared.js.map +1 -1
  76. package/dist/esm/companion/artifact-placement.shared.definitions.d.ts.map +1 -1
  77. package/dist/esm/companion/artifact-placement.shared.definitions.js.map +1 -1
  78. package/dist/esm/companion/provider-discovery.shared.schemas.d.ts +13 -0
  79. package/dist/esm/companion/provider-discovery.shared.schemas.d.ts.map +1 -1
  80. package/dist/esm/companion/provider-discovery.shared.schemas.js +13 -0
  81. package/dist/esm/companion/provider-discovery.shared.schemas.js.map +1 -1
  82. package/dist/esm/companion/shared-library-companion.shared.definitions.d.ts.map +1 -1
  83. package/dist/esm/companion/shared-library-companion.shared.definitions.js.map +1 -1
  84. package/dist/esm/companion-exports.d.ts.map +1 -1
  85. package/dist/esm/companion-exports.js.map +1 -1
  86. package/dist/esm/compliance/audit-trails/application-audit-logs.shared.resources-config.schemas.d.ts +1 -1
  87. package/dist/esm/compliance/audit-trails/application-audit-logs.shared.resources-config.schemas.d.ts.map +1 -1
  88. package/dist/esm/compliance/audit-trails/application-audit-logs.shared.resources-config.schemas.js +5 -2
  89. package/dist/esm/compliance/audit-trails/application-audit-logs.shared.resources-config.schemas.js.map +1 -1
  90. package/dist/esm/compliance/audit-trails/audit-actor.shared.schemas.d.ts.map +1 -1
  91. package/dist/esm/compliance/audit-trails/audit-actor.shared.schemas.js.map +1 -1
  92. package/dist/esm/compliance/audit-trails/audit-event-classification.shared.d.ts +28 -0
  93. package/dist/esm/compliance/audit-trails/audit-event-classification.shared.d.ts.map +1 -0
  94. package/dist/esm/compliance/audit-trails/audit-event-classification.shared.js +30 -0
  95. package/dist/esm/compliance/audit-trails/audit-event-classification.shared.js.map +1 -0
  96. package/dist/esm/compliance/audit-trails/audit-export-projection.shared.schemas.d.ts.map +1 -1
  97. package/dist/esm/compliance/audit-trails/audit-export-projection.shared.schemas.js.map +1 -1
  98. package/dist/esm/compliance/audit-trails/audit-log-sink.shared.schemas.d.ts.map +1 -1
  99. package/dist/esm/compliance/audit-trails/audit-log-sink.shared.schemas.js.map +1 -1
  100. package/dist/esm/compliance/audit-trails/audit-logs.shared.resources-config.schemas.d.ts +1 -1
  101. package/dist/esm/compliance/audit-trails/audit-logs.shared.resources-config.schemas.d.ts.map +1 -1
  102. package/dist/esm/compliance/audit-trails/audit-logs.shared.resources-config.schemas.js +2 -1
  103. package/dist/esm/compliance/audit-trails/audit-logs.shared.resources-config.schemas.js.map +1 -1
  104. package/dist/esm/compliance/audit-trails/audit-trail-config.shared.schemas.d.ts +20 -0
  105. package/dist/esm/compliance/audit-trails/audit-trail-config.shared.schemas.d.ts.map +1 -1
  106. package/dist/esm/compliance/audit-trails/audit-trail-config.shared.schemas.js +40 -0
  107. package/dist/esm/compliance/audit-trails/audit-trail-config.shared.schemas.js.map +1 -1
  108. package/dist/esm/compliance/audit-trails/auditable-events.shared.schema.d.ts +1 -14
  109. package/dist/esm/compliance/audit-trails/auditable-events.shared.schema.d.ts.map +1 -1
  110. package/dist/esm/compliance/audit-trails/auditable-events.shared.schema.js +1 -16
  111. package/dist/esm/compliance/audit-trails/auditable-events.shared.schema.js.map +1 -1
  112. package/dist/esm/compliance/audit-trails/security-audit-event-envelope.shared.schema.d.ts +17 -4
  113. package/dist/esm/compliance/audit-trails/security-audit-event-envelope.shared.schema.d.ts.map +1 -1
  114. package/dist/esm/compliance/audit-trails/security-audit-event-envelope.shared.schema.js +25 -5
  115. package/dist/esm/compliance/audit-trails/security-audit-event-envelope.shared.schema.js.map +1 -1
  116. package/dist/esm/compliance/data-classification/data-classification.shared.schemas.d.ts.map +1 -1
  117. package/dist/esm/compliance/data-classification/data-classification.shared.schemas.js.map +1 -1
  118. package/dist/esm/compliance/documents/governed-document-interactions.shared.schemas.d.ts.map +1 -1
  119. package/dist/esm/compliance/documents/governed-document-interactions.shared.schemas.js.map +1 -1
  120. package/dist/esm/compliance/documents/governed-documents.shared.schemas.d.ts +0 -50
  121. package/dist/esm/compliance/documents/governed-documents.shared.schemas.d.ts.map +1 -1
  122. package/dist/esm/compliance/documents/governed-documents.shared.schemas.js +4 -51
  123. package/dist/esm/compliance/documents/governed-documents.shared.schemas.js.map +1 -1
  124. package/dist/esm/compliance/documents/public-governed-documents.shared.d.ts +67 -0
  125. package/dist/esm/compliance/documents/public-governed-documents.shared.d.ts.map +1 -0
  126. package/dist/esm/compliance/documents/public-governed-documents.shared.js +69 -0
  127. package/dist/esm/compliance/documents/public-governed-documents.shared.js.map +1 -0
  128. package/dist/esm/compliance/documents/user-governed-document-acceptances.shared.resources-config.schemas.d.ts.map +1 -1
  129. package/dist/esm/compliance/documents/user-governed-document-acceptances.shared.resources-config.schemas.js.map +1 -1
  130. package/dist/esm/compliance/documents/user-governed-document-acceptances.shared.schemas.d.ts.map +1 -1
  131. package/dist/esm/compliance/documents/user-governed-document-acceptances.shared.schemas.js.map +1 -1
  132. package/dist/esm/compliance/privacy/ai-use-posture.shared.schemas.d.ts.map +1 -1
  133. package/dist/esm/compliance/privacy/ai-use-posture.shared.schemas.js.map +1 -1
  134. package/dist/esm/compliance/privacy/capability-consent-purposes.shared.utils.d.ts.map +1 -1
  135. package/dist/esm/compliance/privacy/capability-consent-purposes.shared.utils.js.map +1 -1
  136. package/dist/esm/compliance/privacy/client-storage.shared.schemas.d.ts.map +1 -1
  137. package/dist/esm/compliance/privacy/client-storage.shared.schemas.js.map +1 -1
  138. package/dist/esm/compliance/privacy/consent-gate-vocabulary.shared.schemas.d.ts.map +1 -1
  139. package/dist/esm/compliance/privacy/consent-gate-vocabulary.shared.schemas.js.map +1 -1
  140. package/dist/esm/compliance/privacy/consent-purposes.shared.d.ts.map +1 -1
  141. package/dist/esm/compliance/privacy/consent-purposes.shared.js.map +1 -1
  142. package/dist/esm/compliance/privacy/data-subject-rights.shared.schemas.d.ts.map +1 -1
  143. package/dist/esm/compliance/privacy/data-subject-rights.shared.schemas.js +1 -1
  144. package/dist/esm/compliance/privacy/data-subject-rights.shared.schemas.js.map +1 -1
  145. package/dist/esm/compliance/privacy/impersonalization-scrub.shared.utils.d.ts.map +1 -1
  146. package/dist/esm/compliance/privacy/impersonalization-scrub.shared.utils.js.map +1 -1
  147. package/dist/esm/compliance/privacy/impersonalization.shared.schemas.d.ts.map +1 -1
  148. package/dist/esm/compliance/privacy/impersonalization.shared.schemas.js.map +1 -1
  149. package/dist/esm/compliance/privacy/jurisdiction-containment.shared.d.ts +32 -0
  150. package/dist/esm/compliance/privacy/jurisdiction-containment.shared.d.ts.map +1 -0
  151. package/dist/esm/compliance/privacy/jurisdiction-containment.shared.js +46 -0
  152. package/dist/esm/compliance/privacy/jurisdiction-containment.shared.js.map +1 -0
  153. package/dist/esm/compliance/privacy/legal-hold-subject-attribution.shared.utils.d.ts.map +1 -1
  154. package/dist/esm/compliance/privacy/legal-hold-subject-attribution.shared.utils.js.map +1 -1
  155. package/dist/esm/compliance/privacy/legal-holds.shared.resources-config.schemas.d.ts.map +1 -1
  156. package/dist/esm/compliance/privacy/legal-holds.shared.resources-config.schemas.js.map +1 -1
  157. package/dist/esm/compliance/privacy/legal-holds.shared.schemas.d.ts.map +1 -1
  158. package/dist/esm/compliance/privacy/legal-holds.shared.schemas.js.map +1 -1
  159. package/dist/esm/compliance/privacy/legal-notice-obligation.shared.d.ts +47 -0
  160. package/dist/esm/compliance/privacy/legal-notice-obligation.shared.d.ts.map +1 -0
  161. package/dist/esm/compliance/privacy/legal-notice-obligation.shared.js +54 -0
  162. package/dist/esm/compliance/privacy/legal-notice-obligation.shared.js.map +1 -0
  163. package/dist/esm/compliance/privacy/legal-notice.shared.d.ts +105 -0
  164. package/dist/esm/compliance/privacy/legal-notice.shared.d.ts.map +1 -0
  165. package/dist/esm/compliance/privacy/legal-notice.shared.js +112 -0
  166. package/dist/esm/compliance/privacy/legal-notice.shared.js.map +1 -0
  167. package/dist/esm/compliance/privacy/operating-jurisdictions.shared.schemas.d.ts +1 -27
  168. package/dist/esm/compliance/privacy/operating-jurisdictions.shared.schemas.d.ts.map +1 -1
  169. package/dist/esm/compliance/privacy/operating-jurisdictions.shared.schemas.js +2 -41
  170. package/dist/esm/compliance/privacy/operating-jurisdictions.shared.schemas.js.map +1 -1
  171. package/dist/esm/compliance/privacy/operator-compliance-identity.shared.schemas.d.ts +83 -1
  172. package/dist/esm/compliance/privacy/operator-compliance-identity.shared.schemas.d.ts.map +1 -1
  173. package/dist/esm/compliance/privacy/operator-compliance-identity.shared.schemas.js +97 -0
  174. package/dist/esm/compliance/privacy/operator-compliance-identity.shared.schemas.js.map +1 -1
  175. package/dist/esm/compliance/privacy/personal-data-category.shared.schemas.d.ts.map +1 -1
  176. package/dist/esm/compliance/privacy/personal-data-category.shared.schemas.js.map +1 -1
  177. package/dist/esm/compliance/privacy/personal-data-declaration.shared.utils.d.ts.map +1 -1
  178. package/dist/esm/compliance/privacy/personal-data-declaration.shared.utils.js.map +1 -1
  179. package/dist/esm/compliance/privacy/privacy.shared.schemas.d.ts.map +1 -1
  180. package/dist/esm/compliance/privacy/privacy.shared.schemas.js.map +1 -1
  181. package/dist/esm/compliance/privacy/provider-capability-disclosure.shared.schemas.d.ts.map +1 -1
  182. package/dist/esm/compliance/privacy/provider-capability-disclosure.shared.schemas.js.map +1 -1
  183. package/dist/esm/compliance/privacy/purpose-ref.shared.schemas.d.ts.map +1 -1
  184. package/dist/esm/compliance/privacy/purpose-ref.shared.schemas.js.map +1 -1
  185. package/dist/esm/compliance/privacy/redaction.shared.schemas.d.ts.map +1 -1
  186. package/dist/esm/compliance/privacy/redaction.shared.schemas.js.map +1 -1
  187. package/dist/esm/compliance/privacy/retention-binding.shared.utils.d.ts.map +1 -1
  188. package/dist/esm/compliance/privacy/retention-binding.shared.utils.js.map +1 -1
  189. package/dist/esm/compliance/privacy/retention-enforcement-records.shared.resources-config.schemas.d.ts.map +1 -1
  190. package/dist/esm/compliance/privacy/retention-enforcement-records.shared.resources-config.schemas.js.map +1 -1
  191. package/dist/esm/compliance/privacy/retention-enforcement-records.shared.schemas.d.ts +8 -8
  192. package/dist/esm/compliance/privacy/retention-enforcement-records.shared.schemas.d.ts.map +1 -1
  193. package/dist/esm/compliance/privacy/retention-enforcement-records.shared.schemas.js.map +1 -1
  194. package/dist/esm/compliance/privacy/retention-schedule.shared.schemas.d.ts.map +1 -1
  195. package/dist/esm/compliance/privacy/retention-schedule.shared.schemas.js.map +1 -1
  196. package/dist/esm/compliance/privacy/retention-scope-deleted.shared.utils.d.ts.map +1 -1
  197. package/dist/esm/compliance/privacy/retention-scope-deleted.shared.utils.js.map +1 -1
  198. package/dist/esm/compliance/privacy/sharing.shared.schemas.d.ts.map +1 -1
  199. package/dist/esm/compliance/privacy/sharing.shared.schemas.js.map +1 -1
  200. package/dist/esm/compliance/privacy/subject-data-recipients.shared.schemas.d.ts.map +1 -1
  201. package/dist/esm/compliance/privacy/subject-data-recipients.shared.schemas.js.map +1 -1
  202. package/dist/esm/compliance/privacy/subject-erasure-lane-evidence.shared.schemas.d.ts.map +1 -1
  203. package/dist/esm/compliance/privacy/subject-erasure-lane-evidence.shared.schemas.js.map +1 -1
  204. package/dist/esm/compliance/privacy/subject-erasure.shared.schemas.d.ts.map +1 -1
  205. package/dist/esm/compliance/privacy/subject-erasure.shared.schemas.js.map +1 -1
  206. package/dist/esm/compliance/privacy/subject-export-render.shared.utils.d.ts.map +1 -1
  207. package/dist/esm/compliance/privacy/subject-export-render.shared.utils.js.map +1 -1
  208. package/dist/esm/compliance/privacy/subject-export.shared.schemas.d.ts.map +1 -1
  209. package/dist/esm/compliance/privacy/subject-export.shared.schemas.js.map +1 -1
  210. package/dist/esm/compliance/review-cadence.shared.schemas.d.ts.map +1 -1
  211. package/dist/esm/compliance/review-cadence.shared.schemas.js.map +1 -1
  212. package/dist/esm/compliance/risk-posture.shared.schemas.d.ts +15 -3
  213. package/dist/esm/compliance/risk-posture.shared.schemas.d.ts.map +1 -1
  214. package/dist/esm/compliance/risk-posture.shared.schemas.js +14 -2
  215. package/dist/esm/compliance/risk-posture.shared.schemas.js.map +1 -1
  216. package/dist/esm/config/analytics-value-moments.shared.schemas.d.ts.map +1 -1
  217. package/dist/esm/config/analytics-value-moments.shared.schemas.js.map +1 -1
  218. package/dist/esm/config/app-configuration-shared.shared.schemas.d.ts +63 -1
  219. package/dist/esm/config/app-configuration-shared.shared.schemas.d.ts.map +1 -1
  220. package/dist/esm/config/app-configuration-shared.shared.schemas.js +11 -0
  221. package/dist/esm/config/app-configuration-shared.shared.schemas.js.map +1 -1
  222. package/dist/esm/config/app-frontend-type.shared.schemas.d.ts.map +1 -1
  223. package/dist/esm/config/app-frontend-type.shared.schemas.js.map +1 -1
  224. package/dist/esm/config/auth-config-resolution.shared.utils.d.ts.map +1 -1
  225. package/dist/esm/config/auth-config-resolution.shared.utils.js.map +1 -1
  226. package/dist/esm/config/brand-assets.shared.schemas.d.ts.map +1 -1
  227. package/dist/esm/config/brand-assets.shared.schemas.js.map +1 -1
  228. package/dist/esm/config/configuration-validation.shared.schemas.d.ts.map +1 -1
  229. package/dist/esm/config/configuration-validation.shared.schemas.js.map +1 -1
  230. package/dist/esm/config/entity-identity-config.shared.schemas.d.ts.map +1 -1
  231. package/dist/esm/config/entity-identity-config.shared.schemas.js.map +1 -1
  232. package/dist/esm/config/frontend/chart-definition.shared.schemas.d.ts +16 -16
  233. package/dist/esm/config/frontend/chart-definition.shared.schemas.d.ts.map +1 -1
  234. package/dist/esm/config/frontend/chart-definition.shared.schemas.js.map +1 -1
  235. package/dist/esm/config/frontend/chart-registration-alignment.shared.d.ts.map +1 -1
  236. package/dist/esm/config/frontend/chart-registration-alignment.shared.js.map +1 -1
  237. package/dist/esm/config/frontend/navigation.shared.schemas.d.ts.map +1 -1
  238. package/dist/esm/config/frontend/navigation.shared.schemas.js.map +1 -1
  239. package/dist/esm/config/frontend/onboarding.shared.schemas.d.ts.map +1 -1
  240. package/dist/esm/config/frontend/onboarding.shared.schemas.js.map +1 -1
  241. package/dist/esm/config/postgresql.shared.schemas.d.ts.map +1 -1
  242. package/dist/esm/config/postgresql.shared.schemas.js.map +1 -1
  243. package/dist/esm/config/registration-acquisition-policy.shared.utils.d.ts.map +1 -1
  244. package/dist/esm/config/registration-acquisition-policy.shared.utils.js.map +1 -1
  245. package/dist/esm/config-authoring.entry.d.ts.map +1 -1
  246. package/dist/esm/config-authoring.entry.js.map +1 -1
  247. package/dist/esm/crdt/crdt-merge.shared.utils.d.ts.map +1 -1
  248. package/dist/esm/crdt/crdt-merge.shared.utils.js.map +1 -1
  249. package/dist/esm/data-seeding/data-seeding-config.shared.schemas.d.ts.map +1 -1
  250. package/dist/esm/data-seeding/data-seeding-config.shared.schemas.js.map +1 -1
  251. package/dist/esm/errors/caught-error-description.shared.utils.d.ts +5 -1
  252. package/dist/esm/errors/caught-error-description.shared.utils.d.ts.map +1 -1
  253. package/dist/esm/errors/caught-error-description.shared.utils.js +48 -4
  254. package/dist/esm/errors/caught-error-description.shared.utils.js.map +1 -1
  255. package/dist/esm/errors/errors.custom-message-ref.shared.definitions.d.ts.map +1 -1
  256. package/dist/esm/errors/errors.custom-message-ref.shared.definitions.js.map +1 -1
  257. package/dist/esm/errors/errors.shared.definitions.d.ts.map +1 -1
  258. package/dist/esm/errors/errors.shared.definitions.js.map +1 -1
  259. package/dist/esm/errors/errors.shared.schemas.d.ts.map +1 -1
  260. package/dist/esm/errors/errors.shared.schemas.js.map +1 -1
  261. package/dist/esm/errors/errors.shared.utils.d.ts.map +1 -1
  262. package/dist/esm/errors/errors.shared.utils.js.map +1 -1
  263. package/dist/esm/errors/resource-access-forbidden.shared.error.d.ts.map +1 -1
  264. package/dist/esm/errors/resource-access-forbidden.shared.error.js.map +1 -1
  265. package/dist/esm/errors/thrown-value-description.shared.utils.d.ts.map +1 -1
  266. package/dist/esm/errors/thrown-value-description.shared.utils.js.map +1 -1
  267. package/dist/esm/errors/zod-issue-formatting.shared.utils.d.ts.map +1 -1
  268. package/dist/esm/errors/zod-issue-formatting.shared.utils.js.map +1 -1
  269. package/dist/esm/exports/tabular-csv.shared.utils.d.ts.map +1 -1
  270. package/dist/esm/exports/tabular-csv.shared.utils.js.map +1 -1
  271. package/dist/esm/external-data/external-data-pipeline-description.shared.d.ts.map +1 -1
  272. package/dist/esm/external-data/external-data-pipeline-description.shared.js.map +1 -1
  273. package/dist/esm/external-data/external-data-pipeline-pass-mode.shared.d.ts.map +1 -1
  274. package/dist/esm/external-data/external-data-pipeline-pass-mode.shared.js.map +1 -1
  275. package/dist/esm/external-data/external-data-pipeline.shared.schemas.d.ts.map +1 -1
  276. package/dist/esm/external-data/external-data-pipeline.shared.schemas.js.map +1 -1
  277. package/dist/esm/external-data/external-data-provenance.shared.d.ts.map +1 -1
  278. package/dist/esm/external-data/external-data-provenance.shared.js.map +1 -1
  279. package/dist/esm/external-data.exports.d.ts.map +1 -1
  280. package/dist/esm/external-data.exports.js.map +1 -1
  281. package/dist/esm/external-providers/compose-provider-registry.shared.d.ts.map +1 -1
  282. package/dist/esm/external-providers/compose-provider-registry.shared.js.map +1 -1
  283. package/dist/esm/external-providers/engine-capabilities.shared.schemas.d.ts.map +1 -1
  284. package/dist/esm/external-providers/engine-capabilities.shared.schemas.js.map +1 -1
  285. package/dist/esm/external-providers/engine-capability-resolution-mode.shared.d.ts.map +1 -1
  286. package/dist/esm/external-providers/engine-capability-resolution-mode.shared.js.map +1 -1
  287. package/dist/esm/external-providers/engine-capability-surface.shared.d.ts.map +1 -1
  288. package/dist/esm/external-providers/engine-capability-surface.shared.js.map +1 -1
  289. package/dist/esm/external-providers/external-providers.shared.schemas.d.ts.map +1 -1
  290. package/dist/esm/external-providers/external-providers.shared.schemas.js.map +1 -1
  291. package/dist/esm/external-providers/frontend-bootstrap.shared.schemas.d.ts +34 -1
  292. package/dist/esm/external-providers/frontend-bootstrap.shared.schemas.d.ts.map +1 -1
  293. package/dist/esm/external-providers/frontend-bootstrap.shared.schemas.js.map +1 -1
  294. package/dist/esm/external-providers/frontend-capability-public-config.shared.schemas.d.ts.map +1 -1
  295. package/dist/esm/external-providers/frontend-capability-public-config.shared.schemas.js.map +1 -1
  296. package/dist/esm/external-providers/frontend-capability-runtime.shared.types.d.ts.map +1 -1
  297. package/dist/esm/external-providers/frontend-capability-runtime.shared.types.js.map +1 -1
  298. package/dist/esm/external-providers/frontend-provider-entry.shared.schemas.d.ts.map +1 -1
  299. package/dist/esm/external-providers/frontend-provider-entry.shared.schemas.js.map +1 -1
  300. package/dist/esm/external-providers/frontend-provider-public-config.shared.d.ts.map +1 -1
  301. package/dist/esm/external-providers/frontend-provider-public-config.shared.js.map +1 -1
  302. package/dist/esm/external-providers/model-cost-accounting-config.shared.schemas.d.ts.map +1 -1
  303. package/dist/esm/external-providers/model-cost-accounting-config.shared.schemas.js.map +1 -1
  304. package/dist/esm/external-providers/provider-address-lookup-contract.shared.types.d.ts.map +1 -1
  305. package/dist/esm/external-providers/provider-address-lookup-contract.shared.types.js.map +1 -1
  306. package/dist/esm/external-providers/provider-augmentation-opt-ins.shared.schemas.d.ts.map +1 -1
  307. package/dist/esm/external-providers/provider-augmentation-opt-ins.shared.schemas.js.map +1 -1
  308. package/dist/esm/external-providers/provider-authentication-assurance.shared.schemas.d.ts.map +1 -1
  309. package/dist/esm/external-providers/provider-authentication-assurance.shared.schemas.js.map +1 -1
  310. package/dist/esm/external-providers/provider-browser-operations.shared.schemas.d.ts.map +1 -1
  311. package/dist/esm/external-providers/provider-browser-operations.shared.schemas.js.map +1 -1
  312. package/dist/esm/external-providers/provider-capability.shared.schemas.d.ts.map +1 -1
  313. package/dist/esm/external-providers/provider-capability.shared.schemas.js.map +1 -1
  314. package/dist/esm/external-providers/provider-compliance-profile.shared.schemas.d.ts.map +1 -1
  315. package/dist/esm/external-providers/provider-compliance-profile.shared.schemas.js.map +1 -1
  316. package/dist/esm/external-providers/provider-frontend-component-contract.shared.types.d.ts.map +1 -1
  317. package/dist/esm/external-providers/provider-frontend-component-contract.shared.types.js.map +1 -1
  318. package/dist/esm/external-providers/provider-frontend-surface.shared.schemas.d.ts.map +1 -1
  319. package/dist/esm/external-providers/provider-frontend-surface.shared.schemas.js.map +1 -1
  320. package/dist/esm/external-providers/provider-metadata.shared.schemas.d.ts.map +1 -1
  321. package/dist/esm/external-providers/provider-metadata.shared.schemas.js.map +1 -1
  322. package/dist/esm/external-providers/provider-package-allow-list.shared.schemas.d.ts.map +1 -1
  323. package/dist/esm/external-providers/provider-package-allow-list.shared.schemas.js.map +1 -1
  324. package/dist/esm/external-providers/provider-protocol.shared.schemas.d.ts.map +1 -1
  325. package/dist/esm/external-providers/provider-protocol.shared.schemas.js.map +1 -1
  326. package/dist/esm/external-providers/provider-scope-reauthorization.shared.schemas.d.ts.map +1 -1
  327. package/dist/esm/external-providers/provider-scope-reauthorization.shared.schemas.js.map +1 -1
  328. package/dist/esm/external-providers/provider-shared-connections.shared.schemas.d.ts.map +1 -1
  329. package/dist/esm/external-providers/provider-shared-connections.shared.schemas.js.map +1 -1
  330. package/dist/esm/external-providers/provider-tier-rule.shared.utils.d.ts.map +1 -1
  331. package/dist/esm/external-providers/provider-tier-rule.shared.utils.js.map +1 -1
  332. package/dist/esm/external-providers/provider-usage-cost.shared.d.ts.map +1 -1
  333. package/dist/esm/external-providers/provider-usage-cost.shared.js.map +1 -1
  334. package/dist/esm/external-providers/provider-usage-pricing.example.d.ts.map +1 -1
  335. package/dist/esm/external-providers/provider-usage-pricing.example.js.map +1 -1
  336. package/dist/esm/external-providers/provider-usage-pricing.shared.schemas.d.ts.map +1 -1
  337. package/dist/esm/external-providers/provider-usage-pricing.shared.schemas.js.map +1 -1
  338. package/dist/esm/features/application-features.shared.resources-config.schemas.d.ts.map +1 -1
  339. package/dist/esm/features/application-features.shared.resources-config.schemas.js.map +1 -1
  340. package/dist/esm/features/connected-feature.example.d.ts.map +1 -1
  341. package/dist/esm/features/connected-feature.example.js.map +1 -1
  342. package/dist/esm/features/core-feature-definitions.shared.d.ts.map +1 -1
  343. package/dist/esm/features/core-feature-definitions.shared.js.map +1 -1
  344. package/dist/esm/features/feature-builders.shared.d.ts.map +1 -1
  345. package/dist/esm/features/feature-builders.shared.js.map +1 -1
  346. package/dist/esm/features/feature-definition.shared.schemas.d.ts.map +1 -1
  347. package/dist/esm/features/feature-definition.shared.schemas.js.map +1 -1
  348. package/dist/esm/features/feature-registry.shared.d.ts.map +1 -1
  349. package/dist/esm/features/feature-registry.shared.js.map +1 -1
  350. package/dist/esm/features/feature-resolution.shared.schemas.d.ts.map +1 -1
  351. package/dist/esm/features/feature-resolution.shared.schemas.js.map +1 -1
  352. package/dist/esm/features/scope-features.shared.schemas.d.ts.map +1 -1
  353. package/dist/esm/features/scope-features.shared.schemas.js.map +1 -1
  354. package/dist/esm/features/user-features.shared.resources-config.schemas.d.ts.map +1 -1
  355. package/dist/esm/features/user-features.shared.resources-config.schemas.js.map +1 -1
  356. package/dist/esm/files/file-remote-reference-link.shared.schemas.d.ts.map +1 -1
  357. package/dist/esm/files/file-remote-reference-link.shared.schemas.js.map +1 -1
  358. package/dist/esm/files/file-upload-grant.shared.schemas.d.ts.map +1 -1
  359. package/dist/esm/files/file-upload-grant.shared.schemas.js.map +1 -1
  360. package/dist/esm/files/files.shared.resources-config.schemas.d.ts.map +1 -1
  361. package/dist/esm/files/files.shared.resources-config.schemas.js.map +1 -1
  362. package/dist/esm/files/files.shared.schemas.d.ts.map +1 -1
  363. package/dist/esm/files/files.shared.schemas.js.map +1 -1
  364. package/dist/esm/files/files.shared.utils.d.ts.map +1 -1
  365. package/dist/esm/files/files.shared.utils.js.map +1 -1
  366. package/dist/esm/flows-actors/a2a-push-delivery-log.shared.resources-config.schemas.d.ts.map +1 -1
  367. package/dist/esm/flows-actors/a2a-push-delivery-log.shared.resources-config.schemas.js.map +1 -1
  368. package/dist/esm/flows-actors/a2a-push-delivery-log.shared.schemas.d.ts.map +1 -1
  369. package/dist/esm/flows-actors/a2a-push-delivery-log.shared.schemas.js.map +1 -1
  370. package/dist/esm/flows-actors/a2a-token-budget-state.shared.resources-config.schemas.d.ts.map +1 -1
  371. package/dist/esm/flows-actors/a2a-token-budget-state.shared.resources-config.schemas.js.map +1 -1
  372. package/dist/esm/flows-actors/a2a-token-budget-state.shared.schemas.d.ts.map +1 -1
  373. package/dist/esm/flows-actors/a2a-token-budget-state.shared.schemas.js.map +1 -1
  374. package/dist/esm/flows-actors/actors.shared.schemas.d.ts.map +1 -1
  375. package/dist/esm/flows-actors/actors.shared.schemas.js.map +1 -1
  376. package/dist/esm/flows-actors/agent-traceability.shared.schemas.d.ts.map +1 -1
  377. package/dist/esm/flows-actors/agent-traceability.shared.schemas.js.map +1 -1
  378. package/dist/esm/flows-actors/agent-work-decisions.shared.resources-config.schemas.d.ts.map +1 -1
  379. package/dist/esm/flows-actors/agent-work-decisions.shared.resources-config.schemas.js.map +1 -1
  380. package/dist/esm/flows-actors/agent-work-decisions.shared.schemas.d.ts.map +1 -1
  381. package/dist/esm/flows-actors/agent-work-decisions.shared.schemas.js.map +1 -1
  382. package/dist/esm/flows-actors/agents.shared.schemas.d.ts.map +1 -1
  383. package/dist/esm/flows-actors/agents.shared.schemas.js.map +1 -1
  384. package/dist/esm/flows-actors/autonomous-agents.shared.schemas.d.ts.map +1 -1
  385. package/dist/esm/flows-actors/autonomous-agents.shared.schemas.js.map +1 -1
  386. package/dist/esm/flows-actors/deliberation.shared.schemas.d.ts +2 -1
  387. package/dist/esm/flows-actors/deliberation.shared.schemas.d.ts.map +1 -1
  388. package/dist/esm/flows-actors/deliberation.shared.schemas.js +2 -1
  389. package/dist/esm/flows-actors/deliberation.shared.schemas.js.map +1 -1
  390. package/dist/esm/flows-actors/execution-plan-readiness.shared.utils.d.ts.map +1 -1
  391. package/dist/esm/flows-actors/execution-plan-readiness.shared.utils.js.map +1 -1
  392. package/dist/esm/flows-actors/flows-actors-execution.shared.resources-config.schemas.d.ts.map +1 -1
  393. package/dist/esm/flows-actors/flows-actors-execution.shared.resources-config.schemas.js.map +1 -1
  394. package/dist/esm/flows-actors/flows-actors-execution.shared.schemas.d.ts.map +1 -1
  395. package/dist/esm/flows-actors/flows-actors-execution.shared.schemas.js.map +1 -1
  396. package/dist/esm/flows-actors/flows-actors-task.shared.resources-config.schemas.d.ts.map +1 -1
  397. package/dist/esm/flows-actors/flows-actors-task.shared.resources-config.schemas.js.map +1 -1
  398. package/dist/esm/flows-actors/flows-actors-task.shared.schemas.d.ts.map +1 -1
  399. package/dist/esm/flows-actors/flows-actors-task.shared.schemas.js.map +1 -1
  400. package/dist/esm/flows-actors/flows-actors.commons.shared.schemas.d.ts.map +1 -1
  401. package/dist/esm/flows-actors/flows-actors.commons.shared.schemas.js.map +1 -1
  402. package/dist/esm/flows-actors/flows-actors.configuration.shared.schemas.d.ts.map +1 -1
  403. package/dist/esm/flows-actors/flows-actors.configuration.shared.schemas.js.map +1 -1
  404. package/dist/esm/flows-actors/flows-actors.frontend.shared.schemas.d.ts.map +1 -1
  405. package/dist/esm/flows-actors/flows-actors.frontend.shared.schemas.js.map +1 -1
  406. package/dist/esm/flows-actors/flows-actors.io.shared.schemas.d.ts.map +1 -1
  407. package/dist/esm/flows-actors/flows-actors.io.shared.schemas.js.map +1 -1
  408. package/dist/esm/flows-actors/flows-actors.system.shared.definitions.d.ts.map +1 -1
  409. package/dist/esm/flows-actors/flows-actors.system.shared.definitions.js.map +1 -1
  410. package/dist/esm/flows-actors/flows-actors.system.shared.schemas.d.ts.map +1 -1
  411. package/dist/esm/flows-actors/flows-actors.system.shared.schemas.js.map +1 -1
  412. package/dist/esm/flows-actors/flows.shared.schemas.d.ts.map +1 -1
  413. package/dist/esm/flows-actors/flows.shared.schemas.js.map +1 -1
  414. package/dist/esm/flows-actors/human-decision.shared.schemas.d.ts.map +1 -1
  415. package/dist/esm/flows-actors/human-decision.shared.schemas.js.map +1 -1
  416. package/dist/esm/flows-actors/mcp-servers.shared.schemas.d.ts.map +1 -1
  417. package/dist/esm/flows-actors/mcp-servers.shared.schemas.js.map +1 -1
  418. package/dist/esm/flows-actors/model-call-attributions.shared.resources-config.schemas.d.ts.map +1 -1
  419. package/dist/esm/flows-actors/model-call-attributions.shared.resources-config.schemas.js.map +1 -1
  420. package/dist/esm/flows-actors/model-call-attributions.shared.schemas.d.ts.map +1 -1
  421. package/dist/esm/flows-actors/model-call-attributions.shared.schemas.js.map +1 -1
  422. package/dist/esm/flows-actors/model-cost-period-aggregates.shared.resources-config.schemas.d.ts.map +1 -1
  423. package/dist/esm/flows-actors/model-cost-period-aggregates.shared.resources-config.schemas.js.map +1 -1
  424. package/dist/esm/flows-actors/model-cost-period-aggregates.shared.schemas.d.ts.map +1 -1
  425. package/dist/esm/flows-actors/model-cost-period-aggregates.shared.schemas.js.map +1 -1
  426. package/dist/esm/flows-actors/model-cost-summary.shared.schemas.d.ts.map +1 -1
  427. package/dist/esm/flows-actors/model-cost-summary.shared.schemas.js.map +1 -1
  428. package/dist/esm/flows-actors/prompt-ir.shared.schemas.d.ts.map +1 -1
  429. package/dist/esm/flows-actors/prompt-ir.shared.schemas.js.map +1 -1
  430. package/dist/esm/flows-actors/provider-call-records.shared.resources-config.schemas.d.ts.map +1 -1
  431. package/dist/esm/flows-actors/provider-call-records.shared.resources-config.schemas.js.map +1 -1
  432. package/dist/esm/flows-actors/provider-call-records.shared.schemas.d.ts.map +1 -1
  433. package/dist/esm/flows-actors/provider-call-records.shared.schemas.js.map +1 -1
  434. package/dist/esm/flows-actors/review-deadlines.shared.schemas.d.ts.map +1 -1
  435. package/dist/esm/flows-actors/review-deadlines.shared.schemas.js.map +1 -1
  436. package/dist/esm/flows-actors/tasks.actors.shared.schemas.d.ts.map +1 -1
  437. package/dist/esm/flows-actors/tasks.actors.shared.schemas.js.map +1 -1
  438. package/dist/esm/flows-actors/work-attribution.shared.schemas.d.ts.map +1 -1
  439. package/dist/esm/flows-actors/work-attribution.shared.schemas.js.map +1 -1
  440. package/dist/esm/frontend-definitions/frontend-notification-custom-message-ref.definitions.d.ts.map +1 -1
  441. package/dist/esm/frontend-definitions/frontend-notification-custom-message-ref.definitions.js.map +1 -1
  442. package/dist/esm/frontend-definitions/settings-destination-ref.definitions.d.ts.map +1 -1
  443. package/dist/esm/frontend-definitions/settings-destination-ref.definitions.js.map +1 -1
  444. package/dist/esm/guidance/guidance-flow.shared.schemas.d.ts.map +1 -1
  445. package/dist/esm/guidance/guidance-flow.shared.schemas.js.map +1 -1
  446. package/dist/esm/guidance/guidance-state.shared.resources-config.schemas.d.ts.map +1 -1
  447. package/dist/esm/guidance/guidance-state.shared.resources-config.schemas.js.map +1 -1
  448. package/dist/esm/guidance/guidance-state.shared.schemas.d.ts.map +1 -1
  449. package/dist/esm/guidance/guidance-state.shared.schemas.js.map +1 -1
  450. package/dist/esm/guidance/guidance-state.shared.utils.d.ts.map +1 -1
  451. package/dist/esm/guidance/guidance-state.shared.utils.js.map +1 -1
  452. package/dist/esm/guidance/lifecycle-config.shared.schemas.d.ts +2 -2
  453. package/dist/esm/guidance/lifecycle-config.shared.schemas.d.ts.map +1 -1
  454. package/dist/esm/guidance/lifecycle-config.shared.schemas.js.map +1 -1
  455. package/dist/esm/guidance/lifecycle-state.shared.resources-config.schemas.d.ts.map +1 -1
  456. package/dist/esm/guidance/lifecycle-state.shared.resources-config.schemas.js.map +1 -1
  457. package/dist/esm/guidance/lifecycle-state.shared.schemas.d.ts.map +1 -1
  458. package/dist/esm/guidance/lifecycle-state.shared.schemas.js.map +1 -1
  459. package/dist/esm/guidance/milestone-builders.shared.d.ts.map +1 -1
  460. package/dist/esm/guidance/milestone-builders.shared.js.map +1 -1
  461. package/dist/esm/guidance/milestone-definition.shared.schemas.d.ts.map +1 -1
  462. package/dist/esm/guidance/milestone-definition.shared.schemas.js.map +1 -1
  463. package/dist/esm/guidance/progression-presentation.shared.schemas.d.ts.map +1 -1
  464. package/dist/esm/guidance/progression-presentation.shared.schemas.js.map +1 -1
  465. package/dist/esm/guidance/progression-state.shared.resources-config.schemas.d.ts.map +1 -1
  466. package/dist/esm/guidance/progression-state.shared.resources-config.schemas.js.map +1 -1
  467. package/dist/esm/guidance/progression-state.shared.schemas.d.ts.map +1 -1
  468. package/dist/esm/guidance/progression-state.shared.schemas.js.map +1 -1
  469. package/dist/esm/http-api-binding/http-api-binding-id.shared.utils.d.ts.map +1 -1
  470. package/dist/esm/http-api-binding/http-api-binding-id.shared.utils.js.map +1 -1
  471. package/dist/esm/http-api-binding/http-api-binding.shared.schemas.d.ts.map +1 -1
  472. package/dist/esm/http-api-binding/http-api-binding.shared.schemas.js.map +1 -1
  473. package/dist/esm/http-api-binding/http-api-erasure-stance.shared.d.ts.map +1 -1
  474. package/dist/esm/http-api-binding/http-api-erasure-stance.shared.js.map +1 -1
  475. package/dist/esm/http-api-binding/http-api-rest-write-operations.shared.schemas.d.ts.map +1 -1
  476. package/dist/esm/http-api-binding/http-api-rest-write-operations.shared.schemas.js.map +1 -1
  477. package/dist/esm/http-api-binding/http-api-transport-dialect.shared.d.ts.map +1 -1
  478. package/dist/esm/http-api-binding/http-api-transport-dialect.shared.js.map +1 -1
  479. package/dist/esm/http-api-binding/read-through-engine-anchors.shared.d.ts.map +1 -1
  480. package/dist/esm/http-api-binding/read-through-engine-anchors.shared.js.map +1 -1
  481. package/dist/esm/i18n/application-config-vocabulary.shared.d.ts.map +1 -1
  482. package/dist/esm/i18n/application-config-vocabulary.shared.js.map +1 -1
  483. package/dist/esm/i18n/engine-open-vocabulary-values.shared.d.ts.map +1 -1
  484. package/dist/esm/i18n/engine-open-vocabulary-values.shared.js.map +1 -1
  485. package/dist/esm/i18n/engine-open-vocabulary.shared.d.ts.map +1 -1
  486. package/dist/esm/i18n/engine-open-vocabulary.shared.js.map +1 -1
  487. package/dist/esm/i18n/interpolate-label-params.shared.utils.d.ts.map +1 -1
  488. package/dist/esm/i18n/interpolate-label-params.shared.utils.js.map +1 -1
  489. package/dist/esm/i18n/labelling.dto.shared.schemas.d.ts.map +1 -1
  490. package/dist/esm/i18n/labelling.dto.shared.schemas.js.map +1 -1
  491. package/dist/esm/inbound/conversation-threads.shared.resources-config.schemas.d.ts.map +1 -1
  492. package/dist/esm/inbound/conversation-threads.shared.resources-config.schemas.js.map +1 -1
  493. package/dist/esm/inbound/conversation-threads.shared.schemas.d.ts.map +1 -1
  494. package/dist/esm/inbound/conversation-threads.shared.schemas.js.map +1 -1
  495. package/dist/esm/inbound/inbound-channels.shared.schemas.d.ts.map +1 -1
  496. package/dist/esm/inbound/inbound-channels.shared.schemas.js.map +1 -1
  497. package/dist/esm/inbound/inbound-delivery.shared.resources-config.schemas.d.ts.map +1 -1
  498. package/dist/esm/inbound/inbound-delivery.shared.resources-config.schemas.js.map +1 -1
  499. package/dist/esm/inbound/inbound-delivery.shared.schemas.d.ts.map +1 -1
  500. package/dist/esm/inbound/inbound-delivery.shared.schemas.js.map +1 -1
  501. package/dist/esm/inbound/inbound-endpoint-env.shared.d.ts.map +1 -1
  502. package/dist/esm/inbound/inbound-endpoint-env.shared.js.map +1 -1
  503. package/dist/esm/index.d.ts +5 -0
  504. package/dist/esm/index.d.ts.map +1 -1
  505. package/dist/esm/index.js +5 -0
  506. package/dist/esm/index.js.map +1 -1
  507. package/dist/esm/meta-workflows/actions.meta-workflows.shared.schemas.d.ts.map +1 -1
  508. package/dist/esm/meta-workflows/actions.meta-workflows.shared.schemas.js.map +1 -1
  509. package/dist/esm/meta-workflows/catalog.meta-workflows.shared.schemas.d.ts.map +1 -1
  510. package/dist/esm/meta-workflows/catalog.meta-workflows.shared.schemas.js.map +1 -1
  511. package/dist/esm/meta-workflows/coding-tasks.meta-workflows.shared.schemas.d.ts.map +1 -1
  512. package/dist/esm/meta-workflows/coding-tasks.meta-workflows.shared.schemas.js.map +1 -1
  513. package/dist/esm/meta-workflows/context-selection.meta-workflows.shared.schemas.d.ts.map +1 -1
  514. package/dist/esm/meta-workflows/context-selection.meta-workflows.shared.schemas.js.map +1 -1
  515. package/dist/esm/meta-workflows/decisions.meta-workflows.shared.schemas.d.ts.map +1 -1
  516. package/dist/esm/meta-workflows/decisions.meta-workflows.shared.schemas.js.map +1 -1
  517. package/dist/esm/meta-workflows/elicitation-depth.meta-workflows.shared.schemas.d.ts +128 -0
  518. package/dist/esm/meta-workflows/elicitation-depth.meta-workflows.shared.schemas.d.ts.map +1 -0
  519. package/dist/esm/meta-workflows/elicitation-depth.meta-workflows.shared.schemas.js +136 -0
  520. package/dist/esm/meta-workflows/elicitation-depth.meta-workflows.shared.schemas.js.map +1 -0
  521. package/dist/esm/meta-workflows/orchestration.meta-workflows.shared.schemas.d.ts +45 -1
  522. package/dist/esm/meta-workflows/orchestration.meta-workflows.shared.schemas.d.ts.map +1 -1
  523. package/dist/esm/meta-workflows/orchestration.meta-workflows.shared.schemas.js +87 -2
  524. package/dist/esm/meta-workflows/orchestration.meta-workflows.shared.schemas.js.map +1 -1
  525. package/dist/esm/meta-workflows/portable-primitives.meta-workflows.shared.schemas.d.ts.map +1 -1
  526. package/dist/esm/meta-workflows/portable-primitives.meta-workflows.shared.schemas.js.map +1 -1
  527. package/dist/esm/meta-workflows.exports.d.ts +1 -0
  528. package/dist/esm/meta-workflows.exports.d.ts.map +1 -1
  529. package/dist/esm/meta-workflows.exports.js +1 -0
  530. package/dist/esm/meta-workflows.exports.js.map +1 -1
  531. package/dist/esm/monitoring/monitoring.shared.schemas.d.ts.map +1 -1
  532. package/dist/esm/monitoring/monitoring.shared.schemas.js.map +1 -1
  533. package/dist/esm/notifications/email/email-context.shared.schemas.d.ts.map +1 -1
  534. package/dist/esm/notifications/email/email-context.shared.schemas.js.map +1 -1
  535. package/dist/esm/notifications/email/email-submission.shared.enums.d.ts.map +1 -1
  536. package/dist/esm/notifications/email/email-submission.shared.enums.js.map +1 -1
  537. package/dist/esm/notifications/email/email-template-registry.shared.schemas.d.ts.map +1 -1
  538. package/dist/esm/notifications/email/email-template-registry.shared.schemas.js.map +1 -1
  539. package/dist/esm/notifications/email/email-template.shared.enums.d.ts.map +1 -1
  540. package/dist/esm/notifications/email/email-template.shared.enums.js.map +1 -1
  541. package/dist/esm/notifications/inbound-email/inbound-email.shared.resources-config.schemas.d.ts.map +1 -1
  542. package/dist/esm/notifications/inbound-email/inbound-email.shared.resources-config.schemas.js.map +1 -1
  543. package/dist/esm/notifications/inbound-email/inbound-email.shared.schemas.d.ts.map +1 -1
  544. package/dist/esm/notifications/inbound-email/inbound-email.shared.schemas.js.map +1 -1
  545. package/dist/esm/notifications/m2m/m2m-webhook-delivery-contract.shared.d.ts.map +1 -1
  546. package/dist/esm/notifications/m2m/m2m-webhook-delivery-contract.shared.js.map +1 -1
  547. package/dist/esm/notifications/m2m/m2m-webhook-delivery-log.shared.resources-config.schemas.d.ts.map +1 -1
  548. package/dist/esm/notifications/m2m/m2m-webhook-delivery-log.shared.resources-config.schemas.js.map +1 -1
  549. package/dist/esm/notifications/m2m/m2m-webhook-delivery-log.shared.schemas.d.ts.map +1 -1
  550. package/dist/esm/notifications/m2m/m2m-webhook-delivery-log.shared.schemas.js.map +1 -1
  551. package/dist/esm/notifications/m2m/webhook-config.shared.resources-config.schemas.d.ts.map +1 -1
  552. package/dist/esm/notifications/m2m/webhook-config.shared.resources-config.schemas.js.map +1 -1
  553. package/dist/esm/notifications/m2m/webhook-config.shared.schemas.d.ts.map +1 -1
  554. package/dist/esm/notifications/m2m/webhook-config.shared.schemas.js.map +1 -1
  555. package/dist/esm/notifications/notification-badges.core.definitions.d.ts.map +1 -1
  556. package/dist/esm/notifications/notification-badges.core.definitions.js.map +1 -1
  557. package/dist/esm/notifications/notification-badges.schemas.d.ts.map +1 -1
  558. package/dist/esm/notifications/notification-badges.schemas.js.map +1 -1
  559. package/dist/esm/notifications/notification-badges.shared.resources-config.schemas.d.ts.map +1 -1
  560. package/dist/esm/notifications/notification-badges.shared.resources-config.schemas.js.map +1 -1
  561. package/dist/esm/notifications/notifications.shared.schemas.d.ts +5 -3
  562. package/dist/esm/notifications/notifications.shared.schemas.d.ts.map +1 -1
  563. package/dist/esm/notifications/notifications.shared.schemas.js +5 -3
  564. package/dist/esm/notifications/notifications.shared.schemas.js.map +1 -1
  565. package/dist/esm/organizations/application-owner-organization.shared.schemas.d.ts.map +1 -1
  566. package/dist/esm/organizations/application-owner-organization.shared.schemas.js.map +1 -1
  567. package/dist/esm/organizations/organization-features.shared.resources-config.schemas.d.ts.map +1 -1
  568. package/dist/esm/organizations/organization-features.shared.resources-config.schemas.js.map +1 -1
  569. package/dist/esm/organizations/organization-features.shared.schemas.d.ts.map +1 -1
  570. package/dist/esm/organizations/organization-features.shared.schemas.js.map +1 -1
  571. package/dist/esm/organizations/organization-members.shared.resources-config.schemas.d.ts.map +1 -1
  572. package/dist/esm/organizations/organization-members.shared.resources-config.schemas.js.map +1 -1
  573. package/dist/esm/organizations/organization-members.shared.schemas.d.ts.map +1 -1
  574. package/dist/esm/organizations/organization-members.shared.schemas.js.map +1 -1
  575. package/dist/esm/organizations/organization-notifications.shared.resources-config.schemas.d.ts.map +1 -1
  576. package/dist/esm/organizations/organization-notifications.shared.resources-config.schemas.js.map +1 -1
  577. package/dist/esm/organizations/organization-notifications.shared.schemas.d.ts.map +1 -1
  578. package/dist/esm/organizations/organization-notifications.shared.schemas.js.map +1 -1
  579. package/dist/esm/organizations/organization-preferences.shared.resources-config.schemas.d.ts.map +1 -1
  580. package/dist/esm/organizations/organization-preferences.shared.resources-config.schemas.js.map +1 -1
  581. package/dist/esm/organizations/organization-preferences.shared.schemas.d.ts.map +1 -1
  582. package/dist/esm/organizations/organization-preferences.shared.schemas.js.map +1 -1
  583. package/dist/esm/organizations/organization-profile.shared.resources-config.schemas.d.ts.map +1 -1
  584. package/dist/esm/organizations/organization-profile.shared.resources-config.schemas.js.map +1 -1
  585. package/dist/esm/organizations/organization-profile.shared.schemas.d.ts.map +1 -1
  586. package/dist/esm/organizations/organization-profile.shared.schemas.js.map +1 -1
  587. package/dist/esm/organizations/organization-unit-inheritance.shared.d.ts.map +1 -1
  588. package/dist/esm/organizations/organization-unit-inheritance.shared.js.map +1 -1
  589. package/dist/esm/organizations/organization-unit-members.shared.resources-config.schemas.d.ts.map +1 -1
  590. package/dist/esm/organizations/organization-unit-members.shared.resources-config.schemas.js.map +1 -1
  591. package/dist/esm/organizations/organization-unit-members.shared.schemas.d.ts.map +1 -1
  592. package/dist/esm/organizations/organization-unit-members.shared.schemas.js.map +1 -1
  593. package/dist/esm/organizations/organization-unit-narrowing-decision.shared.d.ts.map +1 -1
  594. package/dist/esm/organizations/organization-unit-narrowing-decision.shared.js.map +1 -1
  595. package/dist/esm/organizations/organization-unit-narrowing.example.d.ts.map +1 -1
  596. package/dist/esm/organizations/organization-unit-narrowing.example.js.map +1 -1
  597. package/dist/esm/organizations/organization-unit-narrowing.shared.d.ts.map +1 -1
  598. package/dist/esm/organizations/organization-unit-narrowing.shared.js.map +1 -1
  599. package/dist/esm/organizations/organization-units.shared.path.d.ts.map +1 -1
  600. package/dist/esm/organizations/organization-units.shared.path.js.map +1 -1
  601. package/dist/esm/organizations/organization-units.shared.resources-config.schemas.d.ts.map +1 -1
  602. package/dist/esm/organizations/organization-units.shared.resources-config.schemas.js.map +1 -1
  603. package/dist/esm/organizations/organization-units.shared.schemas.d.ts.map +1 -1
  604. package/dist/esm/organizations/organization-units.shared.schemas.js.map +1 -1
  605. package/dist/esm/organizations/organizations.shared.resources-config.schemas.d.ts.map +1 -1
  606. package/dist/esm/organizations/organizations.shared.resources-config.schemas.js.map +1 -1
  607. package/dist/esm/organizations/organizations.shared.schemas.d.ts.map +1 -1
  608. package/dist/esm/organizations/organizations.shared.schemas.js.map +1 -1
  609. package/dist/esm/organizations/service-provider-activity-feed.shared.resources-config.schemas.d.ts.map +1 -1
  610. package/dist/esm/organizations/service-provider-activity-feed.shared.resources-config.schemas.js.map +1 -1
  611. package/dist/esm/organizations/service-provider-activity-feed.shared.schemas.d.ts.map +1 -1
  612. package/dist/esm/organizations/service-provider-activity-feed.shared.schemas.js.map +1 -1
  613. package/dist/esm/organizations/service-provider-capability-grants.shared.resources-config.schemas.d.ts.map +1 -1
  614. package/dist/esm/organizations/service-provider-capability-grants.shared.resources-config.schemas.js.map +1 -1
  615. package/dist/esm/organizations/service-provider-capability-grants.shared.schemas.d.ts.map +1 -1
  616. package/dist/esm/organizations/service-provider-capability-grants.shared.schemas.js.map +1 -1
  617. package/dist/esm/organizations/service-provider-client-controls.shared.schemas.d.ts.map +1 -1
  618. package/dist/esm/organizations/service-provider-client-controls.shared.schemas.js.map +1 -1
  619. package/dist/esm/organizations/service-provider-relationships.shared.resources-config.schemas.d.ts.map +1 -1
  620. package/dist/esm/organizations/service-provider-relationships.shared.resources-config.schemas.js.map +1 -1
  621. package/dist/esm/organizations/service-provider-relationships.shared.schemas.d.ts.map +1 -1
  622. package/dist/esm/organizations/service-provider-relationships.shared.schemas.js.map +1 -1
  623. package/dist/esm/organizations/tenant-teardown-config.shared.schemas.d.ts.map +1 -1
  624. package/dist/esm/organizations/tenant-teardown-config.shared.schemas.js.map +1 -1
  625. package/dist/esm/provider-registration-runtime.exports.d.ts.map +1 -1
  626. package/dist/esm/provider-registration-runtime.exports.js.map +1 -1
  627. package/dist/esm/public-runtime/index.d.ts +13 -0
  628. package/dist/esm/public-runtime/index.d.ts.map +1 -1
  629. package/dist/esm/public-runtime/index.js +13 -0
  630. package/dist/esm/public-runtime/index.js.map +1 -1
  631. package/dist/esm/queue/jobs.shared.resources-config.schemas.d.ts.map +1 -1
  632. package/dist/esm/queue/jobs.shared.resources-config.schemas.js.map +1 -1
  633. package/dist/esm/queue/jobs.shared.schemas.d.ts +71 -2
  634. package/dist/esm/queue/jobs.shared.schemas.d.ts.map +1 -1
  635. package/dist/esm/queue/jobs.shared.schemas.js +85 -2
  636. package/dist/esm/queue/jobs.shared.schemas.js.map +1 -1
  637. package/dist/esm/queue/jobs.shared.utils.d.ts.map +1 -1
  638. package/dist/esm/queue/jobs.shared.utils.js.map +1 -1
  639. package/dist/esm/queue/queues.shared.schemas.d.ts.map +1 -1
  640. package/dist/esm/queue/queues.shared.schemas.js.map +1 -1
  641. package/dist/esm/queue/queues.shared.utils.d.ts.map +1 -1
  642. package/dist/esm/queue/queues.shared.utils.js.map +1 -1
  643. package/dist/esm/queue/rabbitmq-queue-args.shared.d.ts.map +1 -1
  644. package/dist/esm/queue/rabbitmq-queue-args.shared.js.map +1 -1
  645. package/dist/esm/rag/rag-retrieval-health.shared.d.ts.map +1 -1
  646. package/dist/esm/rag/rag-retrieval-health.shared.js.map +1 -1
  647. package/dist/esm/requests/header-keys.shared.d.ts.map +1 -1
  648. package/dist/esm/requests/header-keys.shared.js.map +1 -1
  649. package/dist/esm/requests/http-requests.shared.d.ts.map +1 -1
  650. package/dist/esm/requests/http-requests.shared.js.map +1 -1
  651. package/dist/esm/requests/idempotency-key.shared.d.ts.map +1 -1
  652. package/dist/esm/requests/idempotency-key.shared.js.map +1 -1
  653. package/dist/esm/requests/manual-controllers-routes-documentation.d.ts.map +1 -1
  654. package/dist/esm/requests/manual-controllers-routes-documentation.js.map +1 -1
  655. package/dist/esm/requests/manual-controllers-routes-urls.d.ts.map +1 -1
  656. package/dist/esm/requests/manual-controllers-routes-urls.js.map +1 -1
  657. package/dist/esm/requests/rate-limits.shared.schemas.d.ts.map +1 -1
  658. package/dist/esm/requests/rate-limits.shared.schemas.js.map +1 -1
  659. package/dist/esm/requests/websocket.shared.schemas.d.ts +2 -2
  660. package/dist/esm/requests/websocket.shared.schemas.d.ts.map +1 -1
  661. package/dist/esm/requests/websocket.shared.schemas.js.map +1 -1
  662. package/dist/esm/resources/child-operations.shared.schemas.d.ts.map +1 -1
  663. package/dist/esm/resources/child-operations.shared.schemas.js.map +1 -1
  664. package/dist/esm/resources/collection-query-parameters.shared.d.ts.map +1 -1
  665. package/dist/esm/resources/collection-query-parameters.shared.js.map +1 -1
  666. package/dist/esm/resources/context-policy.shared.schemas.d.ts.map +1 -1
  667. package/dist/esm/resources/context-policy.shared.schemas.js.map +1 -1
  668. package/dist/esm/resources/embedded-resource-mark.shared.utils.d.ts.map +1 -1
  669. package/dist/esm/resources/embedded-resource-mark.shared.utils.js.map +1 -1
  670. package/dist/esm/resources/relationship-display.shared.schemas.d.ts.map +1 -1
  671. package/dist/esm/resources/relationship-display.shared.schemas.js.map +1 -1
  672. package/dist/esm/resources/resource-status-lifecycle.example.d.ts +100 -0
  673. package/dist/esm/resources/resource-status-lifecycle.example.d.ts.map +1 -0
  674. package/dist/esm/resources/resource-status-lifecycle.example.js +156 -0
  675. package/dist/esm/resources/resource-status-lifecycle.example.js.map +1 -0
  676. package/dist/esm/resources/resources-config.shared.factory.d.ts +25 -1
  677. package/dist/esm/resources/resources-config.shared.factory.d.ts.map +1 -1
  678. package/dist/esm/resources/resources-config.shared.factory.js +31 -8
  679. package/dist/esm/resources/resources-config.shared.factory.js.map +1 -1
  680. package/dist/esm/resources/resources-config.shared.schemas.d.ts +33 -0
  681. package/dist/esm/resources/resources-config.shared.schemas.d.ts.map +1 -1
  682. package/dist/esm/resources/resources-config.shared.schemas.js.map +1 -1
  683. package/dist/esm/resources/resources-registry.shared.core.definitions.d.ts.map +1 -1
  684. package/dist/esm/resources/resources-registry.shared.core.definitions.js.map +1 -1
  685. package/dist/esm/resources/resources-relationships.shared.factory.d.ts.map +1 -1
  686. package/dist/esm/resources/resources-relationships.shared.factory.js.map +1 -1
  687. package/dist/esm/resources/resources-serialization.shared.schemas.d.ts.map +1 -1
  688. package/dist/esm/resources/resources-serialization.shared.schemas.js.map +1 -1
  689. package/dist/esm/resources/resources.shared.core.definitions.d.ts.map +1 -1
  690. package/dist/esm/resources/resources.shared.core.definitions.js.map +1 -1
  691. package/dist/esm/resources/resources.shared.schemas.d.ts.map +1 -1
  692. package/dist/esm/resources/resources.shared.schemas.js.map +1 -1
  693. package/dist/esm/resources/resources.shared.utils.d.ts.map +1 -1
  694. package/dist/esm/resources/resources.shared.utils.js.map +1 -1
  695. package/dist/esm/resources/utils/collection-export.shared.utils.d.ts.map +1 -1
  696. package/dist/esm/resources/utils/collection-export.shared.utils.js.map +1 -1
  697. package/dist/esm/resources/utils/composition-cascade-deletability.validation.d.ts.map +1 -1
  698. package/dist/esm/resources/utils/composition-cascade-deletability.validation.js.map +1 -1
  699. package/dist/esm/resources/utils/composition-seedability.validation.d.ts.map +1 -1
  700. package/dist/esm/resources/utils/composition-seedability.validation.js.map +1 -1
  701. package/dist/esm/resources/utils/context-addressed-composition-singleton.shared.utils.d.ts.map +1 -1
  702. package/dist/esm/resources/utils/context-addressed-composition-singleton.shared.utils.js.map +1 -1
  703. package/dist/esm/resources/utils/dependent-lifecycle-classification.validation.d.ts.map +1 -1
  704. package/dist/esm/resources/utils/dependent-lifecycle-classification.validation.js.map +1 -1
  705. package/dist/esm/resources/utils/duplicate-relationship-registration.validation.d.ts.map +1 -1
  706. package/dist/esm/resources/utils/duplicate-relationship-registration.validation.js.map +1 -1
  707. package/dist/esm/resources/utils/field-value-disclosure.utils.d.ts.map +1 -1
  708. package/dist/esm/resources/utils/field-value-disclosure.utils.js.map +1 -1
  709. package/dist/esm/resources/utils/http-api-write-declaration.shared.utils.d.ts.map +1 -1
  710. package/dist/esm/resources/utils/http-api-write-declaration.shared.utils.js.map +1 -1
  711. package/dist/esm/resources/utils/initiator-stamped-field-satisfiability.validation.d.ts.map +1 -1
  712. package/dist/esm/resources/utils/initiator-stamped-field-satisfiability.validation.js.map +1 -1
  713. package/dist/esm/resources/utils/no-subject-data-stance-coherence.shared.utils.d.ts.map +1 -1
  714. package/dist/esm/resources/utils/no-subject-data-stance-coherence.shared.utils.js.map +1 -1
  715. package/dist/esm/resources/utils/persistence-adapter-discrimination.shared.utils.d.ts.map +1 -1
  716. package/dist/esm/resources/utils/persistence-adapter-discrimination.shared.utils.js.map +1 -1
  717. package/dist/esm/resources/utils/populated-file-fields.shared.utils.d.ts.map +1 -1
  718. package/dist/esm/resources/utils/populated-file-fields.shared.utils.js.map +1 -1
  719. package/dist/esm/resources/utils/repository-dto-builder.utils.d.ts.map +1 -1
  720. package/dist/esm/resources/utils/repository-dto-builder.utils.js.map +1 -1
  721. package/dist/esm/resources/utils/request-schema-field-carriage.shared.utils.d.ts.map +1 -1
  722. package/dist/esm/resources/utils/request-schema-field-carriage.shared.utils.js.map +1 -1
  723. package/dist/esm/resources/utils/required-fk-fillability.validation.d.ts.map +1 -1
  724. package/dist/esm/resources/utils/required-fk-fillability.validation.js.map +1 -1
  725. package/dist/esm/resources/utils/resource-operation-type-guards.utils.d.ts.map +1 -1
  726. package/dist/esm/resources/utils/resource-operation-type-guards.utils.js.map +1 -1
  727. package/dist/esm/resources/utils/resource-polymorphism.factory.d.ts.map +1 -1
  728. package/dist/esm/resources/utils/resource-polymorphism.factory.js.map +1 -1
  729. package/dist/esm/resources/utils/resource-polymorphism.relationships.d.ts.map +1 -1
  730. package/dist/esm/resources/utils/resource-polymorphism.relationships.js.map +1 -1
  731. package/dist/esm/resources/utils/resource-polymorphism.schemas.d.ts.map +1 -1
  732. package/dist/esm/resources/utils/resource-polymorphism.schemas.js.map +1 -1
  733. package/dist/esm/resources/utils/resource-polymorphism.utils.d.ts.map +1 -1
  734. package/dist/esm/resources/utils/resource-polymorphism.utils.js.map +1 -1
  735. package/dist/esm/resources/utils/resource-subtree.utils.d.ts.map +1 -1
  736. package/dist/esm/resources/utils/resource-subtree.utils.js.map +1 -1
  737. package/dist/esm/resources/utils/resources-config-context-needs.utils.d.ts.map +1 -1
  738. package/dist/esm/resources/utils/resources-config-context-needs.utils.js.map +1 -1
  739. package/dist/esm/resources/utils/resources-config-naming.utils.d.ts.map +1 -1
  740. package/dist/esm/resources/utils/resources-config-naming.utils.js.map +1 -1
  741. package/dist/esm/resources/utils/resources-config-operations.dtos-builder.utils.d.ts +25 -0
  742. package/dist/esm/resources/utils/resources-config-operations.dtos-builder.utils.d.ts.map +1 -1
  743. package/dist/esm/resources/utils/resources-config-operations.dtos-builder.utils.js +47 -19
  744. package/dist/esm/resources/utils/resources-config-operations.dtos-builder.utils.js.map +1 -1
  745. package/dist/esm/resources/utils/resources-config-operations.path.utils.d.ts.map +1 -1
  746. package/dist/esm/resources/utils/resources-config-operations.path.utils.js.map +1 -1
  747. package/dist/esm/resources/utils/resources-config-operations.urls-builder.utils.d.ts.map +1 -1
  748. package/dist/esm/resources/utils/resources-config-operations.urls-builder.utils.js.map +1 -1
  749. package/dist/esm/resources/utils/resources-config-operations.utils.d.ts.map +1 -1
  750. package/dist/esm/resources/utils/resources-config-operations.utils.js.map +1 -1
  751. package/dist/esm/resources/utils/resources-serialization.utils.d.ts.map +1 -1
  752. package/dist/esm/resources/utils/resources-serialization.utils.js.map +1 -1
  753. package/dist/esm/resources/utils/resources-summary.utils.d.ts.map +1 -1
  754. package/dist/esm/resources/utils/resources-summary.utils.js.map +1 -1
  755. package/dist/esm/resources/utils/schema-family-builder.utils.d.ts.map +1 -1
  756. package/dist/esm/resources/utils/schema-family-builder.utils.js.map +1 -1
  757. package/dist/esm/resources/utils/schema-type-inference.utils.d.ts.map +1 -1
  758. package/dist/esm/resources/utils/schema-type-inference.utils.js.map +1 -1
  759. package/dist/esm/resources/utils/schema-type-utils.d.ts.map +1 -1
  760. package/dist/esm/resources/utils/schema-type-utils.js.map +1 -1
  761. package/dist/esm/resources/utils/schema-variant-resolver.utils.d.ts.map +1 -1
  762. package/dist/esm/resources/utils/schema-variant-resolver.utils.js.map +1 -1
  763. package/dist/esm/resources/utils/shared-persistence-collection.utils.d.ts.map +1 -1
  764. package/dist/esm/resources/utils/shared-persistence-collection.utils.js.map +1 -1
  765. package/dist/esm/resources/utils/templatable-file-fields.shared.utils.d.ts.map +1 -1
  766. package/dist/esm/resources/utils/templatable-file-fields.shared.utils.js.map +1 -1
  767. package/dist/esm/resources/work-unit.shared.schemas.d.ts.map +1 -1
  768. package/dist/esm/resources/work-unit.shared.schemas.js.map +1 -1
  769. package/dist/esm/runtime/domain-module.shared.definitions.d.ts.map +1 -1
  770. package/dist/esm/runtime/domain-module.shared.definitions.js.map +1 -1
  771. package/dist/esm/runtime/execution-context.shared.schemas.d.ts.map +1 -1
  772. package/dist/esm/runtime/execution-context.shared.schemas.js.map +1 -1
  773. package/dist/esm/runtime/runtime.shared.schemas.d.ts.map +1 -1
  774. package/dist/esm/runtime/runtime.shared.schemas.js.map +1 -1
  775. package/dist/esm/security/api-keys/api-keys-application.shared.resources-config.schemas.d.ts.map +1 -1
  776. package/dist/esm/security/api-keys/api-keys-application.shared.resources-config.schemas.js.map +1 -1
  777. package/dist/esm/security/api-keys/api-keys-organization.shared.resources-config.schemas.d.ts.map +1 -1
  778. package/dist/esm/security/api-keys/api-keys-organization.shared.resources-config.schemas.js.map +1 -1
  779. package/dist/esm/security/api-keys/api-keys.shared.schemas.d.ts.map +1 -1
  780. package/dist/esm/security/api-keys/api-keys.shared.schemas.js.map +1 -1
  781. package/dist/esm/security/authentications/anonymous-session/anonymous-session.shared.contract.d.ts.map +1 -1
  782. package/dist/esm/security/authentications/anonymous-session/anonymous-session.shared.contract.js.map +1 -1
  783. package/dist/esm/security/authentications/authentication.shared.dto.schemas.d.ts.map +1 -1
  784. package/dist/esm/security/authentications/authentication.shared.dto.schemas.js.map +1 -1
  785. package/dist/esm/security/authentications/authentication.shared.schemas.d.ts.map +1 -1
  786. package/dist/esm/security/authentications/authentication.shared.schemas.js.map +1 -1
  787. package/dist/esm/security/authentications/authentication.shared.utils.d.ts.map +1 -1
  788. package/dist/esm/security/authentications/authentication.shared.utils.js.map +1 -1
  789. package/dist/esm/security/authentications/consumable-token.shared.schemas.d.ts.map +1 -1
  790. package/dist/esm/security/authentications/consumable-token.shared.schemas.js.map +1 -1
  791. package/dist/esm/security/authentications/cross-frontend-handoff.shared.dto.schemas.d.ts.map +1 -1
  792. package/dist/esm/security/authentications/cross-frontend-handoff.shared.dto.schemas.js.map +1 -1
  793. package/dist/esm/security/authentications/mfa-backup-code-contract.shared.d.ts.map +1 -1
  794. package/dist/esm/security/authentications/mfa-backup-code-contract.shared.js.map +1 -1
  795. package/dist/esm/security/authentications/password-blocklist.shared.utils.d.ts.map +1 -1
  796. package/dist/esm/security/authentications/password-blocklist.shared.utils.js.map +1 -1
  797. package/dist/esm/security/authentications/password-reset.shared.dto.schemas.d.ts.map +1 -1
  798. package/dist/esm/security/authentications/password-reset.shared.dto.schemas.js.map +1 -1
  799. package/dist/esm/security/authentications/registration.shared.dto.schemas.d.ts.map +1 -1
  800. package/dist/esm/security/authentications/registration.shared.dto.schemas.js.map +1 -1
  801. package/dist/esm/security/authentications/same-origin-redirect-path.shared.d.ts.map +1 -1
  802. package/dist/esm/security/authentications/same-origin-redirect-path.shared.js.map +1 -1
  803. package/dist/esm/security/authentications/scim/scim-organization-unit-mapping.shared.d.ts.map +1 -1
  804. package/dist/esm/security/authentications/scim/scim-organization-unit-mapping.shared.js.map +1 -1
  805. package/dist/esm/security/authentications/scim/scim-provisioning-config.shared.resources-config.schemas.d.ts.map +1 -1
  806. package/dist/esm/security/authentications/scim/scim-provisioning-config.shared.resources-config.schemas.js.map +1 -1
  807. package/dist/esm/security/authentications/scim/scim-provisioning-config.shared.schemas.d.ts.map +1 -1
  808. package/dist/esm/security/authentications/scim/scim-provisioning-config.shared.schemas.js.map +1 -1
  809. package/dist/esm/security/authentications/scim/scim-tokens.shared.resources-config.schemas.d.ts.map +1 -1
  810. package/dist/esm/security/authentications/scim/scim-tokens.shared.resources-config.schemas.js.map +1 -1
  811. package/dist/esm/security/authentications/scim/scim-tokens.shared.schemas.d.ts.map +1 -1
  812. package/dist/esm/security/authentications/scim/scim-tokens.shared.schemas.js.map +1 -1
  813. package/dist/esm/security/authentications/service-provider-client-authentication.shared.schemas.d.ts.map +1 -1
  814. package/dist/esm/security/authentications/service-provider-client-authentication.shared.schemas.js.map +1 -1
  815. package/dist/esm/security/authentications/siem/siem-delivery-dlq.shared.resources-config.schemas.d.ts.map +1 -1
  816. package/dist/esm/security/authentications/siem/siem-delivery-dlq.shared.resources-config.schemas.js.map +1 -1
  817. package/dist/esm/security/authentications/siem/siem-delivery-dlq.shared.schemas.d.ts.map +1 -1
  818. package/dist/esm/security/authentications/siem/siem-delivery-dlq.shared.schemas.js.map +1 -1
  819. package/dist/esm/security/authentications/siem/siem-delivery-outbox.shared.resources-config.schemas.d.ts.map +1 -1
  820. package/dist/esm/security/authentications/siem/siem-delivery-outbox.shared.resources-config.schemas.js.map +1 -1
  821. package/dist/esm/security/authentications/siem/siem-delivery-outbox.shared.schemas.d.ts.map +1 -1
  822. package/dist/esm/security/authentications/siem/siem-delivery-outbox.shared.schemas.js.map +1 -1
  823. package/dist/esm/security/authentications/siem/siem-delivery-reliability-contract.shared.d.ts.map +1 -1
  824. package/dist/esm/security/authentications/siem/siem-delivery-reliability-contract.shared.js.map +1 -1
  825. package/dist/esm/security/authentications/siem/siem-export-config.shared.resources-config.schemas.d.ts.map +1 -1
  826. package/dist/esm/security/authentications/siem/siem-export-config.shared.resources-config.schemas.js.map +1 -1
  827. package/dist/esm/security/authentications/siem/siem-export-config.shared.schemas.d.ts.map +1 -1
  828. package/dist/esm/security/authentications/siem/siem-export-config.shared.schemas.js.map +1 -1
  829. package/dist/esm/security/authentications/sso/sso-config.shared.resources-config.schemas.d.ts.map +1 -1
  830. package/dist/esm/security/authentications/sso/sso-config.shared.resources-config.schemas.js.map +1 -1
  831. package/dist/esm/security/authentications/sso/sso-config.shared.schemas.d.ts.map +1 -1
  832. package/dist/esm/security/authentications/sso/sso-config.shared.schemas.js.map +1 -1
  833. package/dist/esm/security/authentications/sso/sso-connection.shared.resources-config.schemas.d.ts.map +1 -1
  834. package/dist/esm/security/authentications/sso/sso-connection.shared.resources-config.schemas.js.map +1 -1
  835. package/dist/esm/security/authentications/sso/sso-connection.shared.schemas.d.ts.map +1 -1
  836. package/dist/esm/security/authentications/sso/sso-connection.shared.schemas.js.map +1 -1
  837. package/dist/esm/security/authorizations/administrative-continuity.shared.schemas.d.ts.map +1 -1
  838. package/dist/esm/security/authorizations/administrative-continuity.shared.schemas.js.map +1 -1
  839. package/dist/esm/security/authorizations/application-access-grants.shared.resources-config.schemas.d.ts.map +1 -1
  840. package/dist/esm/security/authorizations/application-access-grants.shared.resources-config.schemas.js.map +1 -1
  841. package/dist/esm/security/authorizations/application-access-grants.shared.schemas.d.ts.map +1 -1
  842. package/dist/esm/security/authorizations/application-access-grants.shared.schemas.js.map +1 -1
  843. package/dist/esm/security/authorizations/platform-access-grants.shared.resources-config.schemas.d.ts.map +1 -1
  844. package/dist/esm/security/authorizations/platform-access-grants.shared.resources-config.schemas.js.map +1 -1
  845. package/dist/esm/security/authorizations/platform-access-grants.shared.schemas.d.ts.map +1 -1
  846. package/dist/esm/security/authorizations/platform-access-grants.shared.schemas.js.map +1 -1
  847. package/dist/esm/security/authorizations/roles.application-roles.example.d.ts +37 -0
  848. package/dist/esm/security/authorizations/roles.application-roles.example.d.ts.map +1 -0
  849. package/dist/esm/security/authorizations/roles.application-roles.example.js +50 -0
  850. package/dist/esm/security/authorizations/roles.application-roles.example.js.map +1 -0
  851. package/dist/esm/security/authorizations/roles.shared.defaults.d.ts +13 -0
  852. package/dist/esm/security/authorizations/roles.shared.defaults.d.ts.map +1 -1
  853. package/dist/esm/security/authorizations/roles.shared.defaults.js +13 -0
  854. package/dist/esm/security/authorizations/roles.shared.defaults.js.map +1 -1
  855. package/dist/esm/security/authorizations/roles.shared.schemas.d.ts +29 -0
  856. package/dist/esm/security/authorizations/roles.shared.schemas.d.ts.map +1 -1
  857. package/dist/esm/security/authorizations/roles.shared.schemas.js +28 -0
  858. package/dist/esm/security/authorizations/roles.shared.schemas.js.map +1 -1
  859. package/dist/esm/security/authorizations/roles.shared.utils.d.ts.map +1 -1
  860. package/dist/esm/security/authorizations/roles.shared.utils.js.map +1 -1
  861. package/dist/esm/security/connected-accounts/provider-connection-listing.shared.schemas.d.ts.map +1 -1
  862. package/dist/esm/security/connected-accounts/provider-connection-listing.shared.schemas.js.map +1 -1
  863. package/dist/esm/security/connected-accounts/provider-credentials-organization.shared.resources-config.schemas.d.ts.map +1 -1
  864. package/dist/esm/security/connected-accounts/provider-credentials-organization.shared.resources-config.schemas.js.map +1 -1
  865. package/dist/esm/security/connected-accounts/provider-credentials-user.shared.resources-config.schemas.d.ts.map +1 -1
  866. package/dist/esm/security/connected-accounts/provider-credentials-user.shared.resources-config.schemas.js.map +1 -1
  867. package/dist/esm/security/connected-accounts/provider-credentials.shared.schemas.d.ts.map +1 -1
  868. package/dist/esm/security/connected-accounts/provider-credentials.shared.schemas.js.map +1 -1
  869. package/dist/esm/security/credential-rotation-grace.shared.utils.d.ts.map +1 -1
  870. package/dist/esm/security/credential-rotation-grace.shared.utils.js.map +1 -1
  871. package/dist/esm/security/crypto-keys/crypto-keys.shared.schemas.d.ts.map +1 -1
  872. package/dist/esm/security/crypto-keys/crypto-keys.shared.schemas.js.map +1 -1
  873. package/dist/esm/security/oauth-clients/oauth-clients-application.shared.resources-config.schemas.d.ts.map +1 -1
  874. package/dist/esm/security/oauth-clients/oauth-clients-application.shared.resources-config.schemas.js.map +1 -1
  875. package/dist/esm/security/oauth-clients/oauth-clients-organization.shared.resources-config.schemas.d.ts.map +1 -1
  876. package/dist/esm/security/oauth-clients/oauth-clients-organization.shared.resources-config.schemas.js.map +1 -1
  877. package/dist/esm/security/oauth-clients/oauth-clients.shared.schemas.d.ts.map +1 -1
  878. package/dist/esm/security/oauth-clients/oauth-clients.shared.schemas.js.map +1 -1
  879. package/dist/esm/security/oauth-clients/oauth-consent-grants.shared.resources-config.schemas.d.ts.map +1 -1
  880. package/dist/esm/security/oauth-clients/oauth-consent-grants.shared.resources-config.schemas.js.map +1 -1
  881. package/dist/esm/security/oauth-clients/oauth-consent-grants.shared.schemas.d.ts.map +1 -1
  882. package/dist/esm/security/oauth-clients/oauth-consent-grants.shared.schemas.js.map +1 -1
  883. package/dist/esm/security/oauth-clients/oauth-resource-server.shared.schemas.d.ts.map +1 -1
  884. package/dist/esm/security/oauth-clients/oauth-resource-server.shared.schemas.js.map +1 -1
  885. package/dist/esm/security/outbound-target-control.shared.schemas.d.ts.map +1 -1
  886. package/dist/esm/security/outbound-target-control.shared.schemas.js.map +1 -1
  887. package/dist/esm/security/submission-challenge/submission-challenge.shared.d.ts.map +1 -1
  888. package/dist/esm/security/submission-challenge/submission-challenge.shared.js.map +1 -1
  889. package/dist/esm/systems-of-record/system-of-record-actions.shared.schemas.d.ts.map +1 -1
  890. package/dist/esm/systems-of-record/system-of-record-actions.shared.schemas.js.map +1 -1
  891. package/dist/esm/systems-of-record/system-of-record-credential-kind.shared.d.ts.map +1 -1
  892. package/dist/esm/systems-of-record/system-of-record-credential-kind.shared.js.map +1 -1
  893. package/dist/esm/systems-of-record/system-of-record-declaration.shared.schemas.d.ts.map +1 -1
  894. package/dist/esm/systems-of-record/system-of-record-declaration.shared.schemas.js.map +1 -1
  895. package/dist/esm/systems-of-record/system-of-record-env.shared.d.ts.map +1 -1
  896. package/dist/esm/systems-of-record/system-of-record-env.shared.js.map +1 -1
  897. package/dist/esm/systems-of-record/system-of-record-error-codes.shared.d.ts.map +1 -1
  898. package/dist/esm/systems-of-record/system-of-record-error-codes.shared.js.map +1 -1
  899. package/dist/esm/systems-of-record/system-of-record-facet.shared.schemas.d.ts.map +1 -1
  900. package/dist/esm/systems-of-record/system-of-record-facet.shared.schemas.js.map +1 -1
  901. package/dist/esm/systems-of-record/system-of-record-partition-assignments.shared.resources-config.schemas.d.ts.map +1 -1
  902. package/dist/esm/systems-of-record/system-of-record-partition-assignments.shared.resources-config.schemas.js.map +1 -1
  903. package/dist/esm/systems-of-record/system-of-record-partition-assignments.shared.schemas.d.ts.map +1 -1
  904. package/dist/esm/systems-of-record/system-of-record-partition-assignments.shared.schemas.js.map +1 -1
  905. package/dist/esm/testing/resource-config-builders.d.ts.map +1 -1
  906. package/dist/esm/testing/resource-config-builders.js.map +1 -1
  907. package/dist/esm/testing.d.ts.map +1 -1
  908. package/dist/esm/testing.js.map +1 -1
  909. package/dist/esm/users/anonymous-user-marketing-metadata.shared.schemas.d.ts.map +1 -1
  910. package/dist/esm/users/anonymous-user-marketing-metadata.shared.schemas.js.map +1 -1
  911. package/dist/esm/users/anonymous-users.shared.resources-config.schemas.d.ts.map +1 -1
  912. package/dist/esm/users/anonymous-users.shared.resources-config.schemas.js.map +1 -1
  913. package/dist/esm/users/anonymous-users.shared.schema.d.ts.map +1 -1
  914. package/dist/esm/users/anonymous-users.shared.schema.js.map +1 -1
  915. package/dist/esm/users/inbound-contacts.shared.resources-config.schemas.d.ts.map +1 -1
  916. package/dist/esm/users/inbound-contacts.shared.resources-config.schemas.js +2 -0
  917. package/dist/esm/users/inbound-contacts.shared.resources-config.schemas.js.map +1 -1
  918. package/dist/esm/users/inbound-contacts.shared.schemas.d.ts.map +1 -1
  919. package/dist/esm/users/inbound-contacts.shared.schemas.js.map +1 -1
  920. package/dist/esm/users/user-consent-decision.shared.utils.d.ts.map +1 -1
  921. package/dist/esm/users/user-consent-decision.shared.utils.js.map +1 -1
  922. package/dist/esm/users/user-credentials.shared.resources-config.schemas.d.ts.map +1 -1
  923. package/dist/esm/users/user-credentials.shared.resources-config.schemas.js.map +1 -1
  924. package/dist/esm/users/user-credentials.shared.schemas.d.ts.map +1 -1
  925. package/dist/esm/users/user-credentials.shared.schemas.js.map +1 -1
  926. package/dist/esm/users/user-identity-links.shared.resources-config.schemas.d.ts.map +1 -1
  927. package/dist/esm/users/user-identity-links.shared.resources-config.schemas.js.map +1 -1
  928. package/dist/esm/users/user-identity-links.shared.schemas.d.ts.map +1 -1
  929. package/dist/esm/users/user-identity-links.shared.schemas.js.map +1 -1
  930. package/dist/esm/users/user-preferences-reset.shared.utils.d.ts.map +1 -1
  931. package/dist/esm/users/user-preferences-reset.shared.utils.js.map +1 -1
  932. package/dist/esm/users/user-preferences.shared.resources-config.schemas.d.ts.map +1 -1
  933. package/dist/esm/users/user-preferences.shared.resources-config.schemas.js.map +1 -1
  934. package/dist/esm/users/user-profiles.shared.resources-config.schemas.d.ts.map +1 -1
  935. package/dist/esm/users/user-profiles.shared.resources-config.schemas.js.map +1 -1
  936. package/dist/esm/users/user-self-preferences.shared.resources-config.schemas.d.ts.map +1 -1
  937. package/dist/esm/users/user-self-preferences.shared.resources-config.schemas.js.map +1 -1
  938. package/dist/esm/users/user-self-profiles.shared.resources-config.schemas.d.ts.map +1 -1
  939. package/dist/esm/users/user-self-profiles.shared.resources-config.schemas.js.map +1 -1
  940. package/dist/esm/users/user-self.shared.resources-config.schemas.d.ts.map +1 -1
  941. package/dist/esm/users/user-self.shared.resources-config.schemas.js.map +1 -1
  942. package/dist/esm/users/users.shared.resources-config.schemas.d.ts.map +1 -1
  943. package/dist/esm/users/users.shared.resources-config.schemas.js.map +1 -1
  944. package/dist/esm/users/users.shared.schemas.d.ts.map +1 -1
  945. package/dist/esm/users/users.shared.schemas.js.map +1 -1
  946. package/dist/tsconfig.build.tsbuildinfo +1 -1
  947. package/package.json +4 -4
  948. package/dist/esm/__tests__/setup.d.ts +0 -2
  949. package/dist/esm/__tests__/setup.d.ts.map +0 -1
  950. package/dist/esm/__tests__/setup.js +0 -19
  951. package/dist/esm/__tests__/setup.js.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"organization-members.shared.resources-config.schemas.js","sourceRoot":"","sources":["../../../../src/organizations/organization-members.shared.resources-config.schemas.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EACL,wBAAwB,EACxB,wBAAwB,GACzB,MAAM,uCAAuC,CAAC;AAC/C,OAAO,EAAE,qBAAqB,EAAE,MAAM,gDAAgD,CAAC;AACvF,OAAO,EAAE,0BAA0B,EAA8C,2BAA2B,EAAE,MAAM,uCAAuC,CAAC;AAC5J,OAAO,EAAE,gBAAgB,EAAE,kCAAkC,EAAE,MAAM,gDAAgD,CAAC;AACtH,OAAO,EAAE,4BAA4B,EAAE,MAAM,uCAAuC,CAAC;AACrF,OAAO,EAAE,0BAA0B,EAAE,2BAA2B,EAAE,MAAM,+CAA+C,CAAC;AAExH,OAAO,EAAE,0CAA0C,EAAE,MAAM,8CAA8C,CAAC;AAC1G,OAAO,EAAE,wBAAwB,EAAE,MAAM,8CAA8C,CAAC;AACxF,OAAO,EACL,wBAAwB,EACxB,+BAA+B,GAChC,MAAM,6DAA6D,CAAC;AAIrE,OAAO,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAExD,OAAO,EAAE,cAAc,EAAE,cAAc,EAAE,MAAM,iDAAiD,CAAC;AACjG,OAAO,EAAE,yBAAyB,EAAE,MAAM,qDAAqD,CAAC;AAChG,OAAO,EAAE,oBAAoB,EAAE,uBAAuB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BAA0B,CAAC,SAAS;oBAC5C,OAAO,EAAE,2BAA2B,CAAC,KAAK;oBAC1C,mBAAmB,EAAE,WAAW;oBAChC,SAAS,EAAE,qCAAqC;iBACjD;aACF;SACF;KACF;CACF,CAAC,CAAC","sourcesContent":["/**\n * Organization Members Shared Resource Configuration\n *\n * Resource configuration for organization member management.\n * Comprehensive member lifecycle and role management.\n */\n\nimport { z } from 'zod';\nimport {\n OrganizationMemberSchema,\n OrganizationMemberStatus,\n} from './organization-members.shared.schemas';\nimport { CoreResourceOperation } from '../resources/resources.shared.core.definitions';\nimport { ResourceOperationRiskLevel, ResourcePrimaryScope, ResourceRelationship, DefaultDeleteResponseSchema } from '../resources/resources.shared.schemas';\nimport { CoreResourceType, coreResourceShared_FieldIdentifier } from '../resources/resources.shared.core.definitions';\nimport { ResourceOperationVariantType } from '../resources/resources.shared.schemas';\nimport { CoreUserNotificationTarget, CoreUserNotificationChannel } from '../notifications/notifications.shared.schemas';\n\nimport { createResourceConfiguration_Initialization } from '../resources/resources-config.shared.factory';\nimport { ResourceSystemAccessMode } from '../resources/resources-config.shared.schemas';\nimport {\n CoreConsumableTokenTypes,\n ConsumableToken_ConsumptionMode,\n} from '../security/authentications/consumable-token.shared.schemas';\nimport type {\n TokenRevocationConfig,\n} from '../security/authentications/consumable-token.shared.schemas';\nimport { DurationUnit } from '@wildo-ai/zod-decorators';\n\nimport { CORE_APP_ROLES, CORE_ORG_ROLES } from '../security/authorizations/roles.shared.schemas';\nimport { DataPortabilityProvenance } from '../compliance/privacy/subject-export.shared.schemas';\nimport { ErasureRetentionMode, ResourceDataSubjectKind } from '../compliance/privacy/impersonalization.shared.schemas';\n\n// Custom operations enum for organization members.\n// NOTE: cross-organization member transfer is intentionally NOT a framework\n// capability — moving a member between organizations is a tenant-boundary\n// crossing the framework does not sanction. Re-invite the identity in the\n// target organization instead.\n//\n// A membership row IS the invitation (there is no separate invitation resource):\n// - CREATE = invite (creates an `INVITED` row + mints the accept token).\n// - REVOKE = inviter/admin cancels a still-`INVITED` membership.\n// - RESEND = re-mint + re-send the accept token for an `INVITED` membership.\n// - SUSPEND/REACTIVATE = lifecycle of an ACTIVE/SUSPENDED member.\n// Invitee-side accept/reject is the tokenized `/auth/acceptInvitation` flow\n// (auth controller + `Auth_Invitation` screen), NOT a resource operation.\n//\n// ROLE CHANGES ARE `UPDATE`, NOT A DEDICATED VERB. `PROMOTE` / `DEMOTE` were declared here\n// as `ORG_ADMIN`-gated `riskLevel: HIGH` operations taking `{ newRole, reason }`, and were\n// removed on 2026-08-01: they were ROUTED but never implemented, so the request fell through\n// to the generic core UPDATE, which persists only fields the resource schema declares.\n// `newRole` is not one, so every call answered **HTTP 200 having changed nothing** — and the\n// dangerous direction is DEMOTE: an admin demotes a compromised account, is told 200 OK, and\n// the account keeps its privileges. Re-declaring an explicit role-change verb is legitimate,\n// but only WITH a custom implementation that writes `roles` and calls\n// `assertRequestedRolesWithinCallerCeiling` — a custom implementation is addressed by an EXACT\n// operation path, so it does NOT inherit the UPDATE variant's ceiling gate. Follow the\n// organization-units MOVE/ARCHIVE pattern (a `prefixCoreOperations` hook returning the field\n// patch the core UPDATE persists). See\n// the 2026-08-01 routed-but-unimplemented operation sweep (#1275).\n//\n// GRANT_OWNERSHIP is the ONE exception to \"role changes are UPDATE\", and it exists for a reason\n// UPDATE structurally cannot serve: it is the only operation on this resource a caller who is NOT a\n// member of the organization may perform. See its config entry below.\nexport enum OrganizationMembers_Operations {\n SUSPEND = 'suspend',\n REACTIVATE = 'reactivate',\n REVOKE = 'revoke',\n RESEND = 'resend',\n GRANT_OWNERSHIP = 'grantOwnership',\n}\n\n/**\n * One semantic definition for invalidating an organization invitation.\n *\n * REVOKE attaches it declaratively, so HTTP and trusted service callers enter\n * the same transactional revocation pipeline. Ordinary DELETE is\n * intentionally excluded: it removes a non-INVITED membership, which has no\n * invitation token to revoke.\n */\nexport const ORGANIZATION_MEMBER_INVITATION_TOKEN_REVOCATION = {\n tokenTypes: [\n CoreConsumableTokenTypes.ORGANIZATION_MEMBER_INVITATION,\n ],\n relatedIdField: '_id',\n} satisfies TokenRevocationConfig;\n\n/**\n * One predicate owns both invitation-token generation and invitation-email\n * dispatch. Keeping the two declarative side effects on the same named gate\n * prevents the polymorphic CREATE operation from drifting: an ACTIVE direct\n * add must produce neither an accept token nor an invitation email.\n */\nconst isPendingOrganizationMemberInvitation = ({\n currentObject,\n}: {\n currentObject: Record<string, unknown>;\n}): boolean =>\n currentObject.status === OrganizationMemberStatus.INVITED;\n\n/**\n * REACTIVATE's notifications say the member \"can now access organization resources again\", which is true only when\n * the membership came back ACTIVE. A service-provider membership whose relationship has ended, or whose person is no\n * longer assigned, lands INACTIVE instead (#1597), and neither the person nor the organization's users may be told\n * otherwise. Evaluated against the row as written.\n */\nconst isRestoredToActiveMembership = ({\n currentObject,\n}: {\n currentObject: Record<string, unknown>;\n}): boolean =>\n currentObject.status === OrganizationMemberStatus.ACTIVE;\n\n/**\n * The recipient of a membership's own status notice: the member whose membership was suspended or\n * reactivated (#1870).\n *\n * `USERS_CUSTOM` rather than `USER_SELF`, and the difference is the whole defect: `USER_SELF` is the\n * INITIATOR — the administrator who pressed the button — so \"your membership was suspended\" landed in\n * the administrator's inbox, and the scheduled reactivation sweep, which has no initiator, told nobody.\n * `ORGANIZATION_USERS` cannot reach the member either: it keeps only ACTIVE memberships, and a suspended\n * member is not one. The row the operation just wrote carries the member's `userId`, so that is the\n * recipient. Same shape as the `users` account-status notices (#1807).\n */\nconst selectMembershipStatusSubject = ({ currentObject }: { currentObject: { userId?: unknown } | null | undefined }): string[] =>\n currentObject?.userId ? [String(currentObject.userId)] : [];\n\n/**\n * Sortable member fields.\n *\n * `role` and `joinedAt` were listed here and neither is a field (#1806): the membership carries\n * `roles`, an ARRAY — which has no meaningful sort order on either adapter, so it is not offered —\n * and it records when it was created, not a separate join instant. Both entries were passed to the\n * repository verbatim and silently ignored. The factory now refuses a sort field that is not a field.\n */\nconst ORGANIZATION_MEMBERS_SORT_FIELDS = ['status', 'createdAt'];\n\nconst ORGANIZATION_MEMBERS_FILTER_FIELDS = {\n status: z.enum(OrganizationMemberStatus),\n // `roles` is an array, and a scalar filter on it matches array MEMBERSHIP on both adapters: MongoDB\n // does so natively and the PostgreSQL filter compiler emits a jsonb containment (`roles @> '\"x\"'`).\n // It was declared as `role`, a field no row has, so `?role=ORG_ADMIN` matched nothing (#1806).\n roles: z.string().min(1).describe('Only return members holding this role.'),\n};\n\ntype OrganizationMembersCoreOperations =\n | CoreResourceOperation.READ\n | CoreResourceOperation.LIST\n | CoreResourceOperation.SEARCH\n | CoreResourceOperation.CREATE\n | CoreResourceOperation.UPDATE\n | CoreResourceOperation.DELETE\n | CoreResourceOperation.COUNT\n // Route-less; `retentionPolicy` requires READ + LIST + UPDATE_MANY.\n | CoreResourceOperation.UPDATE_MANY;\n\n/*\nOrganization Members Resource Configuration Factory\n*/\nexport const organizationMembersResourceConfiguration_InitializationFactory = (resourcesRelationships: ResourceRelationship[]) => createResourceConfiguration_Initialization<\n typeof OrganizationMembers_Operations,\n OrganizationMembersCoreOperations,\n typeof OrganizationMemberSchema\n>({\n mainSchema: OrganizationMemberSchema,\n resourceIdentifier: CoreResourceType.ORGANIZATION_MEMBERS,\n resourceFieldIdentifier: coreResourceShared_FieldIdentifier[CoreResourceType.ORGANIZATION_MEMBERS],\n resourceRelationships: resourcesRelationships,\n isSystemResource: true,\n\n // create: invitation-accept was the historical opt-in; now the org-admin INVITE, SSO/SCIM\n // JIT, and org-auto-create-on-registration all create members in-process with explicit\n // `userId` + `organizationId` FKs on a request-context-less EC (stripped by the\n // client-shaped CREATE DTO, re-attached by `createAsSystem`).\n // read/list: the invitee's own pending-invitation inbox reads INVITED rows cross-org\n // BEFORE the invitee is a scoped member — authorized by `userId`-ownership at the\n // entry point (`listMyPendingInvitations`/`loadOwnedPendingInvitation`), not org role.\n // update: invitation ACCEPTANCE flips INVITED → ACTIVE in-process; the invitee is not an\n // org admin, so the status flip goes through the trusted system path.\n systemAccessPolicy: {\n exportSubject: ResourceSystemAccessMode.ALLOWED,\n create: ResourceSystemAccessMode.ALLOWED,\n read: ResourceSystemAccessMode.ALLOWED,\n list: ResourceSystemAccessMode.ALLOWED,\n update: ResourceSystemAccessMode.ALLOWED,\n },\n\n /**\n * Subject-export disclosure. The subject's OWN membership rows (org, roles, title) — not other members' data.\n */\n portabilityPolicy: { defaultProvenance: DataPortabilityProvenance.OBSERVED },\n\n /**\n * Subject erasure RETAINS this row and scrubs the person's contact and professional details.\n *\n * The membership survives because it is the tenant's record of who belonged to it and under what\n * authority; what does not survive is `userEmail` and `userTitle`, the denormalized copies of the\n * person held here so a row can be read without resolving the user.\n *\n * `roles` is deliberately NOT scrubbed. It is this application's authorization vocabulary rather than\n * personal data — the field's own comment says so — and emptying it could leave a tenant with no\n * administrator, which the administrative-continuity floors would refuse, making an erasure fail closed\n * on a tenant. Keeping it means that interaction never arises.\n */\n retentionPolicy: {\n mode: ErasureRetentionMode.RETAIN_AND_IMPERSONALIZE,\n },\n\n /**\n * Erasing one of these rows revokes NO session. A membership is a record ABOUT a person's place in a\n * tenant, not the person — their session ends through the `USERS` row, which is `SELF_PRINCIPAL`.\n */\n dataSubjectPolicy: { kind: ResourceDataSubjectKind.NO_PRINCIPAL },\n\n coreOperations: [\n CoreResourceOperation.READ,\n CoreResourceOperation.LIST,\n CoreResourceOperation.SEARCH,\n CoreResourceOperation.CREATE,\n CoreResourceOperation.UPDATE,\n CoreResourceOperation.DELETE,\n CoreResourceOperation.COUNT,\n // Route-less; `retentionPolicy` requires READ + LIST + UPDATE_MANY.\n CoreResourceOperation.UPDATE_MANY,\n ],\n\n customOperation: OrganizationMembers_Operations,\n\n operationsConfiguration: {\n\n /*\n\n * Route-less retention plumbing — INTERNAL_CALL registers no route, so no API surface is added, and it\n\n * must not be REPOSITORY_ONLY: the retention primitives resolve through `getServiceOperationPathDefault`,\n\n * which matches only INTERNAL_CALL / API_CALL. LIST is LOW (a read-shaped op may not claim the\n\n * HIGH/CRITICAL band, which carries an audit-emission obligation); UPDATE_MANY is CRITICAL — it is the\n\n * verb the impersonalize writer uses to stamp the retention markers.\n\n */\n\n [CoreResourceOperation.UPDATE_MANY]: {\n\n variants: [{\n\n variantType: ResourceOperationVariantType.INTERNAL_CALL,\n\n isDefault: true,\n\n roles: [CORE_APP_ROLES.APP_ADMIN_SUPER_ADMIN],\n\n riskLevel: ResourceOperationRiskLevel.CRITICAL,\n\n }],\n\n },\n\n [CoreResourceOperation.COUNT]: {\n variants: [\n {\n variantType: ResourceOperationVariantType.API_CALL,\n isDefault: true,\n roles: [CORE_ORG_ROLES.ORG_MEMBER],\n riskLevel: ResourceOperationRiskLevel.LOW,\n }\n ]\n },\n\n // CREATE is POLYMORPHIC — two intents on one op:\n // • INVITE (BRANCH B): the org admin supplies `userEmail` (the strict identity\n // anchor); the CREATE prefix find-or-creates the `User` by it (`PENDING_INVITATION`\n // if new) and FORCES `status: INVITED`. A single-use accept token is minted AFTER the\n // row is created (relatedId = the membership `_id`, STABLE across `INVITED → ACTIVE`\n // so the emailed link never orphans); the pipeline injects it into the invite email and\n // the dispatcher builds the accept link (`emailLinkPath → /invitation?token=…`, consumed\n // by `/auth/acceptInvitation`). No `grantedRoles`: the accept handler reads the\n // membership's own `roles` when it flips the row to ACTIVE.\n // • DIRECT-ADD (BRANCH A): the caller supplies `userId` (founder org-owner grant,\n // SSO-JIT, SCIM) and the row persists `ACTIVE` — there is nothing to accept.\n // Token generation and notification dispatch share one named predicate.\n // The INVITE branch mints one accept token and sends one post-commit email;\n // the ACTIVE direct-add branch does neither.\n [CoreResourceOperation.CREATE]: {\n variants: [\n {\n variantType: ResourceOperationVariantType.API_CALL,\n isDefault: true,\n roles: [CORE_ORG_ROLES.ORG_ADMIN, CORE_ORG_ROLES.ORG_DELEGATED_INVITE_MEMBERS], // Org admins, or a firm's expert lent INVITE_MEMBERS (#1631)\n riskLevel: ResourceOperationRiskLevel.MEDIUM,\n // requestDto auto-derived from decorators (userEmail + roles +\n // organizationUnitsMembership + userTitle; userId/status/invitedByUserId/\n // invitedAt are server-injected via `.excludeFromCreate()`).\n tokenGeneration: {\n tokenType: CoreConsumableTokenTypes.ORGANIZATION_MEMBER_INVITATION,\n consumptionMode: ConsumableToken_ConsumptionMode.SINGLE_USE,\n expiresIn: { value: 7, unit: DurationUnit.DAYS },\n relatedIdField: '_id',\n emailLinkPath: '/invitation',\n // Mint the accept token for real invites only — never for an ACTIVE direct-add.\n condition: isPendingOrganizationMemberInvitation,\n },\n }\n ],\n // Deliver the invite email to the INVITEE (`userEmail`) via the\n // email-by-address path — the invitee may be a brand-new `PENDING_INVITATION`\n // user with no session. Carries the `acceptUrl` (`/invitation?token=…`) built\n // from the token minted above. `target: USER_SELF` is retained only so the\n // derived template ref stays `…create.user-self` and the accept link routes to\n // the main (non-admin) app.\n userNotifications: [\n {\n target: CoreUserNotificationTarget.USER_SELF,\n channel: CoreUserNotificationChannel.EMAIL,\n recipientEmailField: 'userEmail',\n condition: isPendingOrganizationMemberInvitation,\n }\n ]\n },\n\n [CoreResourceOperation.READ]: {\n variants: [\n {\n variantType: ResourceOperationVariantType.API_CALL,\n isDefault: true,\n roles: [CORE_ORG_ROLES.ORG_MEMBER], // Org members can read member info\n riskLevel: ResourceOperationRiskLevel.LOW,\n }\n ]\n },\n\n [CoreResourceOperation.LIST]: {\n variants: [\n {\n variantType: ResourceOperationVariantType.API_CALL,\n isDefault: true,\n roles: [CORE_ORG_ROLES.ORG_MEMBER], // Org members can list organization members\n riskLevel: ResourceOperationRiskLevel.LOW,\n }\n ]\n },\n\n [CoreResourceOperation.SEARCH]: {\n variants: [\n {\n variantType: ResourceOperationVariantType.API_CALL,\n isDefault: true,\n roles: [CORE_ORG_ROLES.ORG_MEMBER],\n riskLevel: ResourceOperationRiskLevel.LOW,\n isSearchable: true,\n // `userEmail` is a denormalized, immutable own-field (mirror of the linked\n // user's email, captured at membership creation). First/last name are NOT\n // denormalized onto the member row — they live on `USER_PROFILES` and are\n // mutable there — so they are searched RELATIONALLY: the framework runs a\n // secondary match on `USER_PROFILES` (its own searchable fields) and folds\n // the matching `userId`s into an `$in` on this row's `userId`. The member\n // query stays org-scoped, so this is tenant-safe; names are never stale\n // because they are read live from the profile at search time. See\n // SearchableRelationDescriptor in resources-config.shared.schemas.ts.\n searchableFields: [\n 'userEmail',\n {\n localField: 'userId',\n relatedResource: CoreResourceType.USER_PROFILES,\n relatedJoinField: 'userId',\n fields: ['firstName', 'lastName'],\n },\n ],\n searchableOptions: { caseSensitive: false, fullMatchOnly: false },\n filterFields: ORGANIZATION_MEMBERS_FILTER_FIELDS,\n sortFields: ORGANIZATION_MEMBERS_SORT_FIELDS,\n maxPaginatedResultPerPageLimit: 50,\n }\n ],\n },\n\n [CoreResourceOperation.UPDATE]: {\n variants: [\n {\n variantType: ResourceOperationVariantType.API_CALL,\n isDefault: true,\n roles: [CORE_ORG_ROLES.ORG_ADMIN], // Org admins can update member details\n riskLevel: ResourceOperationRiskLevel.MEDIUM,\n // requestDto auto-derived from decorators\n //\n // Ordinary UPDATE remains audited below the HIGH/CRITICAL floor: editing member details\n // is MEDIUM risk for the UI, but changing roles still requires privilege evidence.\n // The registered UPDATE implementation also emits ORGANIZATION_MEMBER_ROLE_CHANGED after\n // a durable role change, with previous, requested and resulting roles. That specialized\n // event complements the automatic operation event; it is not an unimplemented producer.\n //\n // GRANT_OWNERSHIP is a separate named role-change path. Its UPDATE-like core behavior does\n // not inherit UPDATE's custom hooks: registration resolves the exact operation identity.\n // Its CRITICAL risk triggers RESOURCE_OPERATION_PERFORMED automatically, with changed\n // role sets carried by the roles field's audit-evidence marker. Queries covering ownership\n // repair must include that operation family, not only the specialized role-change event.\n //\n // assurance-control: WILDO.ACCESS.PRIVILEGE_EVIDENCE — evidence of privilege grant/revocation.\n auditableEvent: { auditBelowRiskFloor: true },\n }\n ],\n userNotifications: [\n {\n target: CoreUserNotificationTarget.ORGANIZATION_USERS,\n channel: CoreUserNotificationChannel.EMAIL,\n }\n ]\n },\n\n [CoreResourceOperation.DELETE]: {\n variants: [\n {\n variantType: ResourceOperationVariantType.API_CALL,\n isDefault: true,\n roles: [CORE_ORG_ROLES.ORG_ADMIN, CORE_ORG_ROLES.ORG_DELEGATED_MANAGE_RELATIONSHIP_EXPERTS], // Org admins; a firm's expert lent MANAGE_RELATIONSHIP_EXPERTS, on its own relationship's experts only (#1631)\n riskLevel: ResourceOperationRiskLevel.HIGH,\n // Accepted/non-pending members use ordinary DELETE. A pending invite\n // is cancelled through REVOKE, which atomically revokes its accept\n // token. Keeping the vocabularies disjoint avoids making every\n // active-member removal token-coupled.\n enabledCondition: ({ currentObject }) =>\n currentObject.status !== OrganizationMemberStatus.INVITED,\n }\n ],\n userNotifications: [\n {\n target: CoreUserNotificationTarget.ORGANIZATION_USERS,\n channel: CoreUserNotificationChannel.EMAIL,\n }\n ]\n },\n\n /**\n * The higher-tier repair door for the organization-owner floor — the second half of the\n * industry pattern described in `.claude/rules/administrative-continuity-floors.md`.\n *\n * ## Why this cannot be UPDATE\n *\n * The floor refuses to let the last `ORG_OWNER` be removed, demoted or deactivated. That is the\n * correct tenant-tier answer, but on its own it converts every mistake that DID strand a tenant\n * — a direct database edit, a restore from a mid-erasure backup, an acknowledged erasure under\n * GDPR Art. 17, a seed that authored no owner — into a permanent lockout, because\n * `validateParentScopeAccess` denies a non-member on ORGANIZATIONS scope and there is no\n * `APP_ADMIN_SUPER_ADMIN` bypass. Both denials are pinned in\n * `cross-tenant-super-admin-reach.mongo.integration.test.ts`. So no tenant member can grant the\n * role (they would need the authority they just lost) and no platform administrator can reach\n * the row at all. GitHub solves this with an Enterprise owner one tier up; this is that tier.\n *\n * ## Why it is a distinct verb rather than a flag on UPDATE\n *\n * `admitsCrossTenantPlatformAdministration` relaxes the SCOPE check for the variant that carries\n * it. Putting it on generic UPDATE would open every field of every membership row in every\n * tenant to a cross-tenant caller. The whole safety argument is that the opened surface is\n * exactly one field with one direction, so it is authored as its own operation whose custom\n * implementation reads nothing from the payload but the justification — which it records, and\n * never persists onto the row.\n *\n * ## Deliberate narrowness\n *\n * - **Promotes an EXISTING member** (Microsoft Loop's rule). It cannot mint a membership, so it\n * never creates an identity inside a tenant nobody owns.\n * - **Additive only.** It adds the owner-conferring role; it cannot remove roles, so it can\n * never be used to demote and is not a second path through the floor.\n * - **`justification` is required**, not optional. This is a break-glass action against a tenant\n * the operator is not a member of; the audit row is worth nothing without the why. `AC-2(7)`\n * asks for privileged assignment to be monitored — the trail IS the control here, since by\n * construction no authorization check downstream can second-guess the caller. It lands on the\n * `ORGANIZATION_MEMBER_ROLE_CHANGED` row the grant emits post-commit (`eventData.justification`),\n * beside the before/after role sets. `RESOURCE_OPERATION_PERFORMED`, which this CRITICAL verb\n * also emits, carries no request payload and so cannot hold it. Until #593 it was validated here\n * and discarded at the service boundary.\n *\n * assurance-control: WILDO.ACCESS.ADMINISTRATIVE_CONTINUITY — restore administrability of a scope\n * that has no usable administrator.\n * assurance-control: WILDO.ACCESS.PRIVILEGE_EVIDENCE — evidence of privilege grant.\n */\n [OrganizationMembers_Operations.GRANT_OWNERSHIP]: {\n variants: [\n {\n variantType: ResourceOperationVariantType.API_CALL,\n isDefault: true,\n // Platform tier only. This is the role set the operation-roles gate checks INDEPENDENTLY\n // of the scope admission below: a caller holding this key at ORGANIZATIONS scope resolves\n // it against the organization role table, which does not contain it, and is denied there.\n roles: [CORE_APP_ROLES.APP_ADMIN_SUPER_ADMIN],\n riskLevel: ResourceOperationRiskLevel.CRITICAL,\n resourceOperationLike: CoreResourceOperation.UPDATE,\n // THE cross-tenant admission. Without it the operation is unreachable by the only\n // principal it exists for, because a platform administrator is by definition not a member\n // of the stranded tenant.\n admitsCrossTenantPlatformAdministration: true,\n requestDto: z.object({\n justification: z.string().min(1).max(1000).describe('Why a platform administrator is making this member an owner of an organization they do not belong to. Required, and recorded on the audit trail with the role change.'),\n }),\n // No `auditableEvent` declaration: CRITICAL is inside `AUTOMATIC_AUDIT_RISK_FLOOR`, so the\n // event emits on the risk level alone and `auditBelowRiskFloor` would be inert here. The\n // before/after role sets ride along because `roles` carries `.isAuditEvidence()` — which is\n // what makes the trail answer the question that matters about this door: WHO was made an\n // owner of a tenant, by a caller who was not in it.\n },\n ],\n userNotifications: [\n {\n // The tenant learns that its ownership changed from outside. An operator repairing a\n // stranded tenant is legitimate; an operator quietly granting themselves an ally inside a\n // customer's tenant is not, and the difference is only visible to the tenant if it is told.\n target: CoreUserNotificationTarget.ORGANIZATION_USERS,\n channel: CoreUserNotificationChannel.EMAIL,\n },\n ],\n },\n\n [OrganizationMembers_Operations.SUSPEND]: {\n variants: [\n {\n variantType: ResourceOperationVariantType.API_CALL,\n isDefault: true,\n roles: [CORE_ORG_ROLES.ORG_ADMIN, CORE_ORG_ROLES.ORG_DELEGATED_MANAGE_RELATIONSHIP_EXPERTS], // Org admins; a firm's expert lent MANAGE_RELATIONSHIP_EXPERTS, on its own relationship's experts only (#1631)\n riskLevel: ResourceOperationRiskLevel.CRITICAL,\n resourceOperationLike: CoreResourceOperation.UPDATE,\n requestDto: z.object({\n suspensionReason: z.string().min(1).max(500).describe('Why the member is suspended. Recorded on the audit trail, not on the membership.'),\n suspensionEndDate: z.date().optional().describe('When the suspension ends and the member is reactivated. Absent: suspended until someone reactivates them.'),\n }),\n // Implemented by the shared status-transition factory (ACTIVE → SUSPENDED, carrying\n // `suspensionEndDate` onto the row's `scheduledReactivationAt`). SUSPEND is legal only\n // from ACTIVE: an INVITED row has not accepted yet — cancel it with REVOKE, which also\n // revokes the accept token — and an INACTIVE one is already out.\n enabledCondition: ({ currentObject }) =>\n currentObject.status === OrganizationMemberStatus.ACTIVE,\n }\n ],\n userNotifications: [\n {\n // The suspended member. `alwaysDeliver`: a person who loses access to an organization has no\n // other way to learn why, whatever they chose for ordinary email notifications.\n target: CoreUserNotificationTarget.USERS_CUSTOM,\n channel: CoreUserNotificationChannel.EMAIL,\n userIdsSelector: selectMembershipStatusSubject,\n alwaysDeliver: true,\n },\n {\n target: CoreUserNotificationTarget.ORGANIZATION_USERS,\n channel: CoreUserNotificationChannel.EMAIL,\n }\n ]\n },\n\n [OrganizationMembers_Operations.REACTIVATE]: {\n variants: [\n {\n variantType: ResourceOperationVariantType.API_CALL,\n isDefault: true,\n // Org admins only. NOT opened to MANAGE_RELATIONSHIP_EXPERTS (#1631): a suspension is the client's bar against\n // one person, which the firm cannot lift (#1597) — a firm may suspend or remove its own expert, never undo the\n // client's suspension of them.\n roles: [CORE_ORG_ROLES.ORG_ADMIN],\n riskLevel: ResourceOperationRiskLevel.MEDIUM,\n resourceOperationLike: CoreResourceOperation.UPDATE,\n requestDto: z.object({\n reason: z.string().max(500).optional()\n .describe('Why the member is being reactivated. Recorded with the audit event for the reactivation.')\n }),\n // Implemented by the shared status-transition factory (SUSPENDED → ACTIVE, clearing any\n // pending `scheduledReactivationAt`). Legal only from SUSPENDED: reactivating an INVITED\n // row would skip acceptance and grant a membership nobody agreed to. A service-provider\n // membership lands INACTIVE instead when its relationship has ended or its person is no\n // longer assigned (#1597, `resolveProviderMembershipReactivationStatus`).\n enabledCondition: ({ currentObject }) =>\n currentObject.status === OrganizationMemberStatus.SUSPENDED,\n // MEDIUM sits below `AUTOMATIC_AUDIT_RISK_FLOOR`, so without this the RESTORE half of the\n // pair would go untrailed while SUSPEND (CRITICAL) is recorded — a trail showing every\n // suspension and none of the lifts, which reads as a member still suspended a year after\n // they were reinstated. The risk level answers \"how alarming is the affordance\"; this\n // answers \"is it evidence an auditor needs\", and for the inverse of a CRITICAL verb it is.\n // assurance-control: WILDO.ACCESS.PRIVILEGE_EVIDENCE\n auditableEvent: { auditBelowRiskFloor: true },\n }\n ],\n userNotifications: [\n {\n // The reactivated member — reached on the scheduled sweep too, which runs with no initiator.\n target: CoreUserNotificationTarget.USERS_CUSTOM,\n channel: CoreUserNotificationChannel.EMAIL,\n userIdsSelector: selectMembershipStatusSubject,\n alwaysDeliver: true,\n condition: isRestoredToActiveMembership,\n },\n {\n target: CoreUserNotificationTarget.ORGANIZATION_USERS,\n channel: CoreUserNotificationChannel.EMAIL,\n condition: isRestoredToActiveMembership,\n }\n ]\n },\n\n // REVOKE — inviter/admin cancels a still-`INVITED` membership. The exact\n // custom implementation DELETES the row and atomically revokes its accept\n // token. The paired PENDING_INVITATION user is retained here and reaped by\n // deferred hygiene only after it is old and still has no memberships:\n // point-operation cleanup cannot predicate-lock \"zero memberships\" against\n // a concurrent invitation insert under Mongo snapshot isolation. `reason`\n // is captured in the audit payload, not persisted on the deleted row.\n [OrganizationMembers_Operations.REVOKE]: {\n variants: [\n {\n variantType: ResourceOperationVariantType.API_CALL,\n isDefault: true,\n roles: [CORE_ORG_ROLES.ORG_ADMIN, CORE_ORG_ROLES.ORG_DELEGATED_INVITE_MEMBERS],\n riskLevel: ResourceOperationRiskLevel.MEDIUM,\n resourceOperationLike: CoreResourceOperation.DELETE,\n requestDto: z.object({\n reason: z.string().max(500).optional()\n .describe('Why the invitation is being revoked. Recorded with the audit event for the removal; it is not kept on the membership, which is deleted.')\n }),\n tokenRevocation:\n ORGANIZATION_MEMBER_INVITATION_TOKEN_REVOCATION,\n // REVOKE has an exact API custom registration; `resourceOperationLike`\n // selects DELETE persistence/DTO semantics but does not inherit the\n // core DELETE custom implementation. Its real return is the delete\n // envelope, declared explicitly so output validation matches runtime.\n customResponseDto: DefaultDeleteResponseSchema,\n // Only a still-pending invite can be revoked — an ACTIVE member is removed\n // via DELETE, not \"revoked\". Gates the roster action (paired with the preset's\n // `WHEN_AVAILABLE`, the button shows only on INVITED rows) AND fail-closes the\n // backend (`services-registry-handler` throws SERVICE_RESOURCE_OPERATION_DISABLED\n // → 403 if invoked on a non-INVITED row).\n enabledCondition: ({ currentObject }) => currentObject.status === OrganizationMemberStatus.INVITED,\n },\n ],\n // Two emails (distinct templates, disambiguated by `customNotificationRef`):\n // • the INVITEE (`recipientEmailField: 'userEmail'`) — \"your invitation was revoked\";\n // • the ADMIN/initiator (`USER_SELF`) — confirmation of the action.\n // Both USER_SELF+EMAIL, so each MUST carry a unique `customNotificationRef`.\n userNotifications: [\n {\n target: CoreUserNotificationTarget.USER_SELF,\n channel: CoreUserNotificationChannel.EMAIL,\n recipientEmailField: 'userEmail',\n customNotificationRef: 'invitee',\n },\n {\n target: CoreUserNotificationTarget.USER_SELF,\n channel: CoreUserNotificationChannel.EMAIL,\n customNotificationRef: 'admin',\n }\n ]\n },\n\n // RESEND — re-mint the accept token (revoking any prior one for this membership)\n // and re-send the invite email with the fresh accept link. Only valid while the\n // membership is `INVITED`.\n [OrganizationMembers_Operations.RESEND]: {\n variants: [\n {\n variantType: ResourceOperationVariantType.API_CALL,\n isDefault: true,\n roles: [CORE_ORG_ROLES.ORG_ADMIN, CORE_ORG_ROLES.ORG_DELEGATED_INVITE_MEMBERS],\n riskLevel: ResourceOperationRiskLevel.LOW,\n resourceOperationLike: CoreResourceOperation.UPDATE,\n requestDto: z.object({}),\n tokenGeneration: {\n tokenType: CoreConsumableTokenTypes.ORGANIZATION_MEMBER_INVITATION,\n consumptionMode: ConsumableToken_ConsumptionMode.SINGLE_USE,\n expiresIn: { value: 7, unit: DurationUnit.DAYS },\n relatedIdField: '_id',\n revokeExistingForSameRelated: true,\n emailLinkPath: '/invitation',\n condition: isPendingOrganizationMemberInvitation,\n },\n // Resend is meaningful only while the invite is pending. Same dual enforcement\n // as REVOKE: hides the roster action on non-INVITED rows and 403s server-side.\n enabledCondition: ({ currentObject }) => currentObject.status === OrganizationMemberStatus.INVITED,\n }\n ],\n userNotifications: [\n {\n target: CoreUserNotificationTarget.USER_SELF,\n channel: CoreUserNotificationChannel.EMAIL,\n recipientEmailField: 'userEmail',\n condition: isPendingOrganizationMemberInvitation,\n }\n ]\n }\n },\n});\n"]}
1
+ {"version":3,"file":"organization-members.shared.resources-config.schemas.js","sourceRoot":"","sources":["../../../src/organizations/organization-members.shared.resources-config.schemas.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAC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A4B,CAAC,QAAQ;oBAClD,SAAS,EAAE,IAAI;oBACf,KAAK,EAAE,CAAC,cAAc,CAAC,SAAS,EAAE,cAAc,CAAC,4BAA4B,CAAC;oBAC9E,SAAS,EAAE,0BAA0B,CAAC,GAAG;oBACzC,qBAAqB,EAAE,qBAAqB,CAAC,MAAM;oBACnD,UAAU,EAAE,CAAC,CAAC,MAAM,CAAC,EAAE,CAAC;oBACxB,eAAe,EAAE;wBACf,SAAS,EAAE,wBAAwB,CAAC,8BAA8B;wBAClE,eAAe,EAAE,+BAA+B,CAAC,UAAU;wBAC3D,SAAS,EAAE,EAAE,KAAK,EAAE,CAAC,EAAE,IAAI,EAAE,YAAY,CAAC,IAAI,EAAE;wBAChD,cAAc,EAAE,KAAK;wBACrB,4BAA4B,EAAE,IAAI;wBAClC,aAAa,EAAE,aAAa;wBAC5B,SAAS,EAAE,qCAAqC;qBACjD;oBACD,+EAA+E;oBAC/E,+EAA+E;oBAC/E,gBAAgB,EAAE,CAAC,EAAE,aAAa,EAAE,EAAE,EAAE,CAAC,aAAa,CAAC,MAAM,KAAK,wBAAwB,CAAC,OAAO;iBACnG;aACF;YACD,iBAAiB,EAAE;gBACjB;oBACE,MAAM,EAAE,0BAA0B,CAAC,SAAS;oBAC5C,OAAO,EAAE,2BAA2B,CAAC,KAAK;oBAC1C,mBAAmB,EAAE,WAAW;oBAChC,SAAS,EAAE,qCAAqC;iBACjD;aACF;SACF;KACF;CACF,CAAC,CAAC","sourcesContent":["/**\n * Organization Members Shared Resource Configuration\n *\n * Resource configuration for organization member management.\n * Comprehensive member lifecycle and role management.\n */\n\nimport { z } from 'zod';\nimport {\n OrganizationMemberSchema,\n OrganizationMemberStatus,\n} from './organization-members.shared.schemas';\nimport { CoreResourceOperation } from '../resources/resources.shared.core.definitions';\nimport { ResourceOperationRiskLevel, ResourcePrimaryScope, ResourceRelationship, DefaultDeleteResponseSchema } from '../resources/resources.shared.schemas';\nimport { CoreResourceType, coreResourceShared_FieldIdentifier } from '../resources/resources.shared.core.definitions';\nimport { ResourceOperationVariantType } from '../resources/resources.shared.schemas';\nimport { CoreUserNotificationTarget, CoreUserNotificationChannel } from '../notifications/notifications.shared.schemas';\n\nimport { createResourceConfiguration_Initialization } from '../resources/resources-config.shared.factory';\nimport { ResourceSystemAccessMode } from '../resources/resources-config.shared.schemas';\nimport {\n CoreConsumableTokenTypes,\n ConsumableToken_ConsumptionMode,\n} from '../security/authentications/consumable-token.shared.schemas';\nimport type {\n TokenRevocationConfig,\n} from '../security/authentications/consumable-token.shared.schemas';\nimport { DurationUnit } from '@wildo-ai/zod-decorators';\n\nimport { CORE_APP_ROLES, CORE_ORG_ROLES } from '../security/authorizations/roles.shared.schemas';\nimport { DataPortabilityProvenance } from '../compliance/privacy/subject-export.shared.schemas';\nimport { ErasureRetentionMode, ResourceDataSubjectKind } from '../compliance/privacy/impersonalization.shared.schemas';\n\n// Custom operations enum for organization members.\n// NOTE: cross-organization member transfer is intentionally NOT a framework\n// capability — moving a member between organizations is a tenant-boundary\n// crossing the framework does not sanction. Re-invite the identity in the\n// target organization instead.\n//\n// A membership row IS the invitation (there is no separate invitation resource):\n// - CREATE = invite (creates an `INVITED` row + mints the accept token).\n// - REVOKE = inviter/admin cancels a still-`INVITED` membership.\n// - RESEND = re-mint + re-send the accept token for an `INVITED` membership.\n// - SUSPEND/REACTIVATE = lifecycle of an ACTIVE/SUSPENDED member.\n// Invitee-side accept/reject is the tokenized `/auth/acceptInvitation` flow\n// (auth controller + `Auth_Invitation` screen), NOT a resource operation.\n//\n// ROLE CHANGES ARE `UPDATE`, NOT A DEDICATED VERB. `PROMOTE` / `DEMOTE` were declared here\n// as `ORG_ADMIN`-gated `riskLevel: HIGH` operations taking `{ newRole, reason }`, and were\n// removed on 2026-08-01: they were ROUTED but never implemented, so the request fell through\n// to the generic core UPDATE, which persists only fields the resource schema declares.\n// `newRole` is not one, so every call answered **HTTP 200 having changed nothing** — and the\n// dangerous direction is DEMOTE: an admin demotes a compromised account, is told 200 OK, and\n// the account keeps its privileges. Re-declaring an explicit role-change verb is legitimate,\n// but only WITH a custom implementation that writes `roles` and calls\n// `assertRequestedRolesWithinCallerCeiling` — a custom implementation is addressed by an EXACT\n// operation path, so it does NOT inherit the UPDATE variant's ceiling gate. Follow the\n// organization-units MOVE/ARCHIVE pattern (a `prefixCoreOperations` hook returning the field\n// patch the core UPDATE persists). See\n// the 2026-08-01 routed-but-unimplemented operation sweep (#1275).\n//\n// GRANT_OWNERSHIP is the ONE exception to \"role changes are UPDATE\", and it exists for a reason\n// UPDATE structurally cannot serve: it is the only operation on this resource a caller who is NOT a\n// member of the organization may perform. See its config entry below.\nexport enum OrganizationMembers_Operations {\n SUSPEND = 'suspend',\n REACTIVATE = 'reactivate',\n REVOKE = 'revoke',\n RESEND = 'resend',\n GRANT_OWNERSHIP = 'grantOwnership',\n}\n\n/**\n * One semantic definition for invalidating an organization invitation.\n *\n * REVOKE attaches it declaratively, so HTTP and trusted service callers enter\n * the same transactional revocation pipeline. Ordinary DELETE is\n * intentionally excluded: it removes a non-INVITED membership, which has no\n * invitation token to revoke.\n */\nexport const ORGANIZATION_MEMBER_INVITATION_TOKEN_REVOCATION = {\n tokenTypes: [\n CoreConsumableTokenTypes.ORGANIZATION_MEMBER_INVITATION,\n ],\n relatedIdField: '_id',\n} satisfies TokenRevocationConfig;\n\n/**\n * One predicate owns both invitation-token generation and invitation-email\n * dispatch. Keeping the two declarative side effects on the same named gate\n * prevents the polymorphic CREATE operation from drifting: an ACTIVE direct\n * add must produce neither an accept token nor an invitation email.\n */\nconst isPendingOrganizationMemberInvitation = ({\n currentObject,\n}: {\n currentObject: Record<string, unknown>;\n}): boolean =>\n currentObject.status === OrganizationMemberStatus.INVITED;\n\n/**\n * REACTIVATE's notifications say the member \"can now access organization resources again\", which is true only when\n * the membership came back ACTIVE. A service-provider membership whose relationship has ended, or whose person is no\n * longer assigned, lands INACTIVE instead (#1597), and neither the person nor the organization's users may be told\n * otherwise. Evaluated against the row as written.\n */\nconst isRestoredToActiveMembership = ({\n currentObject,\n}: {\n currentObject: Record<string, unknown>;\n}): boolean =>\n currentObject.status === OrganizationMemberStatus.ACTIVE;\n\n/**\n * The recipient of a membership's own status notice: the member whose membership was suspended or\n * reactivated (#1870).\n *\n * `USERS_CUSTOM` rather than `USER_SELF`, and the difference is the whole defect: `USER_SELF` is the\n * INITIATOR — the administrator who pressed the button — so \"your membership was suspended\" landed in\n * the administrator's inbox, and the scheduled reactivation sweep, which has no initiator, told nobody.\n * `ORGANIZATION_USERS` cannot reach the member either: it keeps only ACTIVE memberships, and a suspended\n * member is not one. The row the operation just wrote carries the member's `userId`, so that is the\n * recipient. Same shape as the `users` account-status notices (#1807).\n */\nconst selectMembershipStatusSubject = ({ currentObject }: { currentObject: { userId?: unknown } | null | undefined }): string[] =>\n currentObject?.userId ? [String(currentObject.userId)] : [];\n\n/**\n * Sortable member fields.\n *\n * `role` and `joinedAt` were listed here and neither is a field (#1806): the membership carries\n * `roles`, an ARRAY — which has no meaningful sort order on either adapter, so it is not offered —\n * and it records when it was created, not a separate join instant. Both entries were passed to the\n * repository verbatim and silently ignored. The factory now refuses a sort field that is not a field.\n */\nconst ORGANIZATION_MEMBERS_SORT_FIELDS = ['status', 'createdAt'];\n\nconst ORGANIZATION_MEMBERS_FILTER_FIELDS = {\n status: z.enum(OrganizationMemberStatus),\n // `roles` is an array, and a scalar filter on it matches array MEMBERSHIP on both adapters: MongoDB\n // does so natively and the PostgreSQL filter compiler emits a jsonb containment (`roles @> '\"x\"'`).\n // It was declared as `role`, a field no row has, so `?role=ORG_ADMIN` matched nothing (#1806).\n roles: z.string().min(1).describe('Only return members holding this role.'),\n};\n\ntype OrganizationMembersCoreOperations =\n | CoreResourceOperation.READ\n | CoreResourceOperation.LIST\n | CoreResourceOperation.SEARCH\n | CoreResourceOperation.CREATE\n | CoreResourceOperation.UPDATE\n | CoreResourceOperation.DELETE\n | CoreResourceOperation.COUNT\n // Route-less; `retentionPolicy` requires READ + LIST + UPDATE_MANY.\n | CoreResourceOperation.UPDATE_MANY;\n\n/*\nOrganization Members Resource Configuration Factory\n*/\nexport const organizationMembersResourceConfiguration_InitializationFactory = (resourcesRelationships: ResourceRelationship[]) => createResourceConfiguration_Initialization<\n typeof OrganizationMembers_Operations,\n OrganizationMembersCoreOperations,\n typeof OrganizationMemberSchema\n>({\n mainSchema: OrganizationMemberSchema,\n resourceIdentifier: CoreResourceType.ORGANIZATION_MEMBERS,\n resourceFieldIdentifier: coreResourceShared_FieldIdentifier[CoreResourceType.ORGANIZATION_MEMBERS],\n resourceRelationships: resourcesRelationships,\n isSystemResource: true,\n\n // create: invitation-accept was the historical opt-in; now the org-admin INVITE, SSO/SCIM\n // JIT, and org-auto-create-on-registration all create members in-process with explicit\n // `userId` + `organizationId` FKs on a request-context-less EC (stripped by the\n // client-shaped CREATE DTO, re-attached by `createAsSystem`).\n // read/list: the invitee's own pending-invitation inbox reads INVITED rows cross-org\n // BEFORE the invitee is a scoped member — authorized by `userId`-ownership at the\n // entry point (`listMyPendingInvitations`/`loadOwnedPendingInvitation`), not org role.\n // update: invitation ACCEPTANCE flips INVITED → ACTIVE in-process; the invitee is not an\n // org admin, so the status flip goes through the trusted system path.\n systemAccessPolicy: {\n exportSubject: ResourceSystemAccessMode.ALLOWED,\n create: ResourceSystemAccessMode.ALLOWED,\n read: ResourceSystemAccessMode.ALLOWED,\n list: ResourceSystemAccessMode.ALLOWED,\n update: ResourceSystemAccessMode.ALLOWED,\n },\n\n /**\n * Subject-export disclosure. The subject's OWN membership rows (org, roles, title) — not other members' data.\n */\n portabilityPolicy: { defaultProvenance: DataPortabilityProvenance.OBSERVED },\n\n /**\n * Subject erasure RETAINS this row and scrubs the person's contact and professional details.\n *\n * The membership survives because it is the tenant's record of who belonged to it and under what\n * authority; what does not survive is `userEmail` and `userTitle`, the denormalized copies of the\n * person held here so a row can be read without resolving the user.\n *\n * `roles` is deliberately NOT scrubbed. It is this application's authorization vocabulary rather than\n * personal data — the field's own comment says so — and emptying it could leave a tenant with no\n * administrator, which the administrative-continuity floors would refuse, making an erasure fail closed\n * on a tenant. Keeping it means that interaction never arises.\n */\n retentionPolicy: {\n mode: ErasureRetentionMode.RETAIN_AND_IMPERSONALIZE,\n },\n\n /**\n * Erasing one of these rows revokes NO session. A membership is a record ABOUT a person's place in a\n * tenant, not the person — their session ends through the `USERS` row, which is `SELF_PRINCIPAL`.\n */\n dataSubjectPolicy: { kind: ResourceDataSubjectKind.NO_PRINCIPAL },\n\n coreOperations: [\n CoreResourceOperation.READ,\n CoreResourceOperation.LIST,\n CoreResourceOperation.SEARCH,\n CoreResourceOperation.CREATE,\n CoreResourceOperation.UPDATE,\n CoreResourceOperation.DELETE,\n CoreResourceOperation.COUNT,\n // Route-less; `retentionPolicy` requires READ + LIST + UPDATE_MANY.\n CoreResourceOperation.UPDATE_MANY,\n ],\n\n customOperation: OrganizationMembers_Operations,\n\n operationsConfiguration: {\n\n /*\n\n * Route-less retention plumbing — INTERNAL_CALL registers no route, so no API surface is added, and it\n\n * must not be REPOSITORY_ONLY: the retention primitives resolve through `getServiceOperationPathDefault`,\n\n * which matches only INTERNAL_CALL / API_CALL. LIST is LOW (a read-shaped op may not claim the\n\n * HIGH/CRITICAL band, which carries an audit-emission obligation); UPDATE_MANY is CRITICAL — it is the\n\n * verb the impersonalize writer uses to stamp the retention markers.\n\n */\n\n [CoreResourceOperation.UPDATE_MANY]: {\n\n variants: [{\n\n variantType: ResourceOperationVariantType.INTERNAL_CALL,\n\n isDefault: true,\n\n roles: [CORE_APP_ROLES.APP_ADMIN_SUPER_ADMIN],\n\n riskLevel: ResourceOperationRiskLevel.CRITICAL,\n\n }],\n\n },\n\n [CoreResourceOperation.COUNT]: {\n variants: [\n {\n variantType: ResourceOperationVariantType.API_CALL,\n isDefault: true,\n roles: [CORE_ORG_ROLES.ORG_MEMBER],\n riskLevel: ResourceOperationRiskLevel.LOW,\n }\n ]\n },\n\n // CREATE is POLYMORPHIC — two intents on one op:\n // • INVITE (BRANCH B): the org admin supplies `userEmail` (the strict identity\n // anchor); the CREATE prefix find-or-creates the `User` by it (`PENDING_INVITATION`\n // if new) and FORCES `status: INVITED`. A single-use accept token is minted AFTER the\n // row is created (relatedId = the membership `_id`, STABLE across `INVITED → ACTIVE`\n // so the emailed link never orphans); the pipeline injects it into the invite email and\n // the dispatcher builds the accept link (`emailLinkPath → /invitation?token=…`, consumed\n // by `/auth/acceptInvitation`). No `grantedRoles`: the accept handler reads the\n // membership's own `roles` when it flips the row to ACTIVE.\n // • DIRECT-ADD (BRANCH A): the caller supplies `userId` (founder org-owner grant,\n // SSO-JIT, SCIM) and the row persists `ACTIVE` — there is nothing to accept.\n // Token generation and notification dispatch share one named predicate.\n // The INVITE branch mints one accept token and sends one post-commit email;\n // the ACTIVE direct-add branch does neither.\n [CoreResourceOperation.CREATE]: {\n variants: [\n {\n variantType: ResourceOperationVariantType.API_CALL,\n isDefault: true,\n roles: [CORE_ORG_ROLES.ORG_ADMIN, CORE_ORG_ROLES.ORG_DELEGATED_INVITE_MEMBERS], // Org admins, or a firm's expert lent INVITE_MEMBERS (#1631)\n riskLevel: ResourceOperationRiskLevel.MEDIUM,\n // requestDto auto-derived from decorators (userEmail + roles +\n // organizationUnitsMembership + userTitle; userId/status/invitedByUserId/\n // invitedAt are server-injected via `.excludeFromCreate()`).\n tokenGeneration: {\n tokenType: CoreConsumableTokenTypes.ORGANIZATION_MEMBER_INVITATION,\n consumptionMode: ConsumableToken_ConsumptionMode.SINGLE_USE,\n expiresIn: { value: 7, unit: DurationUnit.DAYS },\n relatedIdField: '_id',\n emailLinkPath: '/invitation',\n // Mint the accept token for real invites only — never for an ACTIVE direct-add.\n condition: isPendingOrganizationMemberInvitation,\n },\n }\n ],\n // Deliver the invite email to the INVITEE (`userEmail`) via the\n // email-by-address path — the invitee may be a brand-new `PENDING_INVITATION`\n // user with no session. Carries the `acceptUrl` (`/invitation?token=…`) built\n // from the token minted above. `target: USER_SELF` is retained only so the\n // derived template ref stays `…create.user-self` and the accept link routes to\n // the main (non-admin) app.\n userNotifications: [\n {\n target: CoreUserNotificationTarget.USER_SELF,\n channel: CoreUserNotificationChannel.EMAIL,\n recipientEmailField: 'userEmail',\n condition: isPendingOrganizationMemberInvitation,\n }\n ]\n },\n\n [CoreResourceOperation.READ]: {\n variants: [\n {\n variantType: ResourceOperationVariantType.API_CALL,\n isDefault: true,\n roles: [CORE_ORG_ROLES.ORG_MEMBER], // Org members can read member info\n riskLevel: ResourceOperationRiskLevel.LOW,\n }\n ]\n },\n\n [CoreResourceOperation.LIST]: {\n variants: [\n {\n variantType: ResourceOperationVariantType.API_CALL,\n isDefault: true,\n roles: [CORE_ORG_ROLES.ORG_MEMBER], // Org members can list organization members\n riskLevel: ResourceOperationRiskLevel.LOW,\n }\n ]\n },\n\n [CoreResourceOperation.SEARCH]: {\n variants: [\n {\n variantType: ResourceOperationVariantType.API_CALL,\n isDefault: true,\n roles: [CORE_ORG_ROLES.ORG_MEMBER],\n riskLevel: ResourceOperationRiskLevel.LOW,\n isSearchable: true,\n // `userEmail` is a denormalized, immutable own-field (mirror of the linked\n // user's email, captured at membership creation). First/last name are NOT\n // denormalized onto the member row — they live on `USER_PROFILES` and are\n // mutable there — so they are searched RELATIONALLY: the framework runs a\n // secondary match on `USER_PROFILES` (its own searchable fields) and folds\n // the matching `userId`s into an `$in` on this row's `userId`. The member\n // query stays org-scoped, so this is tenant-safe; names are never stale\n // because they are read live from the profile at search time. See\n // SearchableRelationDescriptor in resources-config.shared.schemas.ts.\n searchableFields: [\n 'userEmail',\n {\n localField: 'userId',\n relatedResource: CoreResourceType.USER_PROFILES,\n relatedJoinField: 'userId',\n fields: ['firstName', 'lastName'],\n },\n ],\n searchableOptions: { caseSensitive: false, fullMatchOnly: false },\n filterFields: ORGANIZATION_MEMBERS_FILTER_FIELDS,\n sortFields: ORGANIZATION_MEMBERS_SORT_FIELDS,\n maxPaginatedResultPerPageLimit: 50,\n }\n ],\n },\n\n [CoreResourceOperation.UPDATE]: {\n variants: [\n {\n variantType: ResourceOperationVariantType.API_CALL,\n isDefault: true,\n roles: [CORE_ORG_ROLES.ORG_ADMIN], // Org admins can update member details\n riskLevel: ResourceOperationRiskLevel.MEDIUM,\n // requestDto auto-derived from decorators\n //\n // Ordinary UPDATE remains audited below the HIGH/CRITICAL floor: editing member details\n // is MEDIUM risk for the UI, but changing roles still requires privilege evidence.\n // The registered UPDATE implementation also emits ORGANIZATION_MEMBER_ROLE_CHANGED after\n // a durable role change, with previous, requested and resulting roles. That specialized\n // event complements the automatic operation event; it is not an unimplemented producer.\n //\n // GRANT_OWNERSHIP is a separate named role-change path. Its UPDATE-like core behavior does\n // not inherit UPDATE's custom hooks: registration resolves the exact operation identity.\n // Its CRITICAL risk triggers RESOURCE_OPERATION_PERFORMED automatically, with changed\n // role sets carried by the roles field's audit-evidence marker. Queries covering ownership\n // repair must include that operation family, not only the specialized role-change event.\n //\n // assurance-control: WILDO.ACCESS.PRIVILEGE_EVIDENCE — evidence of privilege grant/revocation.\n auditableEvent: { auditBelowRiskFloor: true },\n }\n ],\n userNotifications: [\n {\n target: CoreUserNotificationTarget.ORGANIZATION_USERS,\n channel: CoreUserNotificationChannel.EMAIL,\n }\n ]\n },\n\n [CoreResourceOperation.DELETE]: {\n variants: [\n {\n variantType: ResourceOperationVariantType.API_CALL,\n isDefault: true,\n roles: [CORE_ORG_ROLES.ORG_ADMIN, CORE_ORG_ROLES.ORG_DELEGATED_MANAGE_RELATIONSHIP_EXPERTS], // Org admins; a firm's expert lent MANAGE_RELATIONSHIP_EXPERTS, on its own relationship's experts only (#1631)\n riskLevel: ResourceOperationRiskLevel.HIGH,\n // Accepted/non-pending members use ordinary DELETE. A pending invite\n // is cancelled through REVOKE, which atomically revokes its accept\n // token. Keeping the vocabularies disjoint avoids making every\n // active-member removal token-coupled.\n enabledCondition: ({ currentObject }) =>\n currentObject.status !== OrganizationMemberStatus.INVITED,\n }\n ],\n userNotifications: [\n {\n target: CoreUserNotificationTarget.ORGANIZATION_USERS,\n channel: CoreUserNotificationChannel.EMAIL,\n }\n ]\n },\n\n /**\n * The higher-tier repair door for the organization-owner floor — the second half of the\n * industry pattern described in `.claude/rules/administrative-continuity-floors.md`.\n *\n * ## Why this cannot be UPDATE\n *\n * The floor refuses to let the last `ORG_OWNER` be removed, demoted or deactivated. That is the\n * correct tenant-tier answer, but on its own it converts every mistake that DID strand a tenant\n * — a direct database edit, a restore from a mid-erasure backup, an acknowledged erasure under\n * GDPR Art. 17, a seed that authored no owner — into a permanent lockout, because\n * `validateParentScopeAccess` denies a non-member on ORGANIZATIONS scope and there is no\n * `APP_ADMIN_SUPER_ADMIN` bypass. Both denials are pinned in\n * `cross-tenant-super-admin-reach.mongo.integration.test.ts`. So no tenant member can grant the\n * role (they would need the authority they just lost) and no platform administrator can reach\n * the row at all. GitHub solves this with an Enterprise owner one tier up; this is that tier.\n *\n * ## Why it is a distinct verb rather than a flag on UPDATE\n *\n * `admitsCrossTenantPlatformAdministration` relaxes the SCOPE check for the variant that carries\n * it. Putting it on generic UPDATE would open every field of every membership row in every\n * tenant to a cross-tenant caller. The whole safety argument is that the opened surface is\n * exactly one field with one direction, so it is authored as its own operation whose custom\n * implementation reads nothing from the payload but the justification — which it records, and\n * never persists onto the row.\n *\n * ## Deliberate narrowness\n *\n * - **Promotes an EXISTING member** (Microsoft Loop's rule). It cannot mint a membership, so it\n * never creates an identity inside a tenant nobody owns.\n * - **Additive only.** It adds the owner-conferring role; it cannot remove roles, so it can\n * never be used to demote and is not a second path through the floor.\n * - **`justification` is required**, not optional. This is a break-glass action against a tenant\n * the operator is not a member of; the audit row is worth nothing without the why. `AC-2(7)`\n * asks for privileged assignment to be monitored — the trail IS the control here, since by\n * construction no authorization check downstream can second-guess the caller. It lands on the\n * `ORGANIZATION_MEMBER_ROLE_CHANGED` row the grant emits post-commit (`eventData.justification`),\n * beside the before/after role sets. `RESOURCE_OPERATION_PERFORMED`, which this CRITICAL verb\n * also emits, carries no request payload and so cannot hold it. Until #593 it was validated here\n * and discarded at the service boundary.\n *\n * assurance-control: WILDO.ACCESS.ADMINISTRATIVE_CONTINUITY — restore administrability of a scope\n * that has no usable administrator.\n * assurance-control: WILDO.ACCESS.PRIVILEGE_EVIDENCE — evidence of privilege grant.\n */\n [OrganizationMembers_Operations.GRANT_OWNERSHIP]: {\n variants: [\n {\n variantType: ResourceOperationVariantType.API_CALL,\n isDefault: true,\n // Platform tier only. This is the role set the operation-roles gate checks INDEPENDENTLY\n // of the scope admission below: a caller holding this key at ORGANIZATIONS scope resolves\n // it against the organization role table, which does not contain it, and is denied there.\n roles: [CORE_APP_ROLES.APP_ADMIN_SUPER_ADMIN],\n riskLevel: ResourceOperationRiskLevel.CRITICAL,\n resourceOperationLike: CoreResourceOperation.UPDATE,\n // THE cross-tenant admission. Without it the operation is unreachable by the only\n // principal it exists for, because a platform administrator is by definition not a member\n // of the stranded tenant.\n admitsCrossTenantPlatformAdministration: true,\n requestDto: z.object({\n justification: z.string().min(1).max(1000).describe('Why a platform administrator is making this member an owner of an organization they do not belong to. Required, and recorded on the audit trail with the role change.'),\n }),\n // No `auditableEvent` declaration: CRITICAL is inside `AUTOMATIC_AUDIT_RISK_FLOOR`, so the\n // event emits on the risk level alone and `auditBelowRiskFloor` would be inert here. The\n // before/after role sets ride along because `roles` carries `.isAuditEvidence()` — which is\n // what makes the trail answer the question that matters about this door: WHO was made an\n // owner of a tenant, by a caller who was not in it.\n },\n ],\n userNotifications: [\n {\n // The tenant learns that its ownership changed from outside. An operator repairing a\n // stranded tenant is legitimate; an operator quietly granting themselves an ally inside a\n // customer's tenant is not, and the difference is only visible to the tenant if it is told.\n target: CoreUserNotificationTarget.ORGANIZATION_USERS,\n channel: CoreUserNotificationChannel.EMAIL,\n },\n ],\n },\n\n [OrganizationMembers_Operations.SUSPEND]: {\n variants: [\n {\n variantType: ResourceOperationVariantType.API_CALL,\n isDefault: true,\n roles: [CORE_ORG_ROLES.ORG_ADMIN, CORE_ORG_ROLES.ORG_DELEGATED_MANAGE_RELATIONSHIP_EXPERTS], // Org admins; a firm's expert lent MANAGE_RELATIONSHIP_EXPERTS, on its own relationship's experts only (#1631)\n riskLevel: ResourceOperationRiskLevel.CRITICAL,\n resourceOperationLike: CoreResourceOperation.UPDATE,\n requestDto: z.object({\n suspensionReason: z.string().min(1).max(500).describe('Why the member is suspended. Recorded on the audit trail, not on the membership.'),\n suspensionEndDate: z.date().optional().describe('When the suspension ends and the member is reactivated. Absent: suspended until someone reactivates them.'),\n }),\n // Implemented by the shared status-transition factory (ACTIVE → SUSPENDED, carrying\n // `suspensionEndDate` onto the row's `scheduledReactivationAt`). SUSPEND is legal only\n // from ACTIVE: an INVITED row has not accepted yet — cancel it with REVOKE, which also\n // revokes the accept token — and an INACTIVE one is already out.\n enabledCondition: ({ currentObject }) =>\n currentObject.status === OrganizationMemberStatus.ACTIVE,\n }\n ],\n userNotifications: [\n {\n // The suspended member. `alwaysDeliver`: a person who loses access to an organization has no\n // other way to learn why, whatever they chose for ordinary email notifications.\n target: CoreUserNotificationTarget.USERS_CUSTOM,\n channel: CoreUserNotificationChannel.EMAIL,\n userIdsSelector: selectMembershipStatusSubject,\n alwaysDeliver: true,\n },\n {\n target: CoreUserNotificationTarget.ORGANIZATION_USERS,\n channel: CoreUserNotificationChannel.EMAIL,\n }\n ]\n },\n\n [OrganizationMembers_Operations.REACTIVATE]: {\n variants: [\n {\n variantType: ResourceOperationVariantType.API_CALL,\n isDefault: true,\n // Org admins only. NOT opened to MANAGE_RELATIONSHIP_EXPERTS (#1631): a suspension is the client's bar against\n // one person, which the firm cannot lift (#1597) — a firm may suspend or remove its own expert, never undo the\n // client's suspension of them.\n roles: [CORE_ORG_ROLES.ORG_ADMIN],\n riskLevel: ResourceOperationRiskLevel.MEDIUM,\n resourceOperationLike: CoreResourceOperation.UPDATE,\n requestDto: z.object({\n reason: z.string().max(500).optional()\n .describe('Why the member is being reactivated. Recorded with the audit event for the reactivation.')\n }),\n // Implemented by the shared status-transition factory (SUSPENDED → ACTIVE, clearing any\n // pending `scheduledReactivationAt`). Legal only from SUSPENDED: reactivating an INVITED\n // row would skip acceptance and grant a membership nobody agreed to. A service-provider\n // membership lands INACTIVE instead when its relationship has ended or its person is no\n // longer assigned (#1597, `resolveProviderMembershipReactivationStatus`).\n enabledCondition: ({ currentObject }) =>\n currentObject.status === OrganizationMemberStatus.SUSPENDED,\n // MEDIUM sits below `AUTOMATIC_AUDIT_RISK_FLOOR`, so without this the RESTORE half of the\n // pair would go untrailed while SUSPEND (CRITICAL) is recorded — a trail showing every\n // suspension and none of the lifts, which reads as a member still suspended a year after\n // they were reinstated. The risk level answers \"how alarming is the affordance\"; this\n // answers \"is it evidence an auditor needs\", and for the inverse of a CRITICAL verb it is.\n // assurance-control: WILDO.ACCESS.PRIVILEGE_EVIDENCE\n auditableEvent: { auditBelowRiskFloor: true },\n }\n ],\n userNotifications: [\n {\n // The reactivated member — reached on the scheduled sweep too, which runs with no initiator.\n target: CoreUserNotificationTarget.USERS_CUSTOM,\n channel: CoreUserNotificationChannel.EMAIL,\n userIdsSelector: selectMembershipStatusSubject,\n alwaysDeliver: true,\n condition: isRestoredToActiveMembership,\n },\n {\n target: CoreUserNotificationTarget.ORGANIZATION_USERS,\n channel: CoreUserNotificationChannel.EMAIL,\n condition: isRestoredToActiveMembership,\n }\n ]\n },\n\n // REVOKE — inviter/admin cancels a still-`INVITED` membership. The exact\n // custom implementation DELETES the row and atomically revokes its accept\n // token. The paired PENDING_INVITATION user is retained here and reaped by\n // deferred hygiene only after it is old and still has no memberships:\n // point-operation cleanup cannot predicate-lock \"zero memberships\" against\n // a concurrent invitation insert under Mongo snapshot isolation. `reason`\n // is captured in the audit payload, not persisted on the deleted row.\n [OrganizationMembers_Operations.REVOKE]: {\n variants: [\n {\n variantType: ResourceOperationVariantType.API_CALL,\n isDefault: true,\n roles: [CORE_ORG_ROLES.ORG_ADMIN, CORE_ORG_ROLES.ORG_DELEGATED_INVITE_MEMBERS],\n riskLevel: ResourceOperationRiskLevel.MEDIUM,\n resourceOperationLike: CoreResourceOperation.DELETE,\n requestDto: z.object({\n reason: z.string().max(500).optional()\n .describe('Why the invitation is being revoked. Recorded with the audit event for the removal; it is not kept on the membership, which is deleted.')\n }),\n tokenRevocation:\n ORGANIZATION_MEMBER_INVITATION_TOKEN_REVOCATION,\n // REVOKE has an exact API custom registration; `resourceOperationLike`\n // selects DELETE persistence/DTO semantics but does not inherit the\n // core DELETE custom implementation. Its real return is the delete\n // envelope, declared explicitly so output validation matches runtime.\n customResponseDto: DefaultDeleteResponseSchema,\n // Only a still-pending invite can be revoked — an ACTIVE member is removed\n // via DELETE, not \"revoked\". Gates the roster action (paired with the preset's\n // `WHEN_AVAILABLE`, the button shows only on INVITED rows) AND fail-closes the\n // backend (`services-registry-handler` throws SERVICE_RESOURCE_OPERATION_DISABLED\n // → 403 if invoked on a non-INVITED row).\n enabledCondition: ({ currentObject }) => currentObject.status === OrganizationMemberStatus.INVITED,\n },\n ],\n // Two emails (distinct templates, disambiguated by `customNotificationRef`):\n // • the INVITEE (`recipientEmailField: 'userEmail'`) — \"your invitation was revoked\";\n // • the ADMIN/initiator (`USER_SELF`) — confirmation of the action.\n // Both USER_SELF+EMAIL, so each MUST carry a unique `customNotificationRef`.\n userNotifications: [\n {\n target: CoreUserNotificationTarget.USER_SELF,\n channel: CoreUserNotificationChannel.EMAIL,\n recipientEmailField: 'userEmail',\n customNotificationRef: 'invitee',\n },\n {\n target: CoreUserNotificationTarget.USER_SELF,\n channel: CoreUserNotificationChannel.EMAIL,\n customNotificationRef: 'admin',\n }\n ]\n },\n\n // RESEND — re-mint the accept token (revoking any prior one for this membership)\n // and re-send the invite email with the fresh accept link. Only valid while the\n // membership is `INVITED`.\n [OrganizationMembers_Operations.RESEND]: {\n variants: [\n {\n variantType: ResourceOperationVariantType.API_CALL,\n isDefault: true,\n roles: [CORE_ORG_ROLES.ORG_ADMIN, CORE_ORG_ROLES.ORG_DELEGATED_INVITE_MEMBERS],\n riskLevel: ResourceOperationRiskLevel.LOW,\n resourceOperationLike: CoreResourceOperation.UPDATE,\n requestDto: z.object({}),\n tokenGeneration: {\n tokenType: CoreConsumableTokenTypes.ORGANIZATION_MEMBER_INVITATION,\n consumptionMode: ConsumableToken_ConsumptionMode.SINGLE_USE,\n expiresIn: { value: 7, unit: DurationUnit.DAYS },\n relatedIdField: '_id',\n revokeExistingForSameRelated: true,\n emailLinkPath: '/invitation',\n condition: isPendingOrganizationMemberInvitation,\n },\n // Resend is meaningful only while the invite is pending. Same dual enforcement\n // as REVOKE: hides the roster action on non-INVITED rows and 403s server-side.\n enabledCondition: ({ currentObject }) => currentObject.status === OrganizationMemberStatus.INVITED,\n }\n ],\n userNotifications: [\n {\n target: CoreUserNotificationTarget.USER_SELF,\n channel: CoreUserNotificationChannel.EMAIL,\n recipientEmailField: 'userEmail',\n condition: isPendingOrganizationMemberInvitation,\n }\n ]\n }\n },\n});\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"organization-members.shared.schemas.d.ts","sourceRoot":"","sources":["../../../../src/organizations/organization-members.shared.schemas.ts"],"names":[],"mappings":"AACA;;;;GAIG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EAAE,cAAc,EAAkB,MAAM,iDAAiD,CAAC;AAQjG;;;;;;;;;;;;;;;;;;GAkBG;AACH,oBAAY,wBAAwB;IAClC,OAAO,YAAY;IACnB,MAAM,WAAW;IACjB,QAAQ,aAAa;IACrB,SAAS,cAAc;CACxB;AAED,eAAO,MAAM,wBAAwB;;;;;;;;;;;;;;;;;kBAuNnC,CAAC;AACH,MAAM,MAAM,kBAAkB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,wBAAwB,CAAC,CAAC"}
1
+ {"version":3,"file":"organization-members.shared.schemas.d.ts","sourceRoot":"","sources":["../../../src/organizations/organization-members.shared.schemas.ts"],"names":[],"mappings":"AACA;;;;GAIG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EAAE,cAAc,EAAkB,MAAM,iDAAiD,CAAC;AAQjG;;;;;;;;;;;;;;;;;;GAkBG;AACH,oBAAY,wBAAwB;IAClC,OAAO,YAAY;IACnB,MAAM,WAAW;IACjB,QAAQ,aAAa;IACrB,SAAS,cAAc;CACxB;AAED,eAAO,MAAM,wBAAwB;;;;;;;;;;;;;;;;;kBAuNnC,CAAC;AACH,MAAM,MAAM,kBAAkB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,wBAAwB,CAAC,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"organization-members.shared.schemas.js","sourceRoot":"","sources":["../../../../src/organizations/organization-members.shared.schemas.ts"],"names":[],"mappings":"AACA;;;;GAIG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EAAE,cAAc,EAAE,cAAc,EAAE,MAAM,iDAAiD,CAAC;AACjG,OAAO,EAAE,cAAc,EAAE,MAAM,uCAAuC,CAAC;AACvE,OAAO,EAAE,gBAAgB,EAAE,MAAM,gDAAgD,CAAC;AAClF,OAAO,EAAE,oBAAoB,EAAE,MAAM,6DAA6D,CAAC;AACnG,OAAO,EAAE,aAAa,EAAE,MAAM,gDAAgD,CAAC;AAC/E,OAAO,EAAE,oBAAoB,EAAE,MAAM,0BAA0B,CAAC;AAGhE;;;;;;;;;;;;;;;;;;GAkBG;AACH,MAAM,CAAN,IAAY,wBAKX;AALD,WAAY,wBAAwB;IAClC,+CAAmB,CAAA;IACnB,6CAAiB,CAAA;IACjB,iDAAqB,CAAA;IACrB,mDAAuB,CAAA;AACzB,CAAC,EALW,wBAAwB,KAAxB,wBAAwB,QAKnC;AAED,MAAM,CAAC,MAAM,wBAAwB,GAAG,CAAC,CAAC,MAAM,CAAC;IAC/C,GAAG,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,YAAY,EAAE,CAAC,cAAc,EAAE;IACtD;;;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,CAAC,cAAc,EAAE;SACvF,iBAAiB,EAAE,CAAC,iBAAiB,EAAE,CAAC,eAAe,EAAE;IAC5D;;;;OAIG;IACH,sBAAsB,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,QAAQ,EAAE,CAAC,WAAW,EAAE,CAAC,cAAc,EAAE;SAChF,iBAAiB,EAAE,CAAC,iBAAiB,EAAE,CAAC,eAAe,EAAE;IAC5D;;;;OAIG;IACH,wBAAwB,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,QAAQ,EAAE,CAAC,cAAc,EAAE,CAAC,iBAAiB,EAAE,CAAC,iBAAiB,EAAE;IACjH;;;;;;;;;;;OAWG;IACH,aAAa,EAAE,cAAc,CAAC;QAC5B,UAAU,EAAE,QAAQ;QACpB,eAAe,EAAE,gBAAgB,CAAC,aAAa;QAC/C,gBAAgB,EAAE,QAAQ;QAC1B,MAAM,EAAE,CAAC,WAAW,EAAE,UAAU,CAAC;QACjC,aAAa,EAAE,WAAW;KAC3B,CAAC;IACF,SAAS,EAAE,CAAC,CAAC,IAAI,EAAE,CAAC,OAAO,CAAC,GAAG,EAAE,CAAC,IAAI,IAAI,EAAE,CAAC,CAAC,QAAQ,EAAE,CAAC,WAAW,EAAE,CAAC,iBAAiB,EAAE,CAAC,iBAAiB,EAAE;IAC9G,SAAS,EAAE,CAAC,CAAC,IAAI,EAAE,CAAC,OAAO,CAAC,GAAG,EAAE,CAAC,IAAI,IAAI,EAAE,CAAC,CAAC,QAAQ,EAAE,CAAC,WAAW,EAAE,CAAC,iBAAiB,EAAE,CAAC,iBAAiB,EAAE;CAC/G,CAAC,CAAC,cAAc,CAAC;IAChB,QAAQ;IACR,gBAAgB;CACjB,CAAC,CAAC","sourcesContent":["\n/**\n * Organization Member Shared Schemas\n * \n * Junction entity between users and organizations with roles and permissions\n */\n\nimport { z } from 'zod';\n\nimport { CORE_ORG_ROLES, OrgRolesSchema } from '../security/authorizations/roles.shared.schemas';\nimport { forwardedLabel } from '../resources/resources.shared.schemas';\nimport { CoreResourceType } from '../resources/resources.shared.core.definitions';\nimport { PersonalDataCategory } from '../compliance/privacy/personal-data-category.shared.schemas';\nimport { RedactionType } from '../compliance/privacy/redaction.shared.schemas';\nimport { addImpersonalizeWith } from '@wildo-ai/zod-decorators';\n\n\n/**\n * Organization member lifecycle status.\n *\n * A membership row IS the invitation — there is no separate invitation\n * collection. `INVITED` is the pending-membership state; acceptance flips it to\n * `ACTIVE` on the SAME row (stable `_id`, so the emailed accept-link token never\n * orphans). SSO JIT / SCIM provisioning find-or-activate an existing `INVITED`\n * row rather than blind-creating a second `ACTIVE` one.\n *\n * - `INVITED` — membership extended, invitee has not yet accepted. Paired with a\n * `User` in `PENDING_INVITATION` status when the invitee has no account yet.\n * - `ACTIVE` — accepted / directly provisioned membership.\n * - `INACTIVE` — deactivated (e.g. SCIM deprovision).\n * - `SUSPENDED` — temporarily suspended (optionally time-boxed).\n *\n * Invite OUTCOMES (declined / revoked / expired) are NOT statuses — the row is\n * deleted and the event recorded in the audit trail (keeps this enum about\n * membership, not invitation bookkeeping).\n */\nexport enum OrganizationMemberStatus {\n INVITED = 'INVITED',\n ACTIVE = 'ACTIVE',\n INACTIVE = 'INACTIVE',\n SUSPENDED = 'SUSPENDED'\n}\n\nexport const OrganizationMemberSchema = z.object({\n _id: z.string().min(1).isPrimaryKey().isSummaryField(),\n /**\n * FK to the member `User`. ALWAYS present on a persisted row (a membership with\n * no member is meaningless) — even an `INVITED` invitee has an eagerly-created\n * `User` in `PENDING_INVITATION` status, so this FK is never null.\n *\n * SERVER-INJECTED on create (`.excludeFromCreate()`), via one of two paths:\n * - Invite (org-admin CREATE): the admin supplies {@link userEmail} instead;\n * the CREATE prefix find-or-creates the user by normalized email and injects\n * the resolved `_id` here (email is the strict unique identity anchor — see\n * `User.email.isUnique()`).\n * - System provisioning (invite-acceptance / SSO JIT / SCIM): passes `userId`\n * directly through `createAsSystem`, which re-attaches this context FK past\n * the strict-DTO strip.\n * `.excludeFromUpdate()` keeps the member↔user binding immutable.\n */\n // `labelFallbackField` names the readable copy this row already carries, for when the reference\n // cannot be resolved. `userEmail` below is `.isHidden({ display: true })` on the stated grounds\n // that \"the user-facing email is surfaced by resolving the `userId` reference\" — and for an\n // INVITED person that resolution has nothing to build a label from, because there is no\n // `USER_PROFILE` yet. Measured 2026-09-19 on the member directory: three of four rows rendered\n // `6aaba6b3a2d3b6b0ad61f33e`, the fourth (a real user) rendered their name. The copy was on the\n // row the whole time; nothing was reaching for it.\n userId: z.string().min(1).isDBIndexed().isForeignKey().isSummaryField().excludeFromCreate().excludeFromUpdate()\n .foreignKeyUI({ display: { labelFallbackField: 'userEmail' } }),\n /**\n * The linked user's email — DUAL ROLE:\n *\n * 1. INVITE CREATE INPUT. On the org-admin invite CREATE the admin supplies\n * an email (not a `userId`); the CREATE prefix normalizes it, find-or-creates\n * the `User` by it (unique identity anchor), and derives {@link userId}. This\n * is why the field is client-writable on CREATE (no `.excludeFromCreate()`).\n * 2. DENORMALIZED IMMUTABLE COPY. After creation it is the immutable mirror of\n * `USERS.email` (which is `.excludeFromUpdate()`, so this copy never drifts).\n * It feeds member SEARCH (`searchableFields: ['userEmail']` — no async hop)\n * and the {@link instanceLabel} fallback when the related profile/name is\n * unavailable (e.g. a `PENDING_INVITATION` invitee has no `USER_PROFILE` yet).\n *\n * For system creates (SSO/SCIM/acceptance) that pass `userId` instead of an\n * email, the CREATE prefix DERIVES this value from the authoritative user record,\n * so it is `.optional()` at the input boundary. `.excludeFromUpdate()` keeps it\n * immutable post-creation. `.isHidden({ display: true })` keeps it out of\n * auto-rendered display cards/columns (the user-facing email is surfaced by\n * resolving the `userId` reference) — it still renders on the CREATE form.\n */\n // REMOVE on erasure. A denormalized copy of the person's email, held here so a membership row can be\n // read without resolving the user — which is exactly what makes it personal data this row HOLDS rather\n // than a link it carries. Clearable (`.optional()`), so REMOVE resolves to a removed key.\n //\n // `roles` beside it is deliberately NOT scrubbed: it is this application's authorization vocabulary,\n // not personal data, and emptying it could strand a tenant with no administrator — the interaction the\n // administrative-continuity floors exist to refuse. Keeping it means that interaction never arises.\n userEmail: addImpersonalizeWith(\n z.email().optional().isDBIndexed().isSummaryField().isHidden({ display: true }).excludeFromUpdate()\n .dataCategories(PersonalDataCategory.CONTACT_DETAILS),\n RedactionType.REMOVE,\n ),\n organizationId: z.string().min(1).isDBIndexed().isForeignKey().isSummaryField().excludeFromUpdate(),\n /*\n * `organizationUnitsMembership` (an embedded `[{ organizationUnitId, role }]` array) was REMOVED\n * here on 2026-07-31 and promoted to the `ORGANIZATION_UNIT_MEMBERS` junction resource\n * (plan decision D-B5). The array could not be queried portably — a dot-path filter into an\n * array field resolves to NULL on PostgreSQL and the LIST summary projection strips the field —\n * so every \"who is assigned to this unit?\" question failed OPEN, it could not carry a registered\n * relationship (no cascade), and it admitted two conflicting roles for the same unit. Read unit\n * assignments through `ORGANIZATION_UNIT_MEMBERS` filtered by `organizationMemberId`.\n */\n // `.isAuditEvidence()` — this member's authority INSIDE the organization. Roles are the\n // framework's single authorization axis, so a change here is an access-control decision and the\n // before/after sets ARE the evidence: a trail that records only \"roles changed\" proves nothing\n // about what authority resulted. Safe to record in full — a role name is vocabulary, not personal\n // data, so it carries no erasure obligation into the immutable audit ledger.\n // assurance-control: WILDO.ACCESS.PRIVILEGE_EVIDENCE\n roles: z.array(OrgRolesSchema).default([CORE_ORG_ROLES.ORG_MEMBER]).isDBIndexed().isSummaryField().isAuditEvidence(),\n /**\n * Server-owned lifecycle state. Default `ACTIVE` covers direct/system\n * provisioning (SSO JIT / SCIM / self-registration org-owner grant), while\n * the org-admin invite CREATE prefix forces `INVITED`.\n *\n * Neither CREATE nor generic UPDATE may accept this field from a client:\n * lifecycle transitions carry security side effects that a field update\n * cannot reproduce. In particular, invitation acceptance must validate and\n * consume the invitation token, grant the derived user type, and serialize\n * against revocation; suspension/reactivation likewise have dedicated\n * operations. Keeping status out of both DTOs makes those trusted transition\n * operations the only way to change it.\n */\n status: z.enum(OrganizationMemberStatus)\n .default(OrganizationMemberStatus.ACTIVE)\n .isDBIndexed()\n .isSummaryField()\n .excludeFromCreate()\n .excludeFromUpdate()\n // Lifecycle state gates access as surely as roles do — a SUSPENDED member is denied, an ACTIVE\n // one is not — so a suspension or reactivation is an authorization event and its before/after\n // values are the evidence. The enum's values are closed vocabulary, never personal data, so\n // recording them carries no GDPR Art. 17 obligation into the immutable ledger — the same\n // reasoning `UserSchema.status` records. Without this the framework's\n // `RESOURCE_OPERATION_PERFORMED` event notes only that `status` was among the changed fields,\n // never what it changed FROM or TO, which is the half an access review actually reads.\n // assurance-control: WILDO.ACCESS.PRIVILEGE_EVIDENCE\n .isAuditEvidence(),\n /**\n * When an automated sweep must return this membership to `ACTIVE`.\n *\n * Set by SUSPEND when the caller time-boxes the suspension (`suspensionEndDate` in that verb's\n * request contract), cleared by REACTIVATE. Absent means the suspension is indefinite and only a\n * deliberate REACTIVATE lifts it — which is the default, since an unbounded suspension is the\n * safer reading of \"suspend\".\n *\n * NAMED FOR THE EFFECT, NOT THE CAUSE. `scheduledReactivationAt` says what the system will do;\n * a `suspensionEndsAt` would describe only the suspension branch while the identical field on\n * `USERS` also serves self-service deactivation. One concept, one name across both resources,\n * so the reactivation sweep reads the same field everywhere. The request contracts keep their\n * own caller-facing vocabulary and the transition hook translates — the same split\n * `ORGANIZATION_UNITS` MOVE uses (`newParentUnitId` in, `parentUnitId` + `path` persisted).\n *\n * Server-owned on both sides (`.excludeFromCreate().excludeFromUpdate()`): only the transition\n * operations write it, exactly as for {@link status} above. Indexed because the sweep's whole\n * query is \"rows whose scheduled reactivation has passed\".\n *\n * ⚠️ A value here is a PROMISE the framework keeps: the reactivation batch is what makes it\n * true. Persisting the date without that sweep would be the same defect as a verb that answers\n * success and writes nothing — an authored intention nothing honors.\n */\n // Deliberately NOT `.isAuditEvidence()`. The rationale that briefly sat here — \"lifecycle state\n // gates access as surely as roles do\" — is true of {@link status}, which is where it now lives.\n // This field decides nothing about what the principal may do; it is a scheduling detail, and the\n // transition's audit row already records the resulting status.\n scheduledReactivationAt: z.date().optional().isDBIndexed().excludeFromCreate().excludeFromUpdate(),\n // The person's role in the customer's organization — their working life, not this application's\n // authorization model (`roles` is that, and it is a closed vocabulary rather than personal data).\n // REMOVE on erasure — the person's role in the customer's organization is a fact about their working\n // life, which is why it carries PROFESSIONAL. Clearable (`.optional()`).\n userTitle: addImpersonalizeWith(\n z.string().max(100).optional().isDBIndexed().isSummaryField()\n .dataCategories(PersonalDataCategory.PROFESSIONAL),\n RedactionType.REMOVE,\n ),\n /**\n * The `User._id` of the org admin who issued the invite. Server-set by the invite\n * CREATE prefix from the execution-context actor; absent on direct/system\n * provisioning. Immutable. Feeds the audit trail and the user-facing \"invited by\"\n * cue in the pending-invitations inbox.\n *\n * PROVENANCE STAMP, NOT a navigable FK — deliberately a plain indexed string (same\n * idiom as `scim-tokens.createdByUserId`), NOT `.isForeignKey()`. The primary\n * member↔user link is `userId` (registered M2M relationship); adding `.isForeignKey()`\n * here would demand a SECOND `ORGANIZATION_MEMBERS → USERS` relationship (else the\n * registry warns \"cannot be resolved to a resource type\") and would graft nested-route /\n * parent-scope machinery onto a field that only records who clicked \"invite\". Resolve\n * the inviter's display name with a bounded lookup at render time if the cue needs it.\n */\n invitedByUserId: z.string().min(1).optional().isDBIndexed().excludeFromCreate().excludeFromUpdate(),\n /**\n * When the invite was issued. Server-set by the invite CREATE prefix; absent on\n * direct/system provisioning. Immutable. Used by the inbox ordering and the\n * expiry-reap CRON batch.\n */\n invitedAt: z.date().optional().isDBIndexed().excludeFromCreate().excludeFromUpdate(),\n /**\n * Present ⇒ this is a PROVIDER membership: held by an expert of a service firm through the client\n * organization's `SERVICE_PROVIDER_RELATIONSHIPS` row with this id, not by one of the organization's\n * own members (#1597). Test it with `isServiceProviderMembership`, never by hand.\n *\n * It changes what the row means everywhere the framework reads memberships: it confers authority ONLY\n * while the relationship passes the execution-context live filter; its `roles` are owned by the\n * relationship (generic UPDATE refuses them); it never counts toward the owner floor and cannot receive\n * ownership; it grants no user type; it is not part of the client's SCIM directory.\n *\n * System-written only — by the firm's assignment verb, which also re-points it when a row left by an\n * earlier relationship is reactivated. Indexed: \"who serves under this relationship\" is a query by it.\n * Not a foreign key edge on purpose: the live filter reads the relationship by id, and a navigable edge\n * would add nested routes onto a membership nobody needs to reach that way.\n */\n serviceProviderRelationshipId: z.string().min(1).optional().isDBIndexed().isSummaryField()\n .excludeFromCreate().excludeFromUpdate().isAuditEvidence(),\n /**\n * The firm whose expert holds this provider membership. A plain id: it names another tenant. The live\n * filter requires the member to hold an ACTIVE, ordinary membership there, in an organization that\n * still confers authority.\n */\n providerOrganizationId: z.string().min(1).optional().isDBIndexed().isSummaryField()\n .excludeFromCreate().excludeFromUpdate().isAuditEvidence(),\n /**\n * The firm's name as its relationship recorded it — what a client's directory shows as \"via {Firm}\".\n * A snapshot copied from the relationship at assignment, because a client can never read the firm's\n * organization row (#1597).\n */\n providerOrganizationName: z.string().max(200).optional().isSummaryField().excludeFromCreate().excludeFromUpdate(),\n /**\n * Computed instance label — the linked user's name, forwarded live from\n * `USER_PROFILES`. A junction row has no inherent name; its identity is the\n * related party. {@link forwardedLabel} resolves it SERVER-SIDE at read time\n * (joining `userId` → `USER_PROFILES.userId`, rendering `firstName lastName`)\n * and projects it onto the summary/read DTO via the virtual-field pipeline, so\n * the frontend label is a plain field ref (`getFrontendResourceLabel:\n * ['instanceLabel']`). Never stale (read live), never denormalized, tenant-safe\n * (a bounded system read over the userIds already on the org-scoped page). NOT\n * persisted (virtual). When the profile/name is unavailable it falls back to the\n * immutable {@link userEmail} (`fallbackField`) rather than a raw id.\n */\n instanceLabel: forwardedLabel({\n localField: 'userId',\n relatedResource: CoreResourceType.USER_PROFILES,\n relatedJoinField: 'userId',\n fields: ['firstName', 'lastName'],\n fallbackField: 'userEmail',\n }),\n createdAt: z.date().default(() => new Date()).optional().isDBIndexed().excludeFromCreate().excludeFromUpdate(),\n updatedAt: z.date().default(() => new Date()).optional().isDBIndexed().excludeFromCreate().excludeFromUpdate(),\n}).businessKeySet([\n 'userId',\n 'organizationId',\n]);\nexport type OrganizationMember = z.infer<typeof OrganizationMemberSchema>;\n"]}
1
+ {"version":3,"file":"organization-members.shared.schemas.js","sourceRoot":"","sources":["../../../src/organizations/organization-members.shared.schemas.ts"],"names":[],"mappings":"AACA;;;;GAIG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EAAE,cAAc,EAAE,cAAc,EAAE,MAAM,iDAAiD,CAAC;AACjG,OAAO,EAAE,cAAc,EAAE,MAAM,uCAAuC,CAAC;AACvE,OAAO,EAAE,gBAAgB,EAAE,MAAM,gDAAgD,CAAC;AAClF,OAAO,EAAE,oBAAoB,EAAE,MAAM,6DAA6D,CAAC;AACnG,OAAO,EAAE,aAAa,EAAE,MAAM,gDAAgD,CAAC;AAC/E,OAAO,EAAE,oBAAoB,EAAE,MAAM,0BAA0B,CAAC;AAGhE;;;;;;;;;;;;;;;;;;GAkBG;AACH,MAAM,CAAN,IAAY,wBAKX;AALD,WAAY,wBAAwB;IAClC,+CAAmB,CAAA;IACnB,6CAAiB,CAAA;IACjB,iDAAqB,CAAA;IACrB,mDAAuB,CAAA;AACzB,CAAC,EALW,wBAAwB,KAAxB,wBAAwB,QAKnC;AAED,MAAM,CAAC,MAAM,wBAAwB,GAAG,CAAC,CAAC,MAAM,CAAC;IAC/C,GAAG,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,YAAY,EAAE,CAAC,cAAc,EAAE;IACtD;;;;;;;;;;;;;;OAcG;IACH,gGAAgG;IAChG,gGAAgG;IAChG,4FAA4F;IAC5F,wFAAwF;IACxF,+FAA+F;IAC/F,gGAAgG;IAChG,mDAAmD;IACnD,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,C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AAC,WAAW,EAAE,CAAC,cAAc,EAAE;SAChF,iBAAiB,EAAE,CAAC,iBAAiB,EAAE,CAAC,eAAe,EAAE;IAC5D;;;;OAIG;IACH,wBAAwB,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,QAAQ,EAAE,CAAC,cAAc,EAAE,CAAC,iBAAiB,EAAE,CAAC,iBAAiB,EAAE;IACjH;;;;;;;;;;;OAWG;IACH,aAAa,EAAE,cAAc,CAAC;QAC5B,UAAU,EAAE,QAAQ;QACpB,eAAe,EAAE,gBAAgB,CAAC,aAAa;QAC/C,gBAAgB,EAAE,QAAQ;QAC1B,MAAM,EAAE,CAAC,WAAW,EAAE,UAAU,CAAC;QACjC,aAAa,EAAE,WAAW;KAC3B,CAAC;IACF,SAAS,EAAE,CAAC,CAAC,IAAI,EAAE,CAAC,OAAO,CAAC,GAAG,EAAE,CAAC,IAAI,IAAI,EAAE,CAAC,CAAC,QAAQ,EAAE,CAAC,WAAW,EAAE,CAAC,iBAAiB,EAAE,CAAC,iBAAiB,EAAE;IAC9G,SAAS,EAAE,CAAC,CAAC,IAAI,EAAE,CAAC,OAAO,CAAC,GAAG,EAAE,CAAC,IAAI,IAAI,EAAE,CAAC,CAAC,QAAQ,EAAE,CAAC,WAAW,EAAE,CAAC,iBAAiB,EAAE,CAAC,iBAAiB,EAAE;CAC/G,CAAC,CAAC,cAAc,CAAC;IAChB,QAAQ;IACR,gBAAgB;CACjB,CAAC,CAAC","sourcesContent":["\n/**\n * Organization Member Shared Schemas\n * \n * Junction entity between users and organizations with roles and permissions\n */\n\nimport { z } from 'zod';\n\nimport { CORE_ORG_ROLES, OrgRolesSchema } from '../security/authorizations/roles.shared.schemas';\nimport { forwardedLabel } from '../resources/resources.shared.schemas';\nimport { CoreResourceType } from '../resources/resources.shared.core.definitions';\nimport { PersonalDataCategory } from '../compliance/privacy/personal-data-category.shared.schemas';\nimport { RedactionType } from '../compliance/privacy/redaction.shared.schemas';\nimport { addImpersonalizeWith } from '@wildo-ai/zod-decorators';\n\n\n/**\n * Organization member lifecycle status.\n *\n * A membership row IS the invitation — there is no separate invitation\n * collection. `INVITED` is the pending-membership state; acceptance flips it to\n * `ACTIVE` on the SAME row (stable `_id`, so the emailed accept-link token never\n * orphans). SSO JIT / SCIM provisioning find-or-activate an existing `INVITED`\n * row rather than blind-creating a second `ACTIVE` one.\n *\n * - `INVITED` — membership extended, invitee has not yet accepted. Paired with a\n * `User` in `PENDING_INVITATION` status when the invitee has no account yet.\n * - `ACTIVE` — accepted / directly provisioned membership.\n * - `INACTIVE` — deactivated (e.g. SCIM deprovision).\n * - `SUSPENDED` — temporarily suspended (optionally time-boxed).\n *\n * Invite OUTCOMES (declined / revoked / expired) are NOT statuses — the row is\n * deleted and the event recorded in the audit trail (keeps this enum about\n * membership, not invitation bookkeeping).\n */\nexport enum OrganizationMemberStatus {\n INVITED = 'INVITED',\n ACTIVE = 'ACTIVE',\n INACTIVE = 'INACTIVE',\n SUSPENDED = 'SUSPENDED'\n}\n\nexport const OrganizationMemberSchema = z.object({\n _id: z.string().min(1).isPrimaryKey().isSummaryField(),\n /**\n * FK to the member `User`. ALWAYS present on a persisted row (a membership with\n * no member is meaningless) — even an `INVITED` invitee has an eagerly-created\n * `User` in `PENDING_INVITATION` status, so this FK is never null.\n *\n * SERVER-INJECTED on create (`.excludeFromCreate()`), via one of two paths:\n * - Invite (org-admin CREATE): the admin supplies {@link userEmail} instead;\n * the CREATE prefix find-or-creates the user by normalized email and injects\n * the resolved `_id` here (email is the strict unique identity anchor — see\n * `User.email.isUnique()`).\n * - System provisioning (invite-acceptance / SSO JIT / SCIM): passes `userId`\n * directly through `createAsSystem`, which re-attaches this context FK past\n * the strict-DTO strip.\n * `.excludeFromUpdate()` keeps the member↔user binding immutable.\n */\n // `labelFallbackField` names the readable copy this row already carries, for when the reference\n // cannot be resolved. `userEmail` below is `.isHidden({ display: true })` on the stated grounds\n // that \"the user-facing email is surfaced by resolving the `userId` reference\" — and for an\n // INVITED person that resolution has nothing to build a label from, because there is no\n // `USER_PROFILE` yet. Measured 2026-09-19 on the member directory: three of four rows rendered\n // `6aaba6b3a2d3b6b0ad61f33e`, the fourth (a real user) rendered their name. The copy was on the\n // row the whole time; nothing was reaching for it.\n userId: z.string().min(1).isDBIndexed().isForeignKey().isSummaryField().excludeFromCreate().excludeFromUpdate()\n .foreignKeyUI({ display: { labelFallbackField: 'userEmail' } }),\n /**\n * The linked user's email — DUAL ROLE:\n *\n * 1. INVITE CREATE INPUT. On the org-admin invite CREATE the admin supplies\n * an email (not a `userId`); the CREATE prefix normalizes it, find-or-creates\n * the `User` by it (unique identity anchor), and derives {@link userId}. This\n * is why the field is client-writable on CREATE (no `.excludeFromCreate()`).\n * 2. DENORMALIZED IMMUTABLE COPY. After creation it is the immutable mirror of\n * `USERS.email` (which is `.excludeFromUpdate()`, so this copy never drifts).\n * It feeds member SEARCH (`searchableFields: ['userEmail']` — no async hop)\n * and the {@link instanceLabel} fallback when the related profile/name is\n * unavailable (e.g. a `PENDING_INVITATION` invitee has no `USER_PROFILE` yet).\n *\n * For system creates (SSO/SCIM/acceptance) that pass `userId` instead of an\n * email, the CREATE prefix DERIVES this value from the authoritative user record,\n * so it is `.optional()` at the input boundary. `.excludeFromUpdate()` keeps it\n * immutable post-creation. `.isHidden({ display: true })` keeps it out of\n * auto-rendered display cards/columns (the user-facing email is surfaced by\n * resolving the `userId` reference) — it still renders on the CREATE form.\n */\n // REMOVE on erasure. A denormalized copy of the person's email, held here so a membership row can be\n // read without resolving the user — which is exactly what makes it personal data this row HOLDS rather\n // than a link it carries. Clearable (`.optional()`), so REMOVE resolves to a removed key.\n //\n // `roles` beside it is deliberately NOT scrubbed: it is this application's authorization vocabulary,\n // not personal data, and emptying it could strand a tenant with no administrator — the interaction the\n // administrative-continuity floors exist to refuse. Keeping it means that interaction never arises.\n userEmail: addImpersonalizeWith(\n z.email().optional().isDBIndexed().isSummaryField().isHidden({ display: true }).excludeFromUpdate()\n .dataCategories(PersonalDataCategory.CONTACT_DETAILS),\n RedactionType.REMOVE,\n ),\n organizationId: z.string().min(1).isDBIndexed().isForeignKey().isSummaryField().excludeFromUpdate(),\n /*\n * `organizationUnitsMembership` (an embedded `[{ organizationUnitId, role }]` array) was REMOVED\n * here on 2026-07-31 and promoted to the `ORGANIZATION_UNIT_MEMBERS` junction resource\n * (plan decision D-B5). The array could not be queried portably — a dot-path filter into an\n * array field resolves to NULL on PostgreSQL and the LIST summary projection strips the field —\n * so every \"who is assigned to this unit?\" question failed OPEN, it could not carry a registered\n * relationship (no cascade), and it admitted two conflicting roles for the same unit. Read unit\n * assignments through `ORGANIZATION_UNIT_MEMBERS` filtered by `organizationMemberId`.\n */\n // `.isAuditEvidence()` — this member's authority INSIDE the organization. Roles are the\n // framework's single authorization axis, so a change here is an access-control decision and the\n // before/after sets ARE the evidence: a trail that records only \"roles changed\" proves nothing\n // about what authority resulted. Safe to record in full — a role name is vocabulary, not personal\n // data, so it carries no erasure obligation into the immutable audit ledger.\n // assurance-control: WILDO.ACCESS.PRIVILEGE_EVIDENCE\n roles: z.array(OrgRolesSchema).default([CORE_ORG_ROLES.ORG_MEMBER]).isDBIndexed().isSummaryField().isAuditEvidence(),\n /**\n * Server-owned lifecycle state. Default `ACTIVE` covers direct/system\n * provisioning (SSO JIT / SCIM / self-registration org-owner grant), while\n * the org-admin invite CREATE prefix forces `INVITED`.\n *\n * Neither CREATE nor generic UPDATE may accept this field from a client:\n * lifecycle transitions carry security side effects that a field update\n * cannot reproduce. In particular, invitation acceptance must validate and\n * consume the invitation token, grant the derived user type, and serialize\n * against revocation; suspension/reactivation likewise have dedicated\n * operations. Keeping status out of both DTOs makes those trusted transition\n * operations the only way to change it.\n */\n status: z.enum(OrganizationMemberStatus)\n .default(OrganizationMemberStatus.ACTIVE)\n .isDBIndexed()\n .isSummaryField()\n .excludeFromCreate()\n .excludeFromUpdate()\n // Lifecycle state gates access as surely as roles do — a SUSPENDED member is denied, an ACTIVE\n // one is not — so a suspension or reactivation is an authorization event and its before/after\n // values are the evidence. The enum's values are closed vocabulary, never personal data, so\n // recording them carries no GDPR Art. 17 obligation into the immutable ledger — the same\n // reasoning `UserSchema.status` records. Without this the framework's\n // `RESOURCE_OPERATION_PERFORMED` event notes only that `status` was among the changed fields,\n // never what it changed FROM or TO, which is the half an access review actually reads.\n // assurance-control: WILDO.ACCESS.PRIVILEGE_EVIDENCE\n .isAuditEvidence(),\n /**\n * When an automated sweep must return this membership to `ACTIVE`.\n *\n * Set by SUSPEND when the caller time-boxes the suspension (`suspensionEndDate` in that verb's\n * request contract), cleared by REACTIVATE. Absent means the suspension is indefinite and only a\n * deliberate REACTIVATE lifts it — which is the default, since an unbounded suspension is the\n * safer reading of \"suspend\".\n *\n * NAMED FOR THE EFFECT, NOT THE CAUSE. `scheduledReactivationAt` says what the system will do;\n * a `suspensionEndsAt` would describe only the suspension branch while the identical field on\n * `USERS` also serves self-service deactivation. One concept, one name across both resources,\n * so the reactivation sweep reads the same field everywhere. The request contracts keep their\n * own caller-facing vocabulary and the transition hook translates — the same split\n * `ORGANIZATION_UNITS` MOVE uses (`newParentUnitId` in, `parentUnitId` + `path` persisted).\n *\n * Server-owned on both sides (`.excludeFromCreate().excludeFromUpdate()`): only the transition\n * operations write it, exactly as for {@link status} above. Indexed because the sweep's whole\n * query is \"rows whose scheduled reactivation has passed\".\n *\n * ⚠️ A value here is a PROMISE the framework keeps: the reactivation batch is what makes it\n * true. Persisting the date without that sweep would be the same defect as a verb that answers\n * success and writes nothing — an authored intention nothing honors.\n */\n // Deliberately NOT `.isAuditEvidence()`. The rationale that briefly sat here — \"lifecycle state\n // gates access as surely as roles do\" — is true of {@link status}, which is where it now lives.\n // This field decides nothing about what the principal may do; it is a scheduling detail, and the\n // transition's audit row already records the resulting status.\n scheduledReactivationAt: z.date().optional().isDBIndexed().excludeFromCreate().excludeFromUpdate(),\n // The person's role in the customer's organization — their working life, not this application's\n // authorization model (`roles` is that, and it is a closed vocabulary rather than personal data).\n // REMOVE on erasure — the person's role in the customer's organization is a fact about their working\n // life, which is why it carries PROFESSIONAL. Clearable (`.optional()`).\n userTitle: addImpersonalizeWith(\n z.string().max(100).optional().isDBIndexed().isSummaryField()\n .dataCategories(PersonalDataCategory.PROFESSIONAL),\n RedactionType.REMOVE,\n ),\n /**\n * The `User._id` of the org admin who issued the invite. Server-set by the invite\n * CREATE prefix from the execution-context actor; absent on direct/system\n * provisioning. Immutable. Feeds the audit trail and the user-facing \"invited by\"\n * cue in the pending-invitations inbox.\n *\n * PROVENANCE STAMP, NOT a navigable FK — deliberately a plain indexed string (same\n * idiom as `scim-tokens.createdByUserId`), NOT `.isForeignKey()`. The primary\n * member↔user link is `userId` (registered M2M relationship); adding `.isForeignKey()`\n * here would demand a SECOND `ORGANIZATION_MEMBERS → USERS` relationship (else the\n * registry warns \"cannot be resolved to a resource type\") and would graft nested-route /\n * parent-scope machinery onto a field that only records who clicked \"invite\". Resolve\n * the inviter's display name with a bounded lookup at render time if the cue needs it.\n */\n invitedByUserId: z.string().min(1).optional().isDBIndexed().excludeFromCreate().excludeFromUpdate(),\n /**\n * When the invite was issued. Server-set by the invite CREATE prefix; absent on\n * direct/system provisioning. Immutable. Used by the inbox ordering and the\n * expiry-reap CRON batch.\n */\n invitedAt: z.date().optional().isDBIndexed().excludeFromCreate().excludeFromUpdate(),\n /**\n * Present ⇒ this is a PROVIDER membership: held by an expert of a service firm through the client\n * organization's `SERVICE_PROVIDER_RELATIONSHIPS` row with this id, not by one of the organization's\n * own members (#1597). Test it with `isServiceProviderMembership`, never by hand.\n *\n * It changes what the row means everywhere the framework reads memberships: it confers authority ONLY\n * while the relationship passes the execution-context live filter; its `roles` are owned by the\n * relationship (generic UPDATE refuses them); it never counts toward the owner floor and cannot receive\n * ownership; it grants no user type; it is not part of the client's SCIM directory.\n *\n * System-written only — by the firm's assignment verb, which also re-points it when a row left by an\n * earlier relationship is reactivated. Indexed: \"who serves under this relationship\" is a query by it.\n * Not a foreign key edge on purpose: the live filter reads the relationship by id, and a navigable edge\n * would add nested routes onto a membership nobody needs to reach that way.\n */\n serviceProviderRelationshipId: z.string().min(1).optional().isDBIndexed().isSummaryField()\n .excludeFromCreate().excludeFromUpdate().isAuditEvidence(),\n /**\n * The firm whose expert holds this provider membership. A plain id: it names another tenant. The live\n * filter requires the member to hold an ACTIVE, ordinary membership there, in an organization that\n * still confers authority.\n */\n providerOrganizationId: z.string().min(1).optional().isDBIndexed().isSummaryField()\n .excludeFromCreate().excludeFromUpdate().isAuditEvidence(),\n /**\n * The firm's name as its relationship recorded it — what a client's directory shows as \"via {Firm}\".\n * A snapshot copied from the relationship at assignment, because a client can never read the firm's\n * organization row (#1597).\n */\n providerOrganizationName: z.string().max(200).optional().isSummaryField().excludeFromCreate().excludeFromUpdate(),\n /**\n * Computed instance label — the linked user's name, forwarded live from\n * `USER_PROFILES`. A junction row has no inherent name; its identity is the\n * related party. {@link forwardedLabel} resolves it SERVER-SIDE at read time\n * (joining `userId` → `USER_PROFILES.userId`, rendering `firstName lastName`)\n * and projects it onto the summary/read DTO via the virtual-field pipeline, so\n * the frontend label is a plain field ref (`getFrontendResourceLabel:\n * ['instanceLabel']`). Never stale (read live), never denormalized, tenant-safe\n * (a bounded system read over the userIds already on the org-scoped page). NOT\n * persisted (virtual). When the profile/name is unavailable it falls back to the\n * immutable {@link userEmail} (`fallbackField`) rather than a raw id.\n */\n instanceLabel: forwardedLabel({\n localField: 'userId',\n relatedResource: CoreResourceType.USER_PROFILES,\n relatedJoinField: 'userId',\n fields: ['firstName', 'lastName'],\n fallbackField: 'userEmail',\n }),\n createdAt: z.date().default(() => new Date()).optional().isDBIndexed().excludeFromCreate().excludeFromUpdate(),\n updatedAt: z.date().default(() => new Date()).optional().isDBIndexed().excludeFromCreate().excludeFromUpdate(),\n}).businessKeySet([\n 'userId',\n 'organizationId',\n]);\nexport type OrganizationMember = z.infer<typeof OrganizationMemberSchema>;\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"organization-notifications.shared.resources-config.schemas.d.ts","sourceRoot":"","sources":["../../../../src/organizations/organization-notifications.shared.resources-config.schemas.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAIxB,OAAO,EAAE,qBAAqB,EAAE,MAAM,gDAAgD,CAAC;AACvF,OAAO,EAAoD,oBAAoB,EAAE,MAAM,uCAAuC,CAAC;AAS/H,KAAK,uCAAuC,GACxC,qBAAqB,CAAC,IAAI,GAC1B,qBAAqB,CAAC,MAAM,GAC5B,qBAAqB,CAAC,MAAM,GAC5B,qBAAqB,CAAC,MAAM,CAAC;AAKjC,eAAO,MAAM,oEAAoE,GAAI,wBAAwB,oBAAoB,EAAE;;;;;;;;;;;;;;;;kBAmGjI,CAAC"}
1
+ {"version":3,"file":"organization-notifications.shared.resources-config.schemas.d.ts","sourceRoot":"","sources":["../../../src/organizations/organization-notifications.shared.resources-config.schemas.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAIxB,OAAO,EAAE,qBAAqB,EAAE,MAAM,gDAAgD,CAAC;AACvF,OAAO,EAAoD,oBAAoB,EAAE,MAAM,uCAAuC,CAAC;AAS/H,KAAK,uCAAuC,GACxC,qBAAqB,CAAC,IAAI,GAC1B,qBAAqB,CAAC,MAAM,GAC5B,qBAAqB,CAAC,MAAM,GAC5B,qBAAqB,CAAC,MAAM,CAAC;AAKjC,eAAO,MAAM,oEAAoE,GAAI,wBAAwB,oBAAoB,EAAE;;;;;;;;;;;;;;;;kBAmGjI,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"organization-notifications.shared.resources-config.schemas.js","sourceRoot":"","sources":["../../../../src/organizations/organization-notifications.shared.resources-config.schemas.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAGH,OAAO,EACL,+BAA+B,EAChC,MAAM,6CAA6C,CAAC;AACrD,OAAO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;aACF;SACF;KACF;CACF,CAAC,CAAC","sourcesContent":["/**\n * Organization Notifications Shared Resource Configuration\n *\n * Resource configuration for organization notification preferences.\n * App-focused management for notification settings and preferences.\n */\n\nimport { z } from 'zod';\nimport {\n OrganizationNotificationsSchema\n} from './organization-notifications.shared.schemas';\nimport { CoreResourceOperation } from '../resources/resources.shared.core.definitions';\nimport { ResourceOperationRiskLevel, ResourcePrimaryScope, ResourceRelationship } from '../resources/resources.shared.schemas';\nimport { CoreResourceType, coreResourceShared_FieldIdentifier } from '../resources/resources.shared.core.definitions';\nimport { ResourceOperationVariantType } from '../resources/resources.shared.schemas';\nimport { CoreUserNotificationTarget, CoreUserNotificationChannel } from '../notifications/notifications.shared.schemas';\nimport { createResourceConfiguration_Initialization } from '../resources/resources-config.shared.factory';\nimport { ResourceSystemAccessMode } from '../resources/resources-config.shared.schemas';\n\nimport { CORE_ORG_ROLES } from '../security/authorizations/roles.shared.schemas';\n\ntype OrganizationNotificationsCoreOperations =\n | CoreResourceOperation.READ\n | CoreResourceOperation.CREATE\n | CoreResourceOperation.UPDATE\n | CoreResourceOperation.DELETE;\n\n/*\nOrganization Notifications Resource Configuration Factory\n*/\nexport const organizationNotificationsResourceConfiguration_InitializationFactory = (resourcesRelationships: ResourceRelationship[]) => createResourceConfiguration_Initialization<\n undefined,\n OrganizationNotificationsCoreOperations,\n typeof OrganizationNotificationsSchema\n>({\n mainSchema: OrganizationNotificationsSchema,\n resourceIdentifier: CoreResourceType.ORGANIZATION_NOTIFICATIONS,\n resourceFieldIdentifier: coreResourceShared_FieldIdentifier[CoreResourceType.ORGANIZATION_NOTIFICATIONS],\n resourceRelationships: resourcesRelationships,\n isSystemResource: true,\n\n // Eager composition seeding: the ORGANIZATIONS → ORGANIZATION_NOTIFICATIONS\n // relationship declares `onParentCreate.enabled`, so a default notifications\n // row (its `emailNotifications` block materialized to interior defaults) is\n // written via `createAsSystem` on organization creation (fixes the latent\n // missing-row gap — org notifications were never hand-seeded). Guard-1 is\n // fail-closed by omission, so the system seed requires this explicit CREATE\n // opt-in; the INTERNAL_CALL CREATE variant below is the isDefault path the\n // seed resolves.\n systemAccessPolicy: { create: ResourceSystemAccessMode.ALLOWED },\n\n coreOperations: [\n CoreResourceOperation.READ,\n CoreResourceOperation.CREATE,\n CoreResourceOperation.UPDATE,\n // DELETE is REPOSITORY_ONLY (no HTTP route): powers the composition\n // onParentDelete cascade so the eager-seeded notifications row is physically\n // removed when its owning organization is deleted. Without it the cascade\n // throws ErrorType.CONFIGURATION on any org that has a notifications row.\n CoreResourceOperation.DELETE,\n ],\n\n operationsConfiguration: {\n\n [CoreResourceOperation.READ]: {\n variants: [\n {\n variantType: ResourceOperationVariantType.API_CALL,\n isDefault: true,\n roles: [CORE_ORG_ROLES.ORG_MEMBER],\n riskLevel: ResourceOperationRiskLevel.LOW,\n }\n ]\n },\n [CoreResourceOperation.CREATE]: {\n variants: [\n {\n // INTERNAL_CALL (NOT REPOSITORY_ONLY): the onParentCreate seed calls\n // `createAsSystem`, which resolves the default CREATE op through the\n // SERVICE tier (`getServiceOperationPathDefault`). That resolver accepts\n // only INTERNAL_CALL / API_CALL(_WITH_CALLBACK) — a REPOSITORY_ONLY CREATE\n // is invisible to it, so the seed throws OPERATION_PATH_NOT_FOUND and is\n // swallowed (silent missing row). INTERNAL_CALL is the service-layer\n // internal transport (no HTTP route) — the correct tier for a system seed.\n // (DELETE stays REPOSITORY_ONLY: the onParentDelete cascade deletes via the\n // repository tier, which is variant-agnostic. See composition-oncreate plan.)\n variantType: ResourceOperationVariantType.INTERNAL_CALL,\n isDefault: true,\n roles: [CORE_ORG_ROLES.ORG_ADMIN],\n riskLevel: ResourceOperationRiskLevel.LOW,\n }\n ]\n },\n\n [CoreResourceOperation.UPDATE]: {\n variants: [\n {\n variantType: ResourceOperationVariantType.API_CALL,\n isDefault: true,\n roles: [CORE_ORG_ROLES.ORG_ADMIN],\n riskLevel: ResourceOperationRiskLevel.LOW,\n // requestDto auto-derived from decorators\n }\n ],\n userNotifications: [\n {\n target: CoreUserNotificationTarget.USER_SELF,\n channel: CoreUserNotificationChannel.FRONT_END_SUCCESS,\n }\n ]\n },\n\n // Internal-only (REPOSITORY_ONLY, no HTTP route): powers the composition\n // onParentDelete cascade so this eager-seeded notifications row is physically\n // removed when its owning organization is deleted. Without a DELETE op the\n // cascade (deleteChildrenImmediate) throws ErrorType.CONFIGURATION — the row\n // is seeded on org create, so every org has one. ORG_ADMIN/HIGH: the org-scope\n // admin tier for a privileged teardown. See composition-oncreate-lifecycle plan.\n [CoreResourceOperation.DELETE]: {\n variants: [\n {\n variantType: ResourceOperationVariantType.REPOSITORY_ONLY,\n isDefault: true,\n roles: [CORE_ORG_ROLES.ORG_ADMIN],\n riskLevel: ResourceOperationRiskLevel.HIGH,\n }\n ],\n }\n },\n});\n"]}
1
+ {"version":3,"file":"organization-notifications.shared.resources-config.schemas.js","sourceRoot":"","sources":["../../../src/organizations/organization-notifications.shared.resources-config.schemas.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAGH,OAAO,EACL,+BAA+B,EAChC,MAAM,6CAA6C,CAAC;AACrD,OAAO,EAAE,qBAAqB,EAAE,MAAM,gDAAgD,CAAC;AACvF,OAAO,EAAE,0BAA0B,EAA8C,MAAM,uCAAuC,CAAC;AAC/H,OAAO,EAAE,gBAAgB,EAAE,kCAAkC,EAAE,MAAM,gDAAgD,CAAC;AACtH,OAAO,EAAE,4BAA4B,EAAE,MAAM,uCAAuC,CAAC;AACrF,OAAO,EAAE,0BAA0B,EAAE,2BAA2B,EAAE,MAAM,+CAA+C,CAAC;AACxH,OAAO,EAAE,0CAA0C,EAAE,MAAM,8CAA8C,CAAC;AAC1G,OAAO,EAAE,wBAAwB,EAAE,MAAM,8CAA8C,CAAC;AAExF,OAAO,EAAE,cAAc,EAAE,MAAM,iDAAiD,CAAC;AAQjF;;EAEE;AACF,MAAM,CAAC,MAAM,oEAAoE,GAAG,CAAC,sBAA8C,EAAE,EAAE,CAAC,0CAA0C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;QAED,CAAC,qBAAqB,CAAC,MAAM,CAAC,EAAE;YAC9B,QAAQ,EAAE;gBACR;oBACE,WAAW,EAAE,4BAA4B,CAAC,QAAQ;oBAClD,SAAS,EAAE,IAAI;oBACf,KAAK,EAAE,CAAC,cAAc,CAAC,SAAS,CAAC;oBACjC,SAAS,EAAE,0BAA0B,CAAC,GAAG;oBACzC,0CAA0C;iBAC3C;aACF;YACD,iBAAiB,EAAE;gBACjB;oBACE,MAAM,EAAE,0BAA0B,CAAC,SAAS;oBAC5C,OAAO,EAAE,2BAA2B,CAAC,iBAAiB;iBACvD;aACF;SACF;QAED,yEAAyE;QACzE,8EAA8E;QAC9E,2EAA2E;QAC3E,6EAA6E;QAC7E,+EAA+E;QAC/E,iFAAiF;QACjF,CAAC,qBAAqB,CAAC,MAAM,CAAC,EAAE;YAC9B,QAAQ,EAAE;gBACR;oBACE,WAAW,EAAE,4BAA4B,CAAC,eAAe;oBACzD,SAAS,EAAE,IAAI;oBACf,KAAK,EAAE,CAAC,cAAc,CAAC,SAAS,CAAC;oBACjC,SAAS,EAAE,0BAA0B,CAAC,IAAI;iBAC3C;aACF;SACF;KACF;CACF,CAAC,CAAC","sourcesContent":["/**\n * Organization Notifications Shared Resource Configuration\n *\n * Resource configuration for organization notification preferences.\n * App-focused management for notification settings and preferences.\n */\n\nimport { z } from 'zod';\nimport {\n OrganizationNotificationsSchema\n} from './organization-notifications.shared.schemas';\nimport { CoreResourceOperation } from '../resources/resources.shared.core.definitions';\nimport { ResourceOperationRiskLevel, ResourcePrimaryScope, ResourceRelationship } from '../resources/resources.shared.schemas';\nimport { CoreResourceType, coreResourceShared_FieldIdentifier } from '../resources/resources.shared.core.definitions';\nimport { ResourceOperationVariantType } from '../resources/resources.shared.schemas';\nimport { CoreUserNotificationTarget, CoreUserNotificationChannel } from '../notifications/notifications.shared.schemas';\nimport { createResourceConfiguration_Initialization } from '../resources/resources-config.shared.factory';\nimport { ResourceSystemAccessMode } from '../resources/resources-config.shared.schemas';\n\nimport { CORE_ORG_ROLES } from '../security/authorizations/roles.shared.schemas';\n\ntype OrganizationNotificationsCoreOperations =\n | CoreResourceOperation.READ\n | CoreResourceOperation.CREATE\n | CoreResourceOperation.UPDATE\n | CoreResourceOperation.DELETE;\n\n/*\nOrganization Notifications Resource Configuration Factory\n*/\nexport const organizationNotificationsResourceConfiguration_InitializationFactory = (resourcesRelationships: ResourceRelationship[]) => createResourceConfiguration_Initialization<\n undefined,\n OrganizationNotificationsCoreOperations,\n typeof OrganizationNotificationsSchema\n>({\n mainSchema: OrganizationNotificationsSchema,\n resourceIdentifier: CoreResourceType.ORGANIZATION_NOTIFICATIONS,\n resourceFieldIdentifier: coreResourceShared_FieldIdentifier[CoreResourceType.ORGANIZATION_NOTIFICATIONS],\n resourceRelationships: resourcesRelationships,\n isSystemResource: true,\n\n // Eager composition seeding: the ORGANIZATIONS → ORGANIZATION_NOTIFICATIONS\n // relationship declares `onParentCreate.enabled`, so a default notifications\n // row (its `emailNotifications` block materialized to interior defaults) is\n // written via `createAsSystem` on organization creation (fixes the latent\n // missing-row gap — org notifications were never hand-seeded). Guard-1 is\n // fail-closed by omission, so the system seed requires this explicit CREATE\n // opt-in; the INTERNAL_CALL CREATE variant below is the isDefault path the\n // seed resolves.\n systemAccessPolicy: { create: ResourceSystemAccessMode.ALLOWED },\n\n coreOperations: [\n CoreResourceOperation.READ,\n CoreResourceOperation.CREATE,\n CoreResourceOperation.UPDATE,\n // DELETE is REPOSITORY_ONLY (no HTTP route): powers the composition\n // onParentDelete cascade so the eager-seeded notifications row is physically\n // removed when its owning organization is deleted. Without it the cascade\n // throws ErrorType.CONFIGURATION on any org that has a notifications row.\n CoreResourceOperation.DELETE,\n ],\n\n operationsConfiguration: {\n\n [CoreResourceOperation.READ]: {\n variants: [\n {\n variantType: ResourceOperationVariantType.API_CALL,\n isDefault: true,\n roles: [CORE_ORG_ROLES.ORG_MEMBER],\n riskLevel: ResourceOperationRiskLevel.LOW,\n }\n ]\n },\n [CoreResourceOperation.CREATE]: {\n variants: [\n {\n // INTERNAL_CALL (NOT REPOSITORY_ONLY): the onParentCreate seed calls\n // `createAsSystem`, which resolves the default CREATE op through the\n // SERVICE tier (`getServiceOperationPathDefault`). That resolver accepts\n // only INTERNAL_CALL / API_CALL(_WITH_CALLBACK) — a REPOSITORY_ONLY CREATE\n // is invisible to it, so the seed throws OPERATION_PATH_NOT_FOUND and is\n // swallowed (silent missing row). INTERNAL_CALL is the service-layer\n // internal transport (no HTTP route) — the correct tier for a system seed.\n // (DELETE stays REPOSITORY_ONLY: the onParentDelete cascade deletes via the\n // repository tier, which is variant-agnostic. See composition-oncreate plan.)\n variantType: ResourceOperationVariantType.INTERNAL_CALL,\n isDefault: true,\n roles: [CORE_ORG_ROLES.ORG_ADMIN],\n riskLevel: ResourceOperationRiskLevel.LOW,\n }\n ]\n },\n\n [CoreResourceOperation.UPDATE]: {\n variants: [\n {\n variantType: ResourceOperationVariantType.API_CALL,\n isDefault: true,\n roles: [CORE_ORG_ROLES.ORG_ADMIN],\n riskLevel: ResourceOperationRiskLevel.LOW,\n // requestDto auto-derived from decorators\n }\n ],\n userNotifications: [\n {\n target: CoreUserNotificationTarget.USER_SELF,\n channel: CoreUserNotificationChannel.FRONT_END_SUCCESS,\n }\n ]\n },\n\n // Internal-only (REPOSITORY_ONLY, no HTTP route): powers the composition\n // onParentDelete cascade so this eager-seeded notifications row is physically\n // removed when its owning organization is deleted. Without a DELETE op the\n // cascade (deleteChildrenImmediate) throws ErrorType.CONFIGURATION — the row\n // is seeded on org create, so every org has one. ORG_ADMIN/HIGH: the org-scope\n // admin tier for a privileged teardown. See composition-oncreate-lifecycle plan.\n [CoreResourceOperation.DELETE]: {\n variants: [\n {\n variantType: ResourceOperationVariantType.REPOSITORY_ONLY,\n isDefault: true,\n roles: [CORE_ORG_ROLES.ORG_ADMIN],\n riskLevel: ResourceOperationRiskLevel.HIGH,\n }\n ],\n }\n },\n});\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"organization-notifications.shared.schemas.d.ts","sourceRoot":"","sources":["../../../../src/organizations/organization-notifications.shared.schemas.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB;;;;;;;;GAQG;AACH,eAAO,MAAM,oCAAoC;;;;;;;;;;iBAiC/C,CAAC;AACH,MAAM,MAAM,8BAA8B,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,oCAAoC,CAAC,CAAC;AAElG,eAAO,MAAM,+BAA+B;;;;;;;;;;;;;;;;iBAoB1C,CAAC;AACH,MAAM,MAAM,yBAAyB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,+BAA+B,CAAC,CAAC"}
1
+ {"version":3,"file":"organization-notifications.shared.schemas.d.ts","sourceRoot":"","sources":["../../../src/organizations/organization-notifications.shared.schemas.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB;;;;;;;;GAQG;AACH,eAAO,MAAM,oCAAoC;;;;;;;;;;iBAiC/C,CAAC;AACH,MAAM,MAAM,8BAA8B,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,oCAAoC,CAAC,CAAC;AAElG,eAAO,MAAM,+BAA+B;;;;;;;;;;;;;;;;iBAoB1C,CAAC;AACH,MAAM,MAAM,yBAAyB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,+BAA+B,CAAC,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"organization-notifications.shared.schemas.js","sourceRoot":"","sources":["../../../../src/organizations/organization-notifications.shared.schemas.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB;;;;;;;;GAQG;AACH,MAAM,CAAC,MAAM,oCAAoC,GAAG,CAAC,CAAC,MAAM,CAAC;IAC3D;;;;;;;;;;;;;;;;;OAiBG;IACH,mBAAmB,EAAE,CA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AAC,CAAC,CAAC,WAAW,EAAE,CAAC,QAAQ,EAAE,CAAC,YAAY,EAAE,CAAC,cAAc,EAAE,CAAC,iBAAiB,EAAE;IAE9G,6FAA6F;IAC7F,4EAA4E;IAC5E,+EAA+E;IAC/E,0EAA0E;IAC1E,kDAAkD;IAClD,kBAAkB,EAAE,oCAAoC;SACrD,OAAO,CAAC,oCAAoC,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC;SACvD,cAAc,EAAE;IAEnB,eAAe;IACf,SAAS,EAAE,CAAC,CAAC,IAAI,EAAE,CAAC,OAAO,CAAC,GAAG,EAAE,CAAC,IAAI,IAAI,EAAE,CAAC,CAAC,WAAW,EAAE,CAAC,iBAAiB,EAAE,CAAC,iBAAiB,EAAE;IACnG,SAAS,EAAE,CAAC,CAAC,IAAI,EAAE,CAAC,OAAO,CAAC,GAAG,EAAE,CAAC,IAAI,IAAI,EAAE,CAAC,CAAC,WAAW,EAAE,CAAC,iBAAiB,EAAE,CAAC,iBAAiB,EAAE;CACpG,CAAC,CAAC","sourcesContent":["/**\n * Organization Notifications Shared Schemas\n * \n * Notification preferences and settings.\n * Separated from core organization for performance optimization.\n */\n\nimport { z } from 'zod';\n\n/**\n * Per-category notification routing block for an organization.\n *\n * Every interior field is optional (the routing addresses) or carries a\n * `.default(...)` (the category opt-in booleans), so the object is fully\n * materializable from `{}`. Extracted as a named schema so\n * {@link OrganizationNotificationsSchema} can default it via the Zod-4-safe\n * `Schema.default(Schema.parse({}))` idiom — see the `emailNotifications` field.\n */\nexport const OrganizationEmailNotificationsSchema = z.object({\n /**\n * Where a tenant's organization-flavoured email goes, and whether it goes at all. READ by the\n * notification dispatcher since 2026-09-08 (#410).\n *\n * It was read by NOTHING before that. The record was seeded by apps-manager at provisioning,\n * rendered and edited through the organizations preset and audited, while organization-targeted\n * notifications resolved to member user ids by role and went to each member's own address — so a\n * tenant that filled this screen in changed nothing.\n *\n * The category a notification belongs to is DERIVED from its target: the notification-target\n * vocabulary and these four categories line up one-for-one, so a per-notification declaration\n * would only be a place for the two to disagree. `ORGANIZATION_USERS` is deliberately outside the\n * mapping — it fans out to every member by design, and routing it to one address would change who\n * the message is FOR rather than where it lands.\n *\n * An address REPLACES the member fan-out rather than adding to it: a tenant routing security mail\n * to a SOC address is saying where it goes, not asking for a copy.\n */\n defaultEmailAddress: z.email().optional().isSummaryField().describe(\"Email address that receives the notification emails addressed to the organization itself, and those of a category (billing, security, administrative, user management) that has no address of its own. When set, these emails go to this address instead of to the members who would otherwise receive them. Emails meant for every member are always sent to each member.\"),\n billingAddress: z.email().optional().describe(\"Email address that receives the organization's billing notification emails instead of its members; when unset, `defaultEmailAddress` is used. It is also given to the payment provider as the customer email when the organization's billing account is created.\"),\n securityAddress: z.email().optional().describe(\"Email address that receives the organization's security notification emails instead of its members; when unset, `defaultEmailAddress` is used.\"),\n administrativeAddress: z.email().optional().describe(\"Email address that receives the organization's administrative notification emails instead of its members; when unset, `defaultEmailAddress` is used.\"),\n usersManagementAddress: z.email().optional().describe(\"Email address that receives the organization's user-management notification emails instead of its members; when unset, `defaultEmailAddress` is used.\"),\n\n /**\n * Category opt-ins. A `false` SUPPRESSES that category entirely — for the members too, not only\n * for the routing address — because a tenant turning billing notifications off means it.\n */\n billing: z.boolean().default(true).describe(\"When false, the organization's billing notification emails are not sent at all, neither to `billingAddress` nor to members. Emails only; in-app notifications are unaffected. Defaults to true.\"),\n administrative: z.boolean().default(true).describe(\"When false, the organization's administrative notification emails are not sent at all, neither to `administrativeAddress` nor to members. Emails only; in-app notifications are unaffected. Defaults to true.\"),\n security: z.boolean().default(true).describe(\"When false, the organization's security notification emails are not sent at all, neither to `securityAddress` nor to members. Emails only; in-app notifications are unaffected. Defaults to true.\"),\n usersManagement: z.boolean().default(true).describe(\"When false, the organization's user-management notification emails are not sent at all, neither to `usersManagementAddress` nor to members. Emails only; in-app notifications are unaffected. Defaults to true.\"),\n});\nexport type OrganizationEmailNotifications = z.infer<typeof OrganizationEmailNotificationsSchema>;\n\nexport const OrganizationNotificationsSchema = z.object({\n _id: z.string().min(1).isPrimaryKey().isSummaryField(),\n // `.isUnique()` = idempotency backstop for onParentCreate seeding: the eager\n // `createAsSystem` seed on ORGANIZATIONS create writes one notifications row per\n // org; the unique index makes a re-fire (retry / replay) fail-closed instead of\n // duplicating.\n organizationId: z.string().min(1).isDBIndexed().isUnique().isForeignKey().isSummaryField().excludeFromUpdate(),\n\n // Email notification preferences. `.default(OrganizationEmailNotificationsSchema.parse({}))`\n // makes the block materialize to its interior defaults when omitted, so the\n // resource is default-seedable from its CREATE DTO + parent FK alone (required\n // by the onParentCreate lifecycle guard). The output type keeps the block\n // required, so downstream readers are unaffected.\n emailNotifications: OrganizationEmailNotificationsSchema\n .default(OrganizationEmailNotificationsSchema.parse({}))\n .isSummaryField(),\n\n // Audit fields\n createdAt: z.date().default(() => new Date()).isDBIndexed().excludeFromCreate().excludeFromUpdate(),\n updatedAt: z.date().default(() => new Date()).isDBIndexed().excludeFromCreate().excludeFromUpdate()\n});\nexport type OrganizationNotifications = z.infer<typeof OrganizationNotificationsSchema>;\n\n"]}
1
+ {"version":3,"file":"organization-notifications.shared.schemas.js","sourceRoot":"","sources":["../../../src/organizations/organization-notifications.shared.schemas.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB;;;;;;;;GAQG;AACH,MAAM,CAAC,MAAM,oCAAoC,GAAG,CAAC,CAAC,MAAM,CAAC;IAC3D;;;;;;;;;;;;;;;;;OAiBG;IACH,mBAAmB,EAAE,CAAC,CAAC,KAAK,EAAE,CAAC,QAAQ,EAAE,CAAC,cAAc,EAAE,CAAC,QAAQ,CAAC,4WAA4W,CAAC;IACjb,cAAc,EAAE,CAAC,CAAC,KAAK,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,kQAAkQ,CAAC;IACjT,eAAe,EAAE,CAAC,CAAC,KAAK,EAAE,CAAC,QAAQ,EAAE,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CAAC,EAAE,CAAC,CAAC;SACvD,cAAc,EAAE;IAEnB,eAAe;IACf,SAAS,EAAE,CAAC,CAAC,IAAI,EAAE,CAAC,OAAO,CAAC,GAAG,EAAE,CAAC,IAAI,IAAI,EAAE,CAAC,CAAC,WAAW,EAAE,CAAC,iBAAiB,EAAE,CAAC,iBAAiB,EAAE;IACnG,SAAS,EAAE,CAAC,CAAC,IAAI,EAAE,CAAC,OAAO,CAAC,GAAG,EAAE,CAAC,IAAI,IAAI,EAAE,CAAC,CAAC,WAAW,EAAE,CAAC,iBAAiB,EAAE,CAAC,iBAAiB,EAAE;CACpG,CAAC,CAAC","sourcesContent":["/**\n * Organization Notifications Shared Schemas\n * \n * Notification preferences and settings.\n * Separated from core organization for performance optimization.\n */\n\nimport { z } from 'zod';\n\n/**\n * Per-category notification routing block for an organization.\n *\n * Every interior field is optional (the routing addresses) or carries a\n * `.default(...)` (the category opt-in booleans), so the object is fully\n * materializable from `{}`. Extracted as a named schema so\n * {@link OrganizationNotificationsSchema} can default it via the Zod-4-safe\n * `Schema.default(Schema.parse({}))` idiom — see the `emailNotifications` field.\n */\nexport const OrganizationEmailNotificationsSchema = z.object({\n /**\n * Where a tenant's organization-flavoured email goes, and whether it goes at all. READ by the\n * notification dispatcher since 2026-09-08 (#410).\n *\n * It was read by NOTHING before that. The record was seeded by apps-manager at provisioning,\n * rendered and edited through the organizations preset and audited, while organization-targeted\n * notifications resolved to member user ids by role and went to each member's own address — so a\n * tenant that filled this screen in changed nothing.\n *\n * The category a notification belongs to is DERIVED from its target: the notification-target\n * vocabulary and these four categories line up one-for-one, so a per-notification declaration\n * would only be a place for the two to disagree. `ORGANIZATION_USERS` is deliberately outside the\n * mapping — it fans out to every member by design, and routing it to one address would change who\n * the message is FOR rather than where it lands.\n *\n * An address REPLACES the member fan-out rather than adding to it: a tenant routing security mail\n * to a SOC address is saying where it goes, not asking for a copy.\n */\n defaultEmailAddress: z.email().optional().isSummaryField().describe(\"Email address that receives the notification emails addressed to the organization itself, and those of a category (billing, security, administrative, user management) that has no address of its own. When set, these emails go to this address instead of to the members who would otherwise receive them. Emails meant for every member are always sent to each member.\"),\n billingAddress: z.email().optional().describe(\"Email address that receives the organization's billing notification emails instead of its members; when unset, `defaultEmailAddress` is used. It is also given to the payment provider as the customer email when the organization's billing account is created.\"),\n securityAddress: z.email().optional().describe(\"Email address that receives the organization's security notification emails instead of its members; when unset, `defaultEmailAddress` is used.\"),\n administrativeAddress: z.email().optional().describe(\"Email address that receives the organization's administrative notification emails instead of its members; when unset, `defaultEmailAddress` is used.\"),\n usersManagementAddress: z.email().optional().describe(\"Email address that receives the organization's user-management notification emails instead of its members; when unset, `defaultEmailAddress` is used.\"),\n\n /**\n * Category opt-ins. A `false` SUPPRESSES that category entirely — for the members too, not only\n * for the routing address — because a tenant turning billing notifications off means it.\n */\n billing: z.boolean().default(true).describe(\"When false, the organization's billing notification emails are not sent at all, neither to `billingAddress` nor to members. Emails only; in-app notifications are unaffected. Defaults to true.\"),\n administrative: z.boolean().default(true).describe(\"When false, the organization's administrative notification emails are not sent at all, neither to `administrativeAddress` nor to members. Emails only; in-app notifications are unaffected. Defaults to true.\"),\n security: z.boolean().default(true).describe(\"When false, the organization's security notification emails are not sent at all, neither to `securityAddress` nor to members. Emails only; in-app notifications are unaffected. Defaults to true.\"),\n usersManagement: z.boolean().default(true).describe(\"When false, the organization's user-management notification emails are not sent at all, neither to `usersManagementAddress` nor to members. Emails only; in-app notifications are unaffected. Defaults to true.\"),\n});\nexport type OrganizationEmailNotifications = z.infer<typeof OrganizationEmailNotificationsSchema>;\n\nexport const OrganizationNotificationsSchema = z.object({\n _id: z.string().min(1).isPrimaryKey().isSummaryField(),\n // `.isUnique()` = idempotency backstop for onParentCreate seeding: the eager\n // `createAsSystem` seed on ORGANIZATIONS create writes one notifications row per\n // org; the unique index makes a re-fire (retry / replay) fail-closed instead of\n // duplicating.\n organizationId: z.string().min(1).isDBIndexed().isUnique().isForeignKey().isSummaryField().excludeFromUpdate(),\n\n // Email notification preferences. `.default(OrganizationEmailNotificationsSchema.parse({}))`\n // makes the block materialize to its interior defaults when omitted, so the\n // resource is default-seedable from its CREATE DTO + parent FK alone (required\n // by the onParentCreate lifecycle guard). The output type keeps the block\n // required, so downstream readers are unaffected.\n emailNotifications: OrganizationEmailNotificationsSchema\n .default(OrganizationEmailNotificationsSchema.parse({}))\n .isSummaryField(),\n\n // Audit fields\n createdAt: z.date().default(() => new Date()).isDBIndexed().excludeFromCreate().excludeFromUpdate(),\n updatedAt: z.date().default(() => new Date()).isDBIndexed().excludeFromCreate().excludeFromUpdate()\n});\nexport type OrganizationNotifications = z.infer<typeof OrganizationNotificationsSchema>;\n\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"organization-preferences.shared.resources-config.schemas.d.ts","sourceRoot":"","sources":["../../../../src/organizations/organization-preferences.shared.resources-config.schemas.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAIxB,OAAO,EAAE,qBAAqB,EAAE,MAAM,gDAAgD,CAAC;AACvF,OAAO,EAAoD,oBAAoB,EAAE,MAAM,uCAAuC,CAAC;AAU/H,KAAK,qCAAqC,GACtC,qBAAqB,CAAC,IAAI,GAC1B,qBAAqB,CAAC,MAAM,GAC5B,qBAAqB,CAAC,MAAM,GAC5B,qBAAqB,CAAC,MAAM,CAAC;AAKjC,eAAO,MAAM,kEAAkE,GAAI,wBAAwB,oBAAoB,EAAE;;;;;;;;;;;;;;;;kBAmG/H,CAAC"}
1
+ {"version":3,"file":"organization-preferences.shared.resources-config.schemas.d.ts","sourceRoot":"","sources":["../../../src/organizations/organization-preferences.shared.resources-config.schemas.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAIxB,OAAO,EAAE,qBAAqB,EAAE,MAAM,gDAAgD,CAAC;AACvF,OAAO,EAAoD,oBAAoB,EAAE,MAAM,uCAAuC,CAAC;AAU/H,KAAK,qCAAqC,GACtC,qBAAqB,CAAC,IAAI,GAC1B,qBAAqB,CAAC,MAAM,GAC5B,qBAAqB,CAAC,MAAM,GAC5B,qBAAqB,CAAC,MAAM,CAAC;AAKjC,eAAO,MAAM,kEAAkE,GAAI,wBAAwB,oBAAoB,EAAE;;;;;;;;;;;;;;;;kBAmG/H,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"organization-preferences.shared.resources-config.schemas.js","sourceRoot":"","sources":["../../../../src/organizations/organization-preferences.shared.resources-config.schemas.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAGH,OAAO,EACL,6BAA6B,GAC9B,MAAM,2CAA2C,CAAC;AACnD,OAAO,EAAE,qBAAqB,EAAE,MAAM,gDAAgD,CAAC;AACvF,OAAO,EAAE,0BAA0B,EAA8C,MAAM,uCAAuC,CAAC;AAC/H,OAAO,EAAE,gBAAgB,EAAE,kCAAkC,EAAE,MAAM,gDAAgD,CAAC;AACtH,OAAO,EAAE,4BAA4B,EAAE,MAAM,uCAAuC,CAAC;AACrF,OAAO,EAAE,0BAA0B,EAAE,2BAA2B,EAAE,MAAM,+CAA+C,CAAC;AAExH,OAAO,EAAE,0CAA0C,EAAE,MAAM,8CAA8C,CAAC;AAC1G,OAAO,EAAE,wBAAwB,EAAE,MAAM,8CAA8C,CAAC;AAExF,OAAO,EAAE,cAAc,EAAE,MAAM,iDAAiD,CAAC;AAQjF;;EAEE;AACF,MAAM,CAAC,MAAM,kEAAkE,GAAG,CAAC,sBAA8C,EAAE,EAAE,CAAC,0CAA0C,CAI9K;IACA,UAAU,EAAE,6BAA6B;IACzC,kBAAkB,EAAE,gBAAgB,CAAC,wBAAwB;IAC7D,uBAAuB,EAAE,kCAAkC,CAAC,gBAAgB,CAAC,wBAAwB,CAAC;IACtG,qBAAqB,EAAE,sBAAsB;IAC7C,gBAAgB,EAAE,IAAI;IAEtB,0EAA0E;IAC1E,+EAA+E;IAC/E,6EAA6E;I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F;YACD,iBAAiB,EAAE;gBACjB;oBACE,MAAM,EAAE,0BAA0B,CAAC,SAAS;oBAC5C,OAAO,EAAE,2BAA2B,CAAC,iBAAiB;iBACvD;aACF;SACF;QAED,yEAAyE;QACzE,4EAA4E;QAC5E,2EAA2E;QAC3E,6EAA6E;QAC7E,+EAA+E;QAC/E,iFAAiF;QACjF,CAAC,qBAAqB,CAAC,MAAM,CAAC,EAAE;YAC9B,QAAQ,EAAE;gBACR;oBACE,WAAW,EAAE,4BAA4B,CAAC,eAAe;oBACzD,SAAS,EAAE,IAAI;oBACf,KAAK,EAAE,CAAC,cAAc,CAAC,SAAS,CAAC;oBACjC,SAAS,EAAE,0BAA0B,CAAC,IAAI;iBAC3C;aACF;SACF;KACF;CACF,CAAC,CAAC","sourcesContent":["/**\n * Organization Preferences Shared Resource Configuration\n *\n * Resource configuration for organization preferences management.\n * App-focused management for localization and regional settings.\n */\n\nimport { z } from 'zod';\nimport {\n OrganizationPreferencesSchema,\n} from './organization-preferences.shared.schemas';\nimport { CoreResourceOperation } from '../resources/resources.shared.core.definitions';\nimport { ResourceOperationRiskLevel, ResourcePrimaryScope, ResourceRelationship } from '../resources/resources.shared.schemas';\nimport { CoreResourceType, coreResourceShared_FieldIdentifier } from '../resources/resources.shared.core.definitions';\nimport { ResourceOperationVariantType } from '../resources/resources.shared.schemas';\nimport { CoreUserNotificationTarget, CoreUserNotificationChannel } from '../notifications/notifications.shared.schemas';\n\nimport { createResourceConfiguration_Initialization } from '../resources/resources-config.shared.factory';\nimport { ResourceSystemAccessMode } from '../resources/resources-config.shared.schemas';\n\nimport { CORE_ORG_ROLES } from '../security/authorizations/roles.shared.schemas';\n\ntype OrganizationPreferencesCoreOperations =\n | CoreResourceOperation.READ\n | CoreResourceOperation.CREATE\n | CoreResourceOperation.UPDATE\n | CoreResourceOperation.DELETE;\n\n/*\nOrganization Preferences Resource Configuration Factory\n*/\nexport const organizationPreferencesResourceConfiguration_InitializationFactory = (resourcesRelationships: ResourceRelationship[]) => createResourceConfiguration_Initialization<\n undefined,\n OrganizationPreferencesCoreOperations,\n typeof OrganizationPreferencesSchema\n>({\n mainSchema: OrganizationPreferencesSchema,\n resourceIdentifier: CoreResourceType.ORGANIZATION_PREFERENCES,\n resourceFieldIdentifier: coreResourceShared_FieldIdentifier[CoreResourceType.ORGANIZATION_PREFERENCES],\n resourceRelationships: resourcesRelationships,\n isSystemResource: true,\n\n // Eager composition seeding: the ORGANIZATIONS → ORGANIZATION_PREFERENCES\n // relationship declares `onParentCreate.enabled`, so a default preferences row\n // is written via `createAsSystem` on organization creation (fixes the latent\n // missing-row gap — org preferences were never hand-seeded). Guard-1 is\n // fail-closed by omission, so the system seed requires this explicit CREATE\n // opt-in; the INTERNAL_CALL CREATE variant below is the isDefault path the\n // seed resolves.\n systemAccessPolicy: { create: ResourceSystemAccessMode.ALLOWED },\n\n coreOperations: [\n CoreResourceOperation.READ,\n CoreResourceOperation.CREATE,\n CoreResourceOperation.UPDATE,\n // DELETE is REPOSITORY_ONLY (no HTTP route): powers the composition\n // onParentDelete cascade so the eager-seeded preferences row is physically\n // removed when its owning organization is deleted. Without it the cascade\n // throws ErrorType.CONFIGURATION on any org that has a preferences row.\n CoreResourceOperation.DELETE,\n ],\n\n operationsConfiguration: {\n [CoreResourceOperation.READ]: {\n variants: [\n {\n variantType: ResourceOperationVariantType.API_CALL,\n isDefault: true,\n roles: [CORE_ORG_ROLES.ORG_MEMBER],\n riskLevel: ResourceOperationRiskLevel.LOW,\n }\n ]\n },\n\n\n [CoreResourceOperation.CREATE]: {\n variants: [\n {\n // INTERNAL_CALL (NOT REPOSITORY_ONLY): the onParentCreate seed calls\n // `createAsSystem`, which resolves the default CREATE op through the\n // SERVICE tier (`getServiceOperationPathDefault`). That resolver accepts\n // only INTERNAL_CALL / API_CALL(_WITH_CALLBACK) — a REPOSITORY_ONLY CREATE\n // is invisible to it, so the seed throws OPERATION_PATH_NOT_FOUND and is\n // swallowed (silent missing row). INTERNAL_CALL is the service-layer\n // internal transport (no HTTP route) — the correct tier for a system seed.\n // (DELETE stays REPOSITORY_ONLY: the onParentDelete cascade deletes via the\n // repository tier, which is variant-agnostic. See composition-oncreate plan.)\n variantType: ResourceOperationVariantType.INTERNAL_CALL,\n isDefault: true,\n roles: [CORE_ORG_ROLES.ORG_ADMIN],\n riskLevel: ResourceOperationRiskLevel.LOW,\n // requestDto auto-derived from decorators\n }\n ]\n },\n [CoreResourceOperation.UPDATE]: {\n variants: [\n {\n variantType: ResourceOperationVariantType.API_CALL,\n isDefault: true,\n roles: [CORE_ORG_ROLES.ORG_MANAGER],\n riskLevel: ResourceOperationRiskLevel.LOW,\n // requestDto auto-derived from decorators\n }\n ],\n userNotifications: [\n {\n target: CoreUserNotificationTarget.USER_SELF,\n channel: CoreUserNotificationChannel.FRONT_END_SUCCESS,\n }\n ]\n },\n\n // Internal-only (REPOSITORY_ONLY, no HTTP route): powers the composition\n // onParentDelete cascade so this eager-seeded preferences row is physically\n // removed when its owning organization is deleted. Without a DELETE op the\n // cascade (deleteChildrenImmediate) throws ErrorType.CONFIGURATION — the row\n // is seeded on org create, so every org has one. ORG_ADMIN/HIGH: the org-scope\n // admin tier for a privileged teardown. See composition-oncreate-lifecycle plan.\n [CoreResourceOperation.DELETE]: {\n variants: [\n {\n variantType: ResourceOperationVariantType.REPOSITORY_ONLY,\n isDefault: true,\n roles: [CORE_ORG_ROLES.ORG_ADMIN],\n riskLevel: ResourceOperationRiskLevel.HIGH,\n }\n ],\n }\n },\n});\n"]}
1
+ {"version":3,"file":"organization-preferences.shared.resources-config.schemas.js","sourceRoot":"","sources":["../../../src/organizations/organization-preferences.shared.resources-config.schemas.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAGH,OAAO,EACL,6BAA6B,GAC9B,MAAM,2CAA2C,CAAC;AACnD,OAAO,EAAE,qBAAqB,EAAE,MAAM,gDAAgD,CAAC;AACvF,OAAO,EAAE,0BAA0B,EAA8C,MAAM,uCAAuC,CAAC;AAC/H,O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,GAAG;iBAC1C;aACF;SACF;QAGD,CAAC,qBAAqB,CAAC,MAAM,CAAC,EAAE;YAC9B,QAAQ,EAAE;gBACR;oBACE,qEAAqE;oBACrE,qEAAqE;oBACrE,yEAAyE;oBACzE,2EAA2E;oBAC3E,yEAAyE;oBACzE,qEAAqE;oBACrE,2EAA2E;oBAC3E,4EAA4E;oBAC5E,8EAA8E;oBAC9E,WAAW,EAAE,4BAA4B,CAAC,aAAa;oBACvD,SAAS,EAAE,IAAI;oBACf,KAAK,EAAE,CAAC,cAAc,CAAC,SAAS,CAAC;oBACjC,SAAS,EAAE,0BAA0B,CAAC,GAAG;oBACzC,0CAA0C;iBAC3C;aACF;SACF;QACD,CAAC,qBAAqB,CAAC,MAAM,CAAC,EAAE;YAC9B,QAAQ,EAAE;gBACR;oBACE,WAAW,EAAE,4BAA4B,CAAC,QAAQ;oBAClD,SAAS,EAAE,IAAI;oBACf,KAAK,EAAE,CAAC,cAAc,CAAC,WAAW,CAAC;oBACnC,SAAS,EAAE,0BAA0B,CAAC,GAAG;oBACzC,0CAA0C;iBAC3C;aACF;YACD,iBAAiB,EAAE;gBACjB;oBACE,MAAM,EAAE,0BAA0B,CAAC,SAAS;oBAC5C,OAAO,EAAE,2BAA2B,CAAC,iBAAiB;iBACvD;aACF;SACF;QAED,yEAAyE;QACzE,4EAA4E;QAC5E,2EAA2E;QAC3E,6EAA6E;QAC7E,+EAA+E;QAC/E,iFAAiF;QACjF,CAAC,qBAAqB,CAAC,MAAM,CAAC,EAAE;YAC9B,QAAQ,EAAE;gBACR;oBACE,WAAW,EAAE,4BAA4B,CAAC,eAAe;oBACzD,SAAS,EAAE,IAAI;oBACf,KAAK,EAAE,CAAC,cAAc,CAAC,SAAS,CAAC;oBACjC,SAAS,EAAE,0BAA0B,CAAC,IAAI;iBAC3C;aACF;SACF;KACF;CACF,CAAC,CAAC","sourcesContent":["/**\n * Organization Preferences Shared Resource Configuration\n *\n * Resource configuration for organization preferences management.\n * App-focused management for localization and regional settings.\n */\n\nimport { z } from 'zod';\nimport {\n OrganizationPreferencesSchema,\n} from './organization-preferences.shared.schemas';\nimport { CoreResourceOperation } from '../resources/resources.shared.core.definitions';\nimport { ResourceOperationRiskLevel, ResourcePrimaryScope, ResourceRelationship } from '../resources/resources.shared.schemas';\nimport { CoreResourceType, coreResourceShared_FieldIdentifier } from '../resources/resources.shared.core.definitions';\nimport { ResourceOperationVariantType } from '../resources/resources.shared.schemas';\nimport { CoreUserNotificationTarget, CoreUserNotificationChannel } from '../notifications/notifications.shared.schemas';\n\nimport { createResourceConfiguration_Initialization } from '../resources/resources-config.shared.factory';\nimport { ResourceSystemAccessMode } from '../resources/resources-config.shared.schemas';\n\nimport { CORE_ORG_ROLES } from '../security/authorizations/roles.shared.schemas';\n\ntype OrganizationPreferencesCoreOperations =\n | CoreResourceOperation.READ\n | CoreResourceOperation.CREATE\n | CoreResourceOperation.UPDATE\n | CoreResourceOperation.DELETE;\n\n/*\nOrganization Preferences Resource Configuration Factory\n*/\nexport const organizationPreferencesResourceConfiguration_InitializationFactory = (resourcesRelationships: ResourceRelationship[]) => createResourceConfiguration_Initialization<\n undefined,\n OrganizationPreferencesCoreOperations,\n typeof OrganizationPreferencesSchema\n>({\n mainSchema: OrganizationPreferencesSchema,\n resourceIdentifier: CoreResourceType.ORGANIZATION_PREFERENCES,\n resourceFieldIdentifier: coreResourceShared_FieldIdentifier[CoreResourceType.ORGANIZATION_PREFERENCES],\n resourceRelationships: resourcesRelationships,\n isSystemResource: true,\n\n // Eager composition seeding: the ORGANIZATIONS → ORGANIZATION_PREFERENCES\n // relationship declares `onParentCreate.enabled`, so a default preferences row\n // is written via `createAsSystem` on organization creation (fixes the latent\n // missing-row gap — org preferences were never hand-seeded). Guard-1 is\n // fail-closed by omission, so the system seed requires this explicit CREATE\n // opt-in; the INTERNAL_CALL CREATE variant below is the isDefault path the\n // seed resolves.\n systemAccessPolicy: { create: ResourceSystemAccessMode.ALLOWED },\n\n coreOperations: [\n CoreResourceOperation.READ,\n CoreResourceOperation.CREATE,\n CoreResourceOperation.UPDATE,\n // DELETE is REPOSITORY_ONLY (no HTTP route): powers the composition\n // onParentDelete cascade so the eager-seeded preferences row is physically\n // removed when its owning organization is deleted. Without it the cascade\n // throws ErrorType.CONFIGURATION on any org that has a preferences row.\n CoreResourceOperation.DELETE,\n ],\n\n operationsConfiguration: {\n [CoreResourceOperation.READ]: {\n variants: [\n {\n variantType: ResourceOperationVariantType.API_CALL,\n isDefault: true,\n roles: [CORE_ORG_ROLES.ORG_MEMBER],\n riskLevel: ResourceOperationRiskLevel.LOW,\n }\n ]\n },\n\n\n [CoreResourceOperation.CREATE]: {\n variants: [\n {\n // INTERNAL_CALL (NOT REPOSITORY_ONLY): the onParentCreate seed calls\n // `createAsSystem`, which resolves the default CREATE op through the\n // SERVICE tier (`getServiceOperationPathDefault`). That resolver accepts\n // only INTERNAL_CALL / API_CALL(_WITH_CALLBACK) — a REPOSITORY_ONLY CREATE\n // is invisible to it, so the seed throws OPERATION_PATH_NOT_FOUND and is\n // swallowed (silent missing row). INTERNAL_CALL is the service-layer\n // internal transport (no HTTP route) — the correct tier for a system seed.\n // (DELETE stays REPOSITORY_ONLY: the onParentDelete cascade deletes via the\n // repository tier, which is variant-agnostic. See composition-oncreate plan.)\n variantType: ResourceOperationVariantType.INTERNAL_CALL,\n isDefault: true,\n roles: [CORE_ORG_ROLES.ORG_ADMIN],\n riskLevel: ResourceOperationRiskLevel.LOW,\n // requestDto auto-derived from decorators\n }\n ]\n },\n [CoreResourceOperation.UPDATE]: {\n variants: [\n {\n variantType: ResourceOperationVariantType.API_CALL,\n isDefault: true,\n roles: [CORE_ORG_ROLES.ORG_MANAGER],\n riskLevel: ResourceOperationRiskLevel.LOW,\n // requestDto auto-derived from decorators\n }\n ],\n userNotifications: [\n {\n target: CoreUserNotificationTarget.USER_SELF,\n channel: CoreUserNotificationChannel.FRONT_END_SUCCESS,\n }\n ]\n },\n\n // Internal-only (REPOSITORY_ONLY, no HTTP route): powers the composition\n // onParentDelete cascade so this eager-seeded preferences row is physically\n // removed when its owning organization is deleted. Without a DELETE op the\n // cascade (deleteChildrenImmediate) throws ErrorType.CONFIGURATION — the row\n // is seeded on org create, so every org has one. ORG_ADMIN/HIGH: the org-scope\n // admin tier for a privileged teardown. See composition-oncreate-lifecycle plan.\n [CoreResourceOperation.DELETE]: {\n variants: [\n {\n variantType: ResourceOperationVariantType.REPOSITORY_ONLY,\n isDefault: true,\n roles: [CORE_ORG_ROLES.ORG_ADMIN],\n riskLevel: ResourceOperationRiskLevel.HIGH,\n }\n ],\n }\n },\n});\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"organization-preferences.shared.schemas.d.ts","sourceRoot":"","sources":["../../../../src/organizations/organization-preferences.shared.schemas.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,OAAO,0BAA0B,CAAC;AAClC,OAAO,EAAE,iBAAiB,EAAE,UAAU,EAAkB,UAAU,EAAE,MAAM,qCAAqC,CAAC;AAEhH,eAAO,MAAM,qCAAqC;;;;;iBAKhD,CAAC;AACH,MAAM,MAAM,+BAA+B,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,qCAAqC,CAAC,CAAC;AAEpG,eAAO,MAAM,6BAA6B;;;;;;;;;;;;;;;;iBA+BxC,CAAC;AACH,MAAM,MAAM,uBAAuB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,6BAA6B,CAAC,CAAC;AAEpF;;;;;;;;;;;;;;;;;;GAkBG;AACH,eAAO,MAAM,qCAAqC;;;;;iBAKhD,CAAC;AACH,MAAM,MAAM,+BAA+B,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,qCAAqC,CAAC,CAAC"}
1
+ {"version":3,"file":"organization-preferences.shared.schemas.d.ts","sourceRoot":"","sources":["../../../src/organizations/organization-preferences.shared.schemas.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,OAAO,0BAA0B,CAAC;AAClC,OAAO,EAAE,iBAAiB,EAAE,UAAU,EAAkB,UAAU,EAAE,MAAM,qCAAqC,CAAC;AAEhH,eAAO,MAAM,qCAAqC;;;;;iBAKhD,CAAC;AACH,MAAM,MAAM,+BAA+B,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,qCAAqC,CAAC,CAAC;AAEpG,eAAO,MAAM,6BAA6B;;;;;;;;;;;;;;;;iBA+BxC,CAAC;AACH,MAAM,MAAM,uBAAuB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,6BAA6B,CAAC,CAAC;AAEpF;;;;;;;;;;;;;;;;;;GAkBG;AACH,eAAO,MAAM,qCAAqC;;;;;iBAKhD,CAAC;AACH,MAAM,MAAM,+BAA+B,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,qCAAqC,CAAC,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"organization-preferences.shared.schemas.js","sourceRoot":"","sources":["../../../../src/organizations/organization-preferences.shared.schemas.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,6GAA6G;AAC7G,+GAA+G;AAC/G,OAAO,0BAA0B,CAAC;AAClC,OAAO,EAAE,iBAAiB,EAAE,UAAU,EAAE,cAAc,EAAE,UAAU,EAAE,MAAM,qCAAqC,CAAC;AAEhH,MAAM,CAAC,MAAM,qCAAqC,GAAG,CAAC,CAAC,MAAM,CAAC;IAC5D,eAAe,EAAE,CAAC,CAAC,IAAI,CAAC,iBAAiB,CAAC,CAAC,UAAU,CAAC,mBAAmB,CAAC,CAAC,OAAO,CAAC,iBAAiB,CAAC,EAAE,CAAC,CAAC,cAAc,EAAE,CAAC,QAAQ,CAAC,2UAA2U,CAAC;IAC/c,kBAAkB,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,IAAI,CAAC,iBAAiB,C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AAC,UAAU,CAAC,YAAY,CAAC,CAAC,OAAO,CAAC,UAAU,CAAC,cAAc,CAAC,CAAC,WAAW,EAAE;IACxG,UAAU,EAAE,CAAC,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC,UAAU,CAAC,YAAY,CAAC,CAAC,OAAO,CAAC,UAAU,CAAC,gBAAgB,CAAC,CAAC,WAAW,EAAE;IAE1G,uBAAuB;IACvB,mBAAmB,EAAE,qCAAqC,CAAC,OAAO,CAAC,qCAAqC,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC,CAAC,cAAc,EAAE;IAEpI,wBAAwB,EAAE,CAAC,CAAC,OAAO,EAAE,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,WAAW,EAAE;IAEjE,eAAe;IACf,SAAS,EAAE,CAAC,CAAC,IAAI,EAAE,CAAC,OAAO,CAAC,GAAG,EAAE,CAAC,IAAI,IAAI,EAAE,CAAC,CAAC,WAAW,EAAE,CAAC,iBAAiB,EAAE,CAAC,iBAAiB,EAAE;IACnG,SAAS,EAAE,CAAC,CAAC,IAAI,EAAE,CAAC,OAAO,CAAC,GAAG,EAAE,CAAC,IAAI,IAAI,EAAE,CAAC,CAAC,WAAW,EAAE,CAAC,iBAAiB,EAAE,CAAC,iBAAiB,EAAE;CACpG,CAAC,CAAC;AAGH;;;;;;;;;;;;;;;;;;GAkBG;AACH,MAAM,CAAC,MAAM,qCAAqC,GAAG,6BAA6B,CAAC,IAAI,CAAC;IACtF,QAAQ,EAAE,IAAI;IACd,MAAM,EAAE,IAAI;IACZ,UAAU,EAAE,IAAI;IAChB,UAAU,EAAE,IAAI;CACjB,CAAC,CAAC","sourcesContent":["/**\n * Organization Preferences Shared Schemas\n * \n * Localization, regional settings, and application preferences.\n * Separated from core organization for performance optimization.\n */\n\nimport { z } from 'zod';\n// Side-effect import: this module calls `.systemEnum()` at load, so the decorators must be installed first —\n// never by the importer's luck (#966). A named import used only as a type would be elided and install nothing.\nimport '@wildo-ai/zod-decorators';\nimport { AvailableLanguage, TimeFormat, TimezoneSchema, DateFormat } from '@wildo-ai/presets-components-models';\n\nexport const OrganizationLanguagePreferencesSchema = z.object({\n primaryLanguage: z.enum(AvailableLanguage).systemEnum('AvailableLanguage').default(AvailableLanguage.EN).isSummaryField().describe(\"The organization's default interface language. Every member uses it when `enforceForAllMembers` is true or `allowUserOverride` is false, a member who opts into the organization default uses it, and otherwise it applies when a member's own language cannot be used. Ignored when the application does not offer it. Defaults to `en`.\"),\n supportedLanguages: z.array(z.enum(AvailableLanguage).systemEnum('AvailableLanguage')).default([AvailableLanguage.EN]).describe(\"The interface languages this organization's members may use, limited to those the application offers; `primaryLanguage` is always included. When none of them is offered by the application, every language the application offers stays available. Defaults to `[\\\"en\\\"]`.\"),\n allowUserOverride: z.boolean().default(true).describe(\"When false, members cannot use a language of their own choosing and the interface uses `primaryLanguage` for all of them. Defaults to true.\"),\n enforceForAllMembers: z.boolean().default(false).describe(\"When true, every member's interface uses `primaryLanguage`, whatever language they chose for themselves. Defaults to false.\")\n});\nexport type OrganizationLanguagePreferences = z.infer<typeof OrganizationLanguagePreferencesSchema>;\n\nexport const OrganizationPreferencesSchema = z.object({\n _id: z.string().min(1).isPrimaryKey().isSummaryField(),\n // `.isUnique()` = idempotency backstop for onParentCreate seeding: the eager\n // `createAsSystem` seed on ORGANIZATIONS create writes one preferences row per\n // org; the unique index makes a re-fire (retry / replay) fail-closed instead of\n // duplicating.\n organizationId: z.string().min(1).isDBIndexed().isUnique().isForeignKey().isSummaryField().excludeFromUpdate(),\n \n // Regional settings\n // Default 'UTC' (a valid `CommonTimezone`), NOT 'US_SHORT' — that was a\n // `DateFormat` value mistakenly used here. `TimezoneSchema` is a\n // `union([enum(CommonTimezone), string])`, so Zod accepted the bad string\n // (the onParentCreate boot-guard probe passed), but the Mongoose model enforces\n // the enum and rejected 'US_SHORT' at seed time → the org preferences row failed\n // to eager-seed. Mirrors the USER preferences `timezone` default. See\n // composition-oncreate-lifecycle plan (W3 runtime-verify).\n timezone: TimezoneSchema.default('UTC').isDBIndexed().isSummaryField(),\n locale: z.enum(AvailableLanguage).systemEnum('AvailableLanguage').default(AvailableLanguage.EN).isDBIndexed().isSummaryField(),\n // LOCALE_DEFAULT (not ISO_8601): mirrors the USER preferences default — see the\n // rationale on `UserPreferences_RegionalSchema.dateFormat`.\n dateFormat: z.enum(DateFormat).systemEnum('DateFormat').default(DateFormat.LOCALE_DEFAULT).isDBIndexed(),\n timeFormat: z.enum(TimeFormat).systemEnum('TimeFormat').default(TimeFormat.TWENTY_FOUR_HOUR).isDBIndexed(),\n \n // Language preferences\n languagePreferences: OrganizationLanguagePreferencesSchema.default(OrganizationLanguagePreferencesSchema.parse({})).isSummaryField(),\n \n allowMemberEmailOverride: z.boolean().default(true).isDBIndexed(),\n \n // Audit fields\n createdAt: z.date().default(() => new Date()).isDBIndexed().excludeFromCreate().excludeFromUpdate(),\n updatedAt: z.date().default(() => new Date()).isDBIndexed().excludeFromCreate().excludeFromUpdate()\n});\nexport type OrganizationPreferences = z.infer<typeof OrganizationPreferencesSchema>;\n\n/**\n * The tenant's regional answer, as the DEFAULT LAYER beneath a member's own (#410).\n *\n * These four fields sit at the top level of {@link OrganizationPreferencesSchema} because they are\n * the organization's own settings, not a sub-record; this is a derived VIEW of them, so the two can\n * never drift. It exists because the frontend needs to carry exactly this much of the tenant's\n * preferences record to `I18nContext` — sending the whole record would put `_id`, audit fields and\n * the member-email-override policy on an event that has no use for any of them.\n *\n * The resolution `I18nContext` performs is: the member's own value, then this, then the framework\n * fallback. A member's explicit choice always wins — that is why\n * {@link UserPreferences_RegionalSchema}'s four fields are optional, so \"the member expressed\n * nothing\" is representable at all.\n *\n * Unlike the member's block, these fields keep their defaults, and that is correct rather than an\n * oversight: the organization record is seeded at provisioning and always exists, so its values ARE\n * the tenant's answer. A tenant that has edited nothing answers with the same four values the\n * framework would have used, which makes the layer a no-op for it — exactly as it should be.\n */\nexport const OrganizationRegionalPreferencesSchema = OrganizationPreferencesSchema.pick({\n timezone: true,\n locale: true,\n dateFormat: true,\n timeFormat: true,\n});\nexport type OrganizationRegionalPreferences = z.infer<typeof OrganizationRegionalPreferencesSchema>;\n"]}
1
+ {"version":3,"file":"organization-preferences.shared.schemas.js","sourceRoot":"","sources":["../../../src/organizations/organization-preferences.shared.schemas.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,6GAA6G;AAC7G,+GAA+G;AAC/G,OAAO,0BAA0B,CAAC;AAClC,OAAO,EAAE,iBAAiB,EAAE,UAAU,EAAE,cAAc,EAAE,UAAU,EAAE,MAAM,qCAAqC,CAAC;AAEhH,MAAM,CAAC,MAAM,qCAAqC,GAAG,CAAC,CAAC,MAAM,CAAC;IAC5D,eAAe,EAAE,CAAC,CAAC,IAAI,CAAC,iBAAiB,CAAC,CAAC,UAAU,CAAC,mBAAmB,CAAC,CAAC,OAAO,CAAC,iBAAiB,CAAC,EAAE,CAAC,CAAC,cAAc,EAAE,CAAC,QAAQ,CAAC,2UAA2U,CAAC;IAC/c,kBAAkB,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,IAAI,CAAC,iBAAiB,CAAC,CAAC,UAAU,CAAC,mBAAmB,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,iBAAiB,CAAC,EAAE,CAAC,CAAC,CAAC,QAAQ,CAAC,6QAA6Q,CAAC;IAC9Y,iBAAiB,EAAE,CAAC,CAAC,OAAO,EAAE,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,QAAQ,CAAC,6IAA6I,CAAC;IACpM,oBAAoB,EAAE,CAAC,CAAC,OAAO,EAAE,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,QAAQ,CAAC,6HAA6H,CAAC;CACzL,CAAC,CAAC;AAGH,MAAM,CAAC,MAAM,6BAA6B,GAAG,CAAC,CAAC,MAAM,CAAC;IACpD,GAAG,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,G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,CAAC,CAAC,IAAI,EAAE,CAAC,OAAO,CAAC,GAAG,EAAE,CAAC,IAAI,IAAI,EAAE,CAAC,CAAC,WAAW,EAAE,CAAC,iBAAiB,EAAE,CAAC,iBAAiB,EAAE;IACnG,SAAS,EAAE,CAAC,CAAC,IAAI,EAAE,CAAC,OAAO,CAAC,GAAG,EAAE,CAAC,IAAI,IAAI,EAAE,CAAC,CAAC,WAAW,EAAE,CAAC,iBAAiB,EAAE,CAAC,iBAAiB,EAAE;CACpG,CAAC,CAAC;AAGH;;;;;;;;;;;;;;;;;;GAkBG;AACH,MAAM,CAAC,MAAM,qCAAqC,GAAG,6BAA6B,CAAC,IAAI,CAAC;IACtF,QAAQ,EAAE,IAAI;IACd,MAAM,EAAE,IAAI;IACZ,UAAU,EAAE,IAAI;IAChB,UAAU,EAAE,IAAI;CACjB,CAAC,CAAC","sourcesContent":["/**\n * Organization Preferences Shared Schemas\n * \n * Localization, regional settings, and application preferences.\n * Separated from core organization for performance optimization.\n */\n\nimport { z } from 'zod';\n// Side-effect import: this module calls `.systemEnum()` at load, so the decorators must be installed first —\n// never by the importer's luck (#966). A named import used only as a type would be elided and install nothing.\nimport '@wildo-ai/zod-decorators';\nimport { AvailableLanguage, TimeFormat, TimezoneSchema, DateFormat } from '@wildo-ai/presets-components-models';\n\nexport const OrganizationLanguagePreferencesSchema = z.object({\n primaryLanguage: z.enum(AvailableLanguage).systemEnum('AvailableLanguage').default(AvailableLanguage.EN).isSummaryField().describe(\"The organization's default interface language. Every member uses it when `enforceForAllMembers` is true or `allowUserOverride` is false, a member who opts into the organization default uses it, and otherwise it applies when a member's own language cannot be used. Ignored when the application does not offer it. Defaults to `en`.\"),\n supportedLanguages: z.array(z.enum(AvailableLanguage).systemEnum('AvailableLanguage')).default([AvailableLanguage.EN]).describe(\"The interface languages this organization's members may use, limited to those the application offers; `primaryLanguage` is always included. When none of them is offered by the application, every language the application offers stays available. Defaults to `[\\\"en\\\"]`.\"),\n allowUserOverride: z.boolean().default(true).describe(\"When false, members cannot use a language of their own choosing and the interface uses `primaryLanguage` for all of them. Defaults to true.\"),\n enforceForAllMembers: z.boolean().default(false).describe(\"When true, every member's interface uses `primaryLanguage`, whatever language they chose for themselves. Defaults to false.\")\n});\nexport type OrganizationLanguagePreferences = z.infer<typeof OrganizationLanguagePreferencesSchema>;\n\nexport const OrganizationPreferencesSchema = z.object({\n _id: z.string().min(1).isPrimaryKey().isSummaryField(),\n // `.isUnique()` = idempotency backstop for onParentCreate seeding: the eager\n // `createAsSystem` seed on ORGANIZATIONS create writes one preferences row per\n // org; the unique index makes a re-fire (retry / replay) fail-closed instead of\n // duplicating.\n organizationId: z.string().min(1).isDBIndexed().isUnique().isForeignKey().isSummaryField().excludeFromUpdate(),\n \n // Regional settings\n // Default 'UTC' (a valid `CommonTimezone`), NOT 'US_SHORT' — that was a\n // `DateFormat` value mistakenly used here. `TimezoneSchema` is a\n // `union([enum(CommonTimezone), string])`, so Zod accepted the bad string\n // (the onParentCreate boot-guard probe passed), but the Mongoose model enforces\n // the enum and rejected 'US_SHORT' at seed time → the org preferences row failed\n // to eager-seed. Mirrors the USER preferences `timezone` default. See\n // composition-oncreate-lifecycle plan (W3 runtime-verify).\n timezone: TimezoneSchema.default('UTC').isDBIndexed().isSummaryField(),\n locale: z.enum(AvailableLanguage).systemEnum('AvailableLanguage').default(AvailableLanguage.EN).isDBIndexed().isSummaryField(),\n // LOCALE_DEFAULT (not ISO_8601): mirrors the USER preferences default — see the\n // rationale on `UserPreferences_RegionalSchema.dateFormat`.\n dateFormat: z.enum(DateFormat).systemEnum('DateFormat').default(DateFormat.LOCALE_DEFAULT).isDBIndexed(),\n timeFormat: z.enum(TimeFormat).systemEnum('TimeFormat').default(TimeFormat.TWENTY_FOUR_HOUR).isDBIndexed(),\n \n // Language preferences\n languagePreferences: OrganizationLanguagePreferencesSchema.default(OrganizationLanguagePreferencesSchema.parse({})).isSummaryField(),\n \n allowMemberEmailOverride: z.boolean().default(true).isDBIndexed(),\n \n // Audit fields\n createdAt: z.date().default(() => new Date()).isDBIndexed().excludeFromCreate().excludeFromUpdate(),\n updatedAt: z.date().default(() => new Date()).isDBIndexed().excludeFromCreate().excludeFromUpdate()\n});\nexport type OrganizationPreferences = z.infer<typeof OrganizationPreferencesSchema>;\n\n/**\n * The tenant's regional answer, as the DEFAULT LAYER beneath a member's own (#410).\n *\n * These four fields sit at the top level of {@link OrganizationPreferencesSchema} because they are\n * the organization's own settings, not a sub-record; this is a derived VIEW of them, so the two can\n * never drift. It exists because the frontend needs to carry exactly this much of the tenant's\n * preferences record to `I18nContext` — sending the whole record would put `_id`, audit fields and\n * the member-email-override policy on an event that has no use for any of them.\n *\n * The resolution `I18nContext` performs is: the member's own value, then this, then the framework\n * fallback. A member's explicit choice always wins — that is why\n * {@link UserPreferences_RegionalSchema}'s four fields are optional, so \"the member expressed\n * nothing\" is representable at all.\n *\n * Unlike the member's block, these fields keep their defaults, and that is correct rather than an\n * oversight: the organization record is seeded at provisioning and always exists, so its values ARE\n * the tenant's answer. A tenant that has edited nothing answers with the same four values the\n * framework would have used, which makes the layer a no-op for it — exactly as it should be.\n */\nexport const OrganizationRegionalPreferencesSchema = OrganizationPreferencesSchema.pick({\n timezone: true,\n locale: true,\n dateFormat: true,\n timeFormat: true,\n});\nexport type OrganizationRegionalPreferences = z.infer<typeof OrganizationRegionalPreferencesSchema>;\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"organization-profile.shared.resources-config.schemas.d.ts","sourceRoot":"","sources":["../../../../src/organizations/organization-profile.shared.resources-config.schemas.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAEL,oBAAoB,EACpB,gBAAgB,EACjB,MAAM,uCAAuC,CAAC;AAC/C,OAAO,EAAE,qBAAqB,EAAE,MAAM,gDAAgD,CAAC;AACvF,OAAO,EAAoD,oBAAoB,EAAE,MAAM,uCAAuC,CAAC;AAW/H,oBAAY,8BAA8B;IACxC,eAAe,oBAAoB;CACpC;AAED,KAAK,iCAAiC,GAClC,qBAAqB,CAAC,IAAI,GAC1B,qBAAqB,CAAC,MAAM,GAC5B,qBAAqB,CAAC,MAAM,GAC5B,qBAAqB,CAAC,MAAM,CAAC;AAKjC,eAAO,MAAM,8DAA8D,GAAI,wBAAwB,oBAAoB,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;kBAgH3H,CAAC"}
1
+ {"version":3,"file":"organization-profile.shared.resources-config.schemas.d.ts","sourceRoot":"","sources":["../../../src/organizations/organization-profile.shared.resources-config.schemas.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAEL,oBAAoB,EACpB,gBAAgB,EACjB,MAAM,uCAAuC,CAAC;AAC/C,OAAO,EAAE,qBAAqB,EAAE,MAAM,gDAAgD,CAAC;AACvF,OAAO,EAAoD,oBAAoB,EAAE,MAAM,uCAAuC,CAAC;AAW/H,oBAAY,8BAA8B;IACxC,eAAe,oBAAoB;CACpC;AAED,KAAK,iCAAiC,GAClC,qBAAqB,CAAC,IAAI,GAC1B,qBAAqB,CAAC,MAAM,GAC5B,qBAAqB,CAAC,MAAM,GAC5B,qBAAqB,CAAC,MAAM,CAAC;AAKjC,eAAO,MAAM,8DAA8D,GAAI,wBAAwB,oBAAoB,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;kBAgH3H,CAAC"}