@wildo-ai/saas-models 1.1.7 → 1.1.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (861) hide show
  1. package/dist/esm/__tests__/setup.d.ts.map +1 -1
  2. package/dist/esm/__tests__/setup.js.map +1 -1
  3. package/dist/esm/_inspect.d.ts.map +1 -1
  4. package/dist/esm/_inspect.js.map +1 -1
  5. package/dist/esm/applications/application-metadata.shared.resources-config.schemas.d.ts.map +1 -1
  6. package/dist/esm/applications/application-metadata.shared.resources-config.schemas.js.map +1 -1
  7. package/dist/esm/applications/application-subject.shared.schemas.d.ts.map +1 -1
  8. package/dist/esm/applications/application-subject.shared.schemas.js.map +1 -1
  9. package/dist/esm/applications/application-versions.shared.resources-config.schemas.d.ts.map +1 -1
  10. package/dist/esm/applications/application-versions.shared.resources-config.schemas.js.map +1 -1
  11. package/dist/esm/applications/applications-context.schemas.d.ts.map +1 -1
  12. package/dist/esm/applications/applications-context.schemas.js.map +1 -1
  13. package/dist/esm/applications/applications.shared.resources-config.schemas.d.ts.map +1 -1
  14. package/dist/esm/applications/applications.shared.resources-config.schemas.js.map +1 -1
  15. package/dist/esm/applications/applications.shared.schemas.d.ts.map +1 -1
  16. package/dist/esm/applications/applications.shared.schemas.js.map +1 -1
  17. package/dist/esm/billing/billing-account.shared.resources-config.schemas.d.ts.map +1 -1
  18. package/dist/esm/billing/billing-account.shared.resources-config.schemas.js.map +1 -1
  19. package/dist/esm/billing/billing-account.shared.schemas.d.ts.map +1 -1
  20. package/dist/esm/billing/billing-account.shared.schemas.js.map +1 -1
  21. package/dist/esm/billing/billing-configuration.shared.schemas.d.ts.map +1 -1
  22. package/dist/esm/billing/billing-configuration.shared.schemas.js.map +1 -1
  23. package/dist/esm/billing/billing-enums.shared.schemas.d.ts.map +1 -1
  24. package/dist/esm/billing/billing-enums.shared.schemas.js.map +1 -1
  25. package/dist/esm/billing/billing-types.shared.schemas.d.ts.map +1 -1
  26. package/dist/esm/billing/billing-types.shared.schemas.js.map +1 -1
  27. package/dist/esm/billing/credit-pool.shared.resources-config.schemas.d.ts.map +1 -1
  28. package/dist/esm/billing/credit-pool.shared.resources-config.schemas.js.map +1 -1
  29. package/dist/esm/billing/credit-pool.shared.schemas.d.ts.map +1 -1
  30. package/dist/esm/billing/credit-pool.shared.schemas.js.map +1 -1
  31. package/dist/esm/billing/invoice-ref.shared.resources-config.schemas.d.ts.map +1 -1
  32. package/dist/esm/billing/invoice-ref.shared.resources-config.schemas.js.map +1 -1
  33. package/dist/esm/billing/invoice-ref.shared.schemas.d.ts.map +1 -1
  34. package/dist/esm/billing/invoice-ref.shared.schemas.js.map +1 -1
  35. package/dist/esm/billing/price.shared.resources-config.schemas.d.ts.map +1 -1
  36. package/dist/esm/billing/price.shared.resources-config.schemas.js.map +1 -1
  37. package/dist/esm/billing/price.shared.schemas.d.ts.map +1 -1
  38. package/dist/esm/billing/price.shared.schemas.js.map +1 -1
  39. package/dist/esm/billing/product-behavior-policy.shared.schemas.d.ts.map +1 -1
  40. package/dist/esm/billing/product-behavior-policy.shared.schemas.js.map +1 -1
  41. package/dist/esm/billing/product-definition.shared.schemas.d.ts.map +1 -1
  42. package/dist/esm/billing/product-definition.shared.schemas.js.map +1 -1
  43. package/dist/esm/billing/product.shared.resources-config.schemas.d.ts.map +1 -1
  44. package/dist/esm/billing/product.shared.resources-config.schemas.js.map +1 -1
  45. package/dist/esm/billing/product.shared.schemas.d.ts.map +1 -1
  46. package/dist/esm/billing/product.shared.schemas.js.map +1 -1
  47. package/dist/esm/billing/promotions.shared.resources-config.schemas.d.ts.map +1 -1
  48. package/dist/esm/billing/promotions.shared.resources-config.schemas.js.map +1 -1
  49. package/dist/esm/billing/promotions.shared.schemas.d.ts.map +1 -1
  50. package/dist/esm/billing/promotions.shared.schemas.js.map +1 -1
  51. package/dist/esm/billing/public-pricing-catalog.shared.atoms.d.ts.map +1 -1
  52. package/dist/esm/billing/public-pricing-catalog.shared.atoms.js.map +1 -1
  53. package/dist/esm/billing/public-pricing-catalog.shared.d.ts.map +1 -1
  54. package/dist/esm/billing/public-pricing-catalog.shared.js.map +1 -1
  55. package/dist/esm/billing/referral-reward.shared.schemas.d.ts.map +1 -1
  56. package/dist/esm/billing/referral-reward.shared.schemas.js.map +1 -1
  57. package/dist/esm/billing/referral.shared.resources-config.schemas.d.ts.map +1 -1
  58. package/dist/esm/billing/referral.shared.resources-config.schemas.js.map +1 -1
  59. package/dist/esm/billing/referral.shared.schemas.d.ts.map +1 -1
  60. package/dist/esm/billing/referral.shared.schemas.js.map +1 -1
  61. package/dist/esm/billing/subscription.shared.resources-config.schemas.d.ts.map +1 -1
  62. package/dist/esm/billing/subscription.shared.resources-config.schemas.js.map +1 -1
  63. package/dist/esm/billing/subscription.shared.schemas.d.ts.map +1 -1
  64. package/dist/esm/billing/subscription.shared.schemas.js.map +1 -1
  65. package/dist/esm/billing/usage-flush-evidence.shared.schemas.d.ts.map +1 -1
  66. package/dist/esm/billing/usage-flush-evidence.shared.schemas.js.map +1 -1
  67. package/dist/esm/billing/usage-record.shared.resources-config.schemas.d.ts.map +1 -1
  68. package/dist/esm/billing/usage-record.shared.resources-config.schemas.js.map +1 -1
  69. package/dist/esm/billing/usage-record.shared.schemas.d.ts.map +1 -1
  70. package/dist/esm/billing/usage-record.shared.schemas.js.map +1 -1
  71. package/dist/esm/charts/aggregation-query.shared.schemas.d.ts.map +1 -1
  72. package/dist/esm/charts/aggregation-query.shared.schemas.js.map +1 -1
  73. package/dist/esm/charts/aggregation.shared.definitions.d.ts.map +1 -1
  74. package/dist/esm/charts/aggregation.shared.definitions.js.map +1 -1
  75. package/dist/esm/charts/chart-definition-builder.shared.d.ts.map +1 -1
  76. package/dist/esm/charts/chart-definition-builder.shared.js.map +1 -1
  77. package/dist/esm/companion/artifact-placement.shared.definitions.d.ts.map +1 -1
  78. package/dist/esm/companion/artifact-placement.shared.definitions.js.map +1 -1
  79. package/dist/esm/companion/provider-discovery.shared.schemas.d.ts.map +1 -1
  80. package/dist/esm/companion/provider-discovery.shared.schemas.js.map +1 -1
  81. package/dist/esm/companion/shared-library-companion.shared.definitions.d.ts.map +1 -1
  82. package/dist/esm/companion/shared-library-companion.shared.definitions.js.map +1 -1
  83. package/dist/esm/companion-exports.d.ts.map +1 -1
  84. package/dist/esm/companion-exports.js.map +1 -1
  85. package/dist/esm/compliance/audit-trails/application-audit-logs.shared.resources-config.schemas.d.ts.map +1 -1
  86. package/dist/esm/compliance/audit-trails/application-audit-logs.shared.resources-config.schemas.js.map +1 -1
  87. package/dist/esm/compliance/audit-trails/audit-actor.shared.schemas.d.ts.map +1 -1
  88. package/dist/esm/compliance/audit-trails/audit-actor.shared.schemas.js.map +1 -1
  89. package/dist/esm/compliance/audit-trails/audit-export-projection.shared.schemas.d.ts.map +1 -1
  90. package/dist/esm/compliance/audit-trails/audit-export-projection.shared.schemas.js.map +1 -1
  91. package/dist/esm/compliance/audit-trails/audit-log-sink.shared.schemas.d.ts.map +1 -1
  92. package/dist/esm/compliance/audit-trails/audit-log-sink.shared.schemas.js.map +1 -1
  93. package/dist/esm/compliance/audit-trails/audit-logs.shared.resources-config.schemas.d.ts.map +1 -1
  94. package/dist/esm/compliance/audit-trails/audit-logs.shared.resources-config.schemas.js.map +1 -1
  95. package/dist/esm/compliance/audit-trails/audit-trail-config.shared.schemas.d.ts.map +1 -1
  96. package/dist/esm/compliance/audit-trails/audit-trail-config.shared.schemas.js.map +1 -1
  97. package/dist/esm/compliance/audit-trails/auditable-events.shared.schema.d.ts.map +1 -1
  98. package/dist/esm/compliance/audit-trails/auditable-events.shared.schema.js.map +1 -1
  99. package/dist/esm/compliance/audit-trails/security-audit-event-envelope.shared.schema.d.ts.map +1 -1
  100. package/dist/esm/compliance/audit-trails/security-audit-event-envelope.shared.schema.js.map +1 -1
  101. package/dist/esm/compliance/data-classification/data-classification.shared.schemas.d.ts.map +1 -1
  102. package/dist/esm/compliance/data-classification/data-classification.shared.schemas.js.map +1 -1
  103. package/dist/esm/compliance/documents/governed-document-interactions.shared.schemas.d.ts.map +1 -1
  104. package/dist/esm/compliance/documents/governed-document-interactions.shared.schemas.js.map +1 -1
  105. package/dist/esm/compliance/documents/governed-documents.shared.schemas.d.ts.map +1 -1
  106. package/dist/esm/compliance/documents/governed-documents.shared.schemas.js.map +1 -1
  107. package/dist/esm/compliance/documents/user-governed-document-acceptances.shared.resources-config.schemas.d.ts.map +1 -1
  108. package/dist/esm/compliance/documents/user-governed-document-acceptances.shared.resources-config.schemas.js.map +1 -1
  109. package/dist/esm/compliance/documents/user-governed-document-acceptances.shared.schemas.d.ts.map +1 -1
  110. package/dist/esm/compliance/documents/user-governed-document-acceptances.shared.schemas.js.map +1 -1
  111. package/dist/esm/compliance/privacy/ai-use-posture.shared.schemas.d.ts.map +1 -1
  112. package/dist/esm/compliance/privacy/ai-use-posture.shared.schemas.js.map +1 -1
  113. package/dist/esm/compliance/privacy/capability-consent-purposes.shared.utils.d.ts.map +1 -1
  114. package/dist/esm/compliance/privacy/capability-consent-purposes.shared.utils.js.map +1 -1
  115. package/dist/esm/compliance/privacy/client-storage.shared.schemas.d.ts.map +1 -1
  116. package/dist/esm/compliance/privacy/client-storage.shared.schemas.js.map +1 -1
  117. package/dist/esm/compliance/privacy/consent-gate-vocabulary.shared.schemas.d.ts.map +1 -1
  118. package/dist/esm/compliance/privacy/consent-gate-vocabulary.shared.schemas.js.map +1 -1
  119. package/dist/esm/compliance/privacy/consent-purposes.shared.d.ts.map +1 -1
  120. package/dist/esm/compliance/privacy/consent-purposes.shared.js.map +1 -1
  121. package/dist/esm/compliance/privacy/data-subject-rights.shared.schemas.d.ts.map +1 -1
  122. package/dist/esm/compliance/privacy/data-subject-rights.shared.schemas.js.map +1 -1
  123. package/dist/esm/compliance/privacy/impersonalization-scrub.shared.utils.d.ts.map +1 -1
  124. package/dist/esm/compliance/privacy/impersonalization-scrub.shared.utils.js.map +1 -1
  125. package/dist/esm/compliance/privacy/impersonalization.shared.schemas.d.ts.map +1 -1
  126. package/dist/esm/compliance/privacy/impersonalization.shared.schemas.js.map +1 -1
  127. package/dist/esm/compliance/privacy/legal-hold-subject-attribution.shared.utils.d.ts.map +1 -1
  128. package/dist/esm/compliance/privacy/legal-hold-subject-attribution.shared.utils.js.map +1 -1
  129. package/dist/esm/compliance/privacy/legal-holds.shared.resources-config.schemas.d.ts.map +1 -1
  130. package/dist/esm/compliance/privacy/legal-holds.shared.resources-config.schemas.js.map +1 -1
  131. package/dist/esm/compliance/privacy/legal-holds.shared.schemas.d.ts.map +1 -1
  132. package/dist/esm/compliance/privacy/legal-holds.shared.schemas.js.map +1 -1
  133. package/dist/esm/compliance/privacy/operating-jurisdictions.shared.schemas.d.ts.map +1 -1
  134. package/dist/esm/compliance/privacy/operating-jurisdictions.shared.schemas.js.map +1 -1
  135. package/dist/esm/compliance/privacy/operator-compliance-identity.shared.schemas.d.ts.map +1 -1
  136. package/dist/esm/compliance/privacy/operator-compliance-identity.shared.schemas.js.map +1 -1
  137. package/dist/esm/compliance/privacy/personal-data-category.shared.schemas.d.ts.map +1 -1
  138. package/dist/esm/compliance/privacy/personal-data-category.shared.schemas.js.map +1 -1
  139. package/dist/esm/compliance/privacy/personal-data-declaration.shared.utils.d.ts.map +1 -1
  140. package/dist/esm/compliance/privacy/personal-data-declaration.shared.utils.js.map +1 -1
  141. package/dist/esm/compliance/privacy/privacy.shared.schemas.d.ts.map +1 -1
  142. package/dist/esm/compliance/privacy/privacy.shared.schemas.js.map +1 -1
  143. package/dist/esm/compliance/privacy/provider-capability-disclosure.shared.schemas.d.ts.map +1 -1
  144. package/dist/esm/compliance/privacy/provider-capability-disclosure.shared.schemas.js.map +1 -1
  145. package/dist/esm/compliance/privacy/purpose-ref.shared.schemas.d.ts.map +1 -1
  146. package/dist/esm/compliance/privacy/purpose-ref.shared.schemas.js.map +1 -1
  147. package/dist/esm/compliance/privacy/redaction.shared.schemas.d.ts.map +1 -1
  148. package/dist/esm/compliance/privacy/redaction.shared.schemas.js.map +1 -1
  149. package/dist/esm/compliance/privacy/retention-binding.shared.utils.d.ts.map +1 -1
  150. package/dist/esm/compliance/privacy/retention-binding.shared.utils.js.map +1 -1
  151. package/dist/esm/compliance/privacy/retention-enforcement-records.shared.resources-config.schemas.d.ts.map +1 -1
  152. package/dist/esm/compliance/privacy/retention-enforcement-records.shared.resources-config.schemas.js.map +1 -1
  153. package/dist/esm/compliance/privacy/retention-enforcement-records.shared.schemas.d.ts.map +1 -1
  154. package/dist/esm/compliance/privacy/retention-enforcement-records.shared.schemas.js.map +1 -1
  155. package/dist/esm/compliance/privacy/retention-schedule.shared.schemas.d.ts.map +1 -1
  156. package/dist/esm/compliance/privacy/retention-schedule.shared.schemas.js.map +1 -1
  157. package/dist/esm/compliance/privacy/retention-scope-deleted.shared.utils.d.ts.map +1 -1
  158. package/dist/esm/compliance/privacy/retention-scope-deleted.shared.utils.js.map +1 -1
  159. package/dist/esm/compliance/privacy/sharing.shared.schemas.d.ts.map +1 -1
  160. package/dist/esm/compliance/privacy/sharing.shared.schemas.js.map +1 -1
  161. package/dist/esm/compliance/privacy/subject-data-recipients.shared.schemas.d.ts.map +1 -1
  162. package/dist/esm/compliance/privacy/subject-data-recipients.shared.schemas.js.map +1 -1
  163. package/dist/esm/compliance/privacy/subject-erasure-lane-evidence.shared.schemas.d.ts.map +1 -1
  164. package/dist/esm/compliance/privacy/subject-erasure-lane-evidence.shared.schemas.js.map +1 -1
  165. package/dist/esm/compliance/privacy/subject-erasure.shared.schemas.d.ts.map +1 -1
  166. package/dist/esm/compliance/privacy/subject-erasure.shared.schemas.js.map +1 -1
  167. package/dist/esm/compliance/privacy/subject-export-render.shared.utils.d.ts.map +1 -1
  168. package/dist/esm/compliance/privacy/subject-export-render.shared.utils.js.map +1 -1
  169. package/dist/esm/compliance/privacy/subject-export.shared.schemas.d.ts.map +1 -1
  170. package/dist/esm/compliance/privacy/subject-export.shared.schemas.js.map +1 -1
  171. package/dist/esm/compliance/review-cadence.shared.schemas.d.ts.map +1 -1
  172. package/dist/esm/compliance/review-cadence.shared.schemas.js.map +1 -1
  173. package/dist/esm/compliance/risk-posture.shared.schemas.d.ts.map +1 -1
  174. package/dist/esm/compliance/risk-posture.shared.schemas.js.map +1 -1
  175. package/dist/esm/config/analytics-value-moments.shared.schemas.d.ts.map +1 -1
  176. package/dist/esm/config/analytics-value-moments.shared.schemas.js.map +1 -1
  177. package/dist/esm/config/app-configuration-shared.shared.schemas.d.ts.map +1 -1
  178. package/dist/esm/config/app-configuration-shared.shared.schemas.js.map +1 -1
  179. package/dist/esm/config/app-frontend-type.shared.schemas.d.ts.map +1 -1
  180. package/dist/esm/config/app-frontend-type.shared.schemas.js.map +1 -1
  181. package/dist/esm/config/auth-config-resolution.shared.utils.d.ts.map +1 -1
  182. package/dist/esm/config/auth-config-resolution.shared.utils.js.map +1 -1
  183. package/dist/esm/config/brand-assets.shared.schemas.d.ts.map +1 -1
  184. package/dist/esm/config/brand-assets.shared.schemas.js.map +1 -1
  185. package/dist/esm/config/configuration-validation.shared.schemas.d.ts.map +1 -1
  186. package/dist/esm/config/configuration-validation.shared.schemas.js.map +1 -1
  187. package/dist/esm/config/entity-identity-config.shared.schemas.d.ts.map +1 -1
  188. package/dist/esm/config/entity-identity-config.shared.schemas.js.map +1 -1
  189. package/dist/esm/config/frontend/chart-definition.shared.schemas.d.ts.map +1 -1
  190. package/dist/esm/config/frontend/chart-definition.shared.schemas.js.map +1 -1
  191. package/dist/esm/config/frontend/chart-registration-alignment.shared.d.ts.map +1 -1
  192. package/dist/esm/config/frontend/chart-registration-alignment.shared.js.map +1 -1
  193. package/dist/esm/config/frontend/navigation.shared.schemas.d.ts.map +1 -1
  194. package/dist/esm/config/frontend/navigation.shared.schemas.js.map +1 -1
  195. package/dist/esm/config/frontend/onboarding.shared.schemas.d.ts.map +1 -1
  196. package/dist/esm/config/frontend/onboarding.shared.schemas.js.map +1 -1
  197. package/dist/esm/config/postgresql.shared.schemas.d.ts.map +1 -1
  198. package/dist/esm/config/postgresql.shared.schemas.js.map +1 -1
  199. package/dist/esm/config/registration-acquisition-policy.shared.utils.d.ts.map +1 -1
  200. package/dist/esm/config/registration-acquisition-policy.shared.utils.js.map +1 -1
  201. package/dist/esm/config-authoring.entry.d.ts.map +1 -1
  202. package/dist/esm/config-authoring.entry.js.map +1 -1
  203. package/dist/esm/crdt/crdt-merge.shared.utils.d.ts.map +1 -1
  204. package/dist/esm/crdt/crdt-merge.shared.utils.js.map +1 -1
  205. package/dist/esm/data-seeding/data-seeding-config.shared.schemas.d.ts.map +1 -1
  206. package/dist/esm/data-seeding/data-seeding-config.shared.schemas.js.map +1 -1
  207. package/dist/esm/errors/caught-error-description.shared.utils.d.ts.map +1 -1
  208. package/dist/esm/errors/caught-error-description.shared.utils.js.map +1 -1
  209. package/dist/esm/errors/errors.custom-message-ref.shared.definitions.d.ts.map +1 -1
  210. package/dist/esm/errors/errors.custom-message-ref.shared.definitions.js.map +1 -1
  211. package/dist/esm/errors/errors.shared.definitions.d.ts.map +1 -1
  212. package/dist/esm/errors/errors.shared.definitions.js.map +1 -1
  213. package/dist/esm/errors/errors.shared.schemas.d.ts.map +1 -1
  214. package/dist/esm/errors/errors.shared.schemas.js.map +1 -1
  215. package/dist/esm/errors/errors.shared.utils.d.ts.map +1 -1
  216. package/dist/esm/errors/errors.shared.utils.js.map +1 -1
  217. package/dist/esm/errors/resource-access-forbidden.shared.error.d.ts.map +1 -1
  218. package/dist/esm/errors/resource-access-forbidden.shared.error.js.map +1 -1
  219. package/dist/esm/errors/thrown-value-description.shared.utils.d.ts.map +1 -1
  220. package/dist/esm/errors/thrown-value-description.shared.utils.js.map +1 -1
  221. package/dist/esm/errors/zod-issue-formatting.shared.utils.d.ts.map +1 -1
  222. package/dist/esm/errors/zod-issue-formatting.shared.utils.js.map +1 -1
  223. package/dist/esm/exports/tabular-csv.shared.utils.d.ts.map +1 -1
  224. package/dist/esm/exports/tabular-csv.shared.utils.js.map +1 -1
  225. package/dist/esm/external-data/external-data-pipeline-description.shared.d.ts.map +1 -1
  226. package/dist/esm/external-data/external-data-pipeline-description.shared.js.map +1 -1
  227. package/dist/esm/external-data/external-data-pipeline-pass-mode.shared.d.ts.map +1 -1
  228. package/dist/esm/external-data/external-data-pipeline-pass-mode.shared.js.map +1 -1
  229. package/dist/esm/external-data/external-data-pipeline.shared.schemas.d.ts.map +1 -1
  230. package/dist/esm/external-data/external-data-pipeline.shared.schemas.js.map +1 -1
  231. package/dist/esm/external-data/external-data-provenance.shared.d.ts.map +1 -1
  232. package/dist/esm/external-data/external-data-provenance.shared.js.map +1 -1
  233. package/dist/esm/external-data.exports.d.ts.map +1 -1
  234. package/dist/esm/external-data.exports.js.map +1 -1
  235. package/dist/esm/external-providers/compose-provider-registry.shared.d.ts.map +1 -1
  236. package/dist/esm/external-providers/compose-provider-registry.shared.js.map +1 -1
  237. package/dist/esm/external-providers/engine-capabilities.shared.schemas.d.ts.map +1 -1
  238. package/dist/esm/external-providers/engine-capabilities.shared.schemas.js.map +1 -1
  239. package/dist/esm/external-providers/engine-capability-resolution-mode.shared.d.ts.map +1 -1
  240. package/dist/esm/external-providers/engine-capability-resolution-mode.shared.js.map +1 -1
  241. package/dist/esm/external-providers/engine-capability-surface.shared.d.ts.map +1 -1
  242. package/dist/esm/external-providers/engine-capability-surface.shared.js.map +1 -1
  243. package/dist/esm/external-providers/external-providers.shared.schemas.d.ts.map +1 -1
  244. package/dist/esm/external-providers/external-providers.shared.schemas.js.map +1 -1
  245. package/dist/esm/external-providers/frontend-bootstrap.shared.schemas.d.ts.map +1 -1
  246. package/dist/esm/external-providers/frontend-bootstrap.shared.schemas.js.map +1 -1
  247. package/dist/esm/external-providers/frontend-capability-public-config.shared.schemas.d.ts.map +1 -1
  248. package/dist/esm/external-providers/frontend-capability-public-config.shared.schemas.js.map +1 -1
  249. package/dist/esm/external-providers/frontend-capability-runtime.shared.types.d.ts.map +1 -1
  250. package/dist/esm/external-providers/frontend-capability-runtime.shared.types.js.map +1 -1
  251. package/dist/esm/external-providers/frontend-provider-entry.shared.schemas.d.ts.map +1 -1
  252. package/dist/esm/external-providers/frontend-provider-entry.shared.schemas.js.map +1 -1
  253. package/dist/esm/external-providers/frontend-provider-public-config.shared.d.ts.map +1 -1
  254. package/dist/esm/external-providers/frontend-provider-public-config.shared.js.map +1 -1
  255. package/dist/esm/external-providers/model-cost-accounting-config.shared.schemas.d.ts.map +1 -1
  256. package/dist/esm/external-providers/model-cost-accounting-config.shared.schemas.js.map +1 -1
  257. package/dist/esm/external-providers/provider-address-lookup-contract.shared.types.d.ts.map +1 -1
  258. package/dist/esm/external-providers/provider-address-lookup-contract.shared.types.js.map +1 -1
  259. package/dist/esm/external-providers/provider-augmentation-opt-ins.shared.schemas.d.ts.map +1 -1
  260. package/dist/esm/external-providers/provider-augmentation-opt-ins.shared.schemas.js.map +1 -1
  261. package/dist/esm/external-providers/provider-authentication-assurance.shared.schemas.d.ts.map +1 -1
  262. package/dist/esm/external-providers/provider-authentication-assurance.shared.schemas.js.map +1 -1
  263. package/dist/esm/external-providers/provider-browser-operations.shared.schemas.d.ts.map +1 -1
  264. package/dist/esm/external-providers/provider-browser-operations.shared.schemas.js.map +1 -1
  265. package/dist/esm/external-providers/provider-capability.shared.schemas.d.ts.map +1 -1
  266. package/dist/esm/external-providers/provider-capability.shared.schemas.js.map +1 -1
  267. package/dist/esm/external-providers/provider-compliance-profile.shared.schemas.d.ts.map +1 -1
  268. package/dist/esm/external-providers/provider-compliance-profile.shared.schemas.js.map +1 -1
  269. package/dist/esm/external-providers/provider-frontend-component-contract.shared.types.d.ts.map +1 -1
  270. package/dist/esm/external-providers/provider-frontend-component-contract.shared.types.js.map +1 -1
  271. package/dist/esm/external-providers/provider-frontend-surface.shared.schemas.d.ts.map +1 -1
  272. package/dist/esm/external-providers/provider-frontend-surface.shared.schemas.js.map +1 -1
  273. package/dist/esm/external-providers/provider-metadata.shared.schemas.d.ts.map +1 -1
  274. package/dist/esm/external-providers/provider-metadata.shared.schemas.js.map +1 -1
  275. package/dist/esm/external-providers/provider-package-allow-list.shared.schemas.d.ts.map +1 -1
  276. package/dist/esm/external-providers/provider-package-allow-list.shared.schemas.js.map +1 -1
  277. package/dist/esm/external-providers/provider-protocol.shared.schemas.d.ts.map +1 -1
  278. package/dist/esm/external-providers/provider-protocol.shared.schemas.js.map +1 -1
  279. package/dist/esm/external-providers/provider-scope-reauthorization.shared.schemas.d.ts.map +1 -1
  280. package/dist/esm/external-providers/provider-scope-reauthorization.shared.schemas.js.map +1 -1
  281. package/dist/esm/external-providers/provider-shared-connections.shared.schemas.d.ts.map +1 -1
  282. package/dist/esm/external-providers/provider-shared-connections.shared.schemas.js.map +1 -1
  283. package/dist/esm/external-providers/provider-tier-rule.shared.utils.d.ts.map +1 -1
  284. package/dist/esm/external-providers/provider-tier-rule.shared.utils.js.map +1 -1
  285. package/dist/esm/external-providers/provider-usage-cost.shared.d.ts.map +1 -1
  286. package/dist/esm/external-providers/provider-usage-cost.shared.js.map +1 -1
  287. package/dist/esm/external-providers/provider-usage-pricing.example.d.ts.map +1 -1
  288. package/dist/esm/external-providers/provider-usage-pricing.example.js.map +1 -1
  289. package/dist/esm/external-providers/provider-usage-pricing.shared.schemas.d.ts.map +1 -1
  290. package/dist/esm/external-providers/provider-usage-pricing.shared.schemas.js.map +1 -1
  291. package/dist/esm/features/application-features.shared.resources-config.schemas.d.ts.map +1 -1
  292. package/dist/esm/features/application-features.shared.resources-config.schemas.js.map +1 -1
  293. package/dist/esm/features/connected-feature.example.d.ts.map +1 -1
  294. package/dist/esm/features/connected-feature.example.js.map +1 -1
  295. package/dist/esm/features/core-feature-definitions.shared.d.ts.map +1 -1
  296. package/dist/esm/features/core-feature-definitions.shared.js.map +1 -1
  297. package/dist/esm/features/feature-builders.shared.d.ts.map +1 -1
  298. package/dist/esm/features/feature-builders.shared.js.map +1 -1
  299. package/dist/esm/features/feature-definition.shared.schemas.d.ts.map +1 -1
  300. package/dist/esm/features/feature-definition.shared.schemas.js.map +1 -1
  301. package/dist/esm/features/feature-registry.shared.d.ts.map +1 -1
  302. package/dist/esm/features/feature-registry.shared.js.map +1 -1
  303. package/dist/esm/features/feature-resolution.shared.schemas.d.ts.map +1 -1
  304. package/dist/esm/features/feature-resolution.shared.schemas.js.map +1 -1
  305. package/dist/esm/features/scope-features.shared.schemas.d.ts.map +1 -1
  306. package/dist/esm/features/scope-features.shared.schemas.js.map +1 -1
  307. package/dist/esm/features/user-features.shared.resources-config.schemas.d.ts.map +1 -1
  308. package/dist/esm/features/user-features.shared.resources-config.schemas.js.map +1 -1
  309. package/dist/esm/files/file-remote-reference-link.shared.schemas.d.ts.map +1 -1
  310. package/dist/esm/files/file-remote-reference-link.shared.schemas.js.map +1 -1
  311. package/dist/esm/files/file-upload-grant.shared.schemas.d.ts.map +1 -1
  312. package/dist/esm/files/file-upload-grant.shared.schemas.js.map +1 -1
  313. package/dist/esm/files/files.shared.resources-config.schemas.d.ts.map +1 -1
  314. package/dist/esm/files/files.shared.resources-config.schemas.js.map +1 -1
  315. package/dist/esm/files/files.shared.schemas.d.ts.map +1 -1
  316. package/dist/esm/files/files.shared.schemas.js.map +1 -1
  317. package/dist/esm/files/files.shared.utils.d.ts.map +1 -1
  318. package/dist/esm/files/files.shared.utils.js.map +1 -1
  319. package/dist/esm/flows-actors/a2a-push-delivery-log.shared.resources-config.schemas.d.ts.map +1 -1
  320. package/dist/esm/flows-actors/a2a-push-delivery-log.shared.resources-config.schemas.js.map +1 -1
  321. package/dist/esm/flows-actors/a2a-push-delivery-log.shared.schemas.d.ts.map +1 -1
  322. package/dist/esm/flows-actors/a2a-push-delivery-log.shared.schemas.js.map +1 -1
  323. package/dist/esm/flows-actors/a2a-token-budget-state.shared.resources-config.schemas.d.ts.map +1 -1
  324. package/dist/esm/flows-actors/a2a-token-budget-state.shared.resources-config.schemas.js.map +1 -1
  325. package/dist/esm/flows-actors/a2a-token-budget-state.shared.schemas.d.ts.map +1 -1
  326. package/dist/esm/flows-actors/a2a-token-budget-state.shared.schemas.js.map +1 -1
  327. package/dist/esm/flows-actors/actors.shared.schemas.d.ts.map +1 -1
  328. package/dist/esm/flows-actors/actors.shared.schemas.js.map +1 -1
  329. package/dist/esm/flows-actors/agent-traceability.shared.schemas.d.ts.map +1 -1
  330. package/dist/esm/flows-actors/agent-traceability.shared.schemas.js.map +1 -1
  331. package/dist/esm/flows-actors/agent-work-decisions.shared.resources-config.schemas.d.ts.map +1 -1
  332. package/dist/esm/flows-actors/agent-work-decisions.shared.resources-config.schemas.js.map +1 -1
  333. package/dist/esm/flows-actors/agent-work-decisions.shared.schemas.d.ts.map +1 -1
  334. package/dist/esm/flows-actors/agent-work-decisions.shared.schemas.js.map +1 -1
  335. package/dist/esm/flows-actors/agents.shared.schemas.d.ts.map +1 -1
  336. package/dist/esm/flows-actors/agents.shared.schemas.js.map +1 -1
  337. package/dist/esm/flows-actors/autonomous-agents.shared.schemas.d.ts.map +1 -1
  338. package/dist/esm/flows-actors/autonomous-agents.shared.schemas.js.map +1 -1
  339. package/dist/esm/flows-actors/deliberation.shared.schemas.d.ts.map +1 -1
  340. package/dist/esm/flows-actors/deliberation.shared.schemas.js.map +1 -1
  341. package/dist/esm/flows-actors/execution-plan-readiness.shared.utils.d.ts.map +1 -1
  342. package/dist/esm/flows-actors/execution-plan-readiness.shared.utils.js.map +1 -1
  343. package/dist/esm/flows-actors/flows-actors-execution.shared.resources-config.schemas.d.ts.map +1 -1
  344. package/dist/esm/flows-actors/flows-actors-execution.shared.resources-config.schemas.js.map +1 -1
  345. package/dist/esm/flows-actors/flows-actors-execution.shared.schemas.d.ts.map +1 -1
  346. package/dist/esm/flows-actors/flows-actors-execution.shared.schemas.js.map +1 -1
  347. package/dist/esm/flows-actors/flows-actors-task.shared.resources-config.schemas.d.ts.map +1 -1
  348. package/dist/esm/flows-actors/flows-actors-task.shared.resources-config.schemas.js.map +1 -1
  349. package/dist/esm/flows-actors/flows-actors-task.shared.schemas.d.ts.map +1 -1
  350. package/dist/esm/flows-actors/flows-actors-task.shared.schemas.js.map +1 -1
  351. package/dist/esm/flows-actors/flows-actors.commons.shared.schemas.d.ts.map +1 -1
  352. package/dist/esm/flows-actors/flows-actors.commons.shared.schemas.js.map +1 -1
  353. package/dist/esm/flows-actors/flows-actors.configuration.shared.schemas.d.ts.map +1 -1
  354. package/dist/esm/flows-actors/flows-actors.configuration.shared.schemas.js.map +1 -1
  355. package/dist/esm/flows-actors/flows-actors.frontend.shared.schemas.d.ts.map +1 -1
  356. package/dist/esm/flows-actors/flows-actors.frontend.shared.schemas.js.map +1 -1
  357. package/dist/esm/flows-actors/flows-actors.io.shared.schemas.d.ts.map +1 -1
  358. package/dist/esm/flows-actors/flows-actors.io.shared.schemas.js.map +1 -1
  359. package/dist/esm/flows-actors/flows-actors.system.shared.definitions.d.ts.map +1 -1
  360. package/dist/esm/flows-actors/flows-actors.system.shared.definitions.js.map +1 -1
  361. package/dist/esm/flows-actors/flows-actors.system.shared.schemas.d.ts.map +1 -1
  362. package/dist/esm/flows-actors/flows-actors.system.shared.schemas.js.map +1 -1
  363. package/dist/esm/flows-actors/flows.shared.schemas.d.ts.map +1 -1
  364. package/dist/esm/flows-actors/flows.shared.schemas.js.map +1 -1
  365. package/dist/esm/flows-actors/human-decision.shared.schemas.d.ts.map +1 -1
  366. package/dist/esm/flows-actors/human-decision.shared.schemas.js.map +1 -1
  367. package/dist/esm/flows-actors/mcp-servers.shared.schemas.d.ts.map +1 -1
  368. package/dist/esm/flows-actors/mcp-servers.shared.schemas.js.map +1 -1
  369. package/dist/esm/flows-actors/model-call-attributions.shared.resources-config.schemas.d.ts.map +1 -1
  370. package/dist/esm/flows-actors/model-call-attributions.shared.resources-config.schemas.js.map +1 -1
  371. package/dist/esm/flows-actors/model-call-attributions.shared.schemas.d.ts.map +1 -1
  372. package/dist/esm/flows-actors/model-call-attributions.shared.schemas.js.map +1 -1
  373. package/dist/esm/flows-actors/model-cost-period-aggregates.shared.resources-config.schemas.d.ts.map +1 -1
  374. package/dist/esm/flows-actors/model-cost-period-aggregates.shared.resources-config.schemas.js.map +1 -1
  375. package/dist/esm/flows-actors/model-cost-period-aggregates.shared.schemas.d.ts.map +1 -1
  376. package/dist/esm/flows-actors/model-cost-period-aggregates.shared.schemas.js.map +1 -1
  377. package/dist/esm/flows-actors/model-cost-summary.shared.schemas.d.ts.map +1 -1
  378. package/dist/esm/flows-actors/model-cost-summary.shared.schemas.js.map +1 -1
  379. package/dist/esm/flows-actors/prompt-ir.shared.schemas.d.ts.map +1 -1
  380. package/dist/esm/flows-actors/prompt-ir.shared.schemas.js.map +1 -1
  381. package/dist/esm/flows-actors/provider-call-records.shared.resources-config.schemas.d.ts.map +1 -1
  382. package/dist/esm/flows-actors/provider-call-records.shared.resources-config.schemas.js.map +1 -1
  383. package/dist/esm/flows-actors/provider-call-records.shared.schemas.d.ts.map +1 -1
  384. package/dist/esm/flows-actors/provider-call-records.shared.schemas.js.map +1 -1
  385. package/dist/esm/flows-actors/review-deadlines.shared.schemas.d.ts.map +1 -1
  386. package/dist/esm/flows-actors/review-deadlines.shared.schemas.js.map +1 -1
  387. package/dist/esm/flows-actors/tasks.actors.shared.schemas.d.ts.map +1 -1
  388. package/dist/esm/flows-actors/tasks.actors.shared.schemas.js.map +1 -1
  389. package/dist/esm/flows-actors/work-attribution.shared.schemas.d.ts.map +1 -1
  390. package/dist/esm/flows-actors/work-attribution.shared.schemas.js.map +1 -1
  391. package/dist/esm/frontend-definitions/frontend-notification-custom-message-ref.definitions.d.ts.map +1 -1
  392. package/dist/esm/frontend-definitions/frontend-notification-custom-message-ref.definitions.js.map +1 -1
  393. package/dist/esm/frontend-definitions/settings-destination-ref.definitions.d.ts.map +1 -1
  394. package/dist/esm/frontend-definitions/settings-destination-ref.definitions.js.map +1 -1
  395. package/dist/esm/guidance/guidance-flow.shared.schemas.d.ts.map +1 -1
  396. package/dist/esm/guidance/guidance-flow.shared.schemas.js.map +1 -1
  397. package/dist/esm/guidance/guidance-state.shared.resources-config.schemas.d.ts.map +1 -1
  398. package/dist/esm/guidance/guidance-state.shared.resources-config.schemas.js.map +1 -1
  399. package/dist/esm/guidance/guidance-state.shared.schemas.d.ts.map +1 -1
  400. package/dist/esm/guidance/guidance-state.shared.schemas.js.map +1 -1
  401. package/dist/esm/guidance/guidance-state.shared.utils.d.ts.map +1 -1
  402. package/dist/esm/guidance/guidance-state.shared.utils.js.map +1 -1
  403. package/dist/esm/guidance/lifecycle-config.shared.schemas.d.ts.map +1 -1
  404. package/dist/esm/guidance/lifecycle-config.shared.schemas.js.map +1 -1
  405. package/dist/esm/guidance/lifecycle-state.shared.resources-config.schemas.d.ts.map +1 -1
  406. package/dist/esm/guidance/lifecycle-state.shared.resources-config.schemas.js.map +1 -1
  407. package/dist/esm/guidance/lifecycle-state.shared.schemas.d.ts.map +1 -1
  408. package/dist/esm/guidance/lifecycle-state.shared.schemas.js.map +1 -1
  409. package/dist/esm/guidance/milestone-builders.shared.d.ts.map +1 -1
  410. package/dist/esm/guidance/milestone-builders.shared.js.map +1 -1
  411. package/dist/esm/guidance/milestone-definition.shared.schemas.d.ts.map +1 -1
  412. package/dist/esm/guidance/milestone-definition.shared.schemas.js.map +1 -1
  413. package/dist/esm/guidance/progression-presentation.shared.schemas.d.ts.map +1 -1
  414. package/dist/esm/guidance/progression-presentation.shared.schemas.js.map +1 -1
  415. package/dist/esm/guidance/progression-state.shared.resources-config.schemas.d.ts.map +1 -1
  416. package/dist/esm/guidance/progression-state.shared.resources-config.schemas.js.map +1 -1
  417. package/dist/esm/guidance/progression-state.shared.schemas.d.ts.map +1 -1
  418. package/dist/esm/guidance/progression-state.shared.schemas.js.map +1 -1
  419. package/dist/esm/http-api-binding/http-api-binding-id.shared.utils.d.ts.map +1 -1
  420. package/dist/esm/http-api-binding/http-api-binding-id.shared.utils.js.map +1 -1
  421. package/dist/esm/http-api-binding/http-api-binding.shared.schemas.d.ts.map +1 -1
  422. package/dist/esm/http-api-binding/http-api-binding.shared.schemas.js.map +1 -1
  423. package/dist/esm/http-api-binding/http-api-erasure-stance.shared.d.ts.map +1 -1
  424. package/dist/esm/http-api-binding/http-api-erasure-stance.shared.js.map +1 -1
  425. package/dist/esm/http-api-binding/http-api-rest-write-operations.shared.schemas.d.ts.map +1 -1
  426. package/dist/esm/http-api-binding/http-api-rest-write-operations.shared.schemas.js.map +1 -1
  427. package/dist/esm/http-api-binding/http-api-transport-dialect.shared.d.ts.map +1 -1
  428. package/dist/esm/http-api-binding/http-api-transport-dialect.shared.js.map +1 -1
  429. package/dist/esm/http-api-binding/read-through-engine-anchors.shared.d.ts.map +1 -1
  430. package/dist/esm/http-api-binding/read-through-engine-anchors.shared.js.map +1 -1
  431. package/dist/esm/i18n/application-config-vocabulary.shared.d.ts.map +1 -1
  432. package/dist/esm/i18n/application-config-vocabulary.shared.js.map +1 -1
  433. package/dist/esm/i18n/engine-open-vocabulary-values.shared.d.ts.map +1 -1
  434. package/dist/esm/i18n/engine-open-vocabulary-values.shared.js.map +1 -1
  435. package/dist/esm/i18n/engine-open-vocabulary.shared.d.ts.map +1 -1
  436. package/dist/esm/i18n/engine-open-vocabulary.shared.js.map +1 -1
  437. package/dist/esm/i18n/interpolate-label-params.shared.utils.d.ts.map +1 -1
  438. package/dist/esm/i18n/interpolate-label-params.shared.utils.js.map +1 -1
  439. package/dist/esm/i18n/labelling.dto.shared.schemas.d.ts.map +1 -1
  440. package/dist/esm/i18n/labelling.dto.shared.schemas.js.map +1 -1
  441. package/dist/esm/inbound/conversation-threads.shared.resources-config.schemas.d.ts.map +1 -1
  442. package/dist/esm/inbound/conversation-threads.shared.resources-config.schemas.js.map +1 -1
  443. package/dist/esm/inbound/conversation-threads.shared.schemas.d.ts.map +1 -1
  444. package/dist/esm/inbound/conversation-threads.shared.schemas.js.map +1 -1
  445. package/dist/esm/inbound/inbound-channels.shared.schemas.d.ts.map +1 -1
  446. package/dist/esm/inbound/inbound-channels.shared.schemas.js.map +1 -1
  447. package/dist/esm/inbound/inbound-delivery.shared.resources-config.schemas.d.ts.map +1 -1
  448. package/dist/esm/inbound/inbound-delivery.shared.resources-config.schemas.js.map +1 -1
  449. package/dist/esm/inbound/inbound-delivery.shared.schemas.d.ts.map +1 -1
  450. package/dist/esm/inbound/inbound-delivery.shared.schemas.js.map +1 -1
  451. package/dist/esm/inbound/inbound-endpoint-env.shared.d.ts.map +1 -1
  452. package/dist/esm/inbound/inbound-endpoint-env.shared.js.map +1 -1
  453. package/dist/esm/index.d.ts.map +1 -1
  454. package/dist/esm/index.js.map +1 -1
  455. package/dist/esm/meta-workflows/actions.meta-workflows.shared.schemas.d.ts.map +1 -1
  456. package/dist/esm/meta-workflows/actions.meta-workflows.shared.schemas.js.map +1 -1
  457. package/dist/esm/meta-workflows/catalog.meta-workflows.shared.schemas.d.ts.map +1 -1
  458. package/dist/esm/meta-workflows/catalog.meta-workflows.shared.schemas.js.map +1 -1
  459. package/dist/esm/meta-workflows/coding-tasks.meta-workflows.shared.schemas.d.ts.map +1 -1
  460. package/dist/esm/meta-workflows/coding-tasks.meta-workflows.shared.schemas.js.map +1 -1
  461. package/dist/esm/meta-workflows/context-selection.meta-workflows.shared.schemas.d.ts.map +1 -1
  462. package/dist/esm/meta-workflows/context-selection.meta-workflows.shared.schemas.js.map +1 -1
  463. package/dist/esm/meta-workflows/decisions.meta-workflows.shared.schemas.d.ts.map +1 -1
  464. package/dist/esm/meta-workflows/decisions.meta-workflows.shared.schemas.js.map +1 -1
  465. package/dist/esm/meta-workflows/orchestration.meta-workflows.shared.schemas.d.ts.map +1 -1
  466. package/dist/esm/meta-workflows/orchestration.meta-workflows.shared.schemas.js.map +1 -1
  467. package/dist/esm/meta-workflows/portable-primitives.meta-workflows.shared.schemas.d.ts.map +1 -1
  468. package/dist/esm/meta-workflows/portable-primitives.meta-workflows.shared.schemas.js.map +1 -1
  469. package/dist/esm/meta-workflows.exports.d.ts.map +1 -1
  470. package/dist/esm/meta-workflows.exports.js.map +1 -1
  471. package/dist/esm/monitoring/monitoring.shared.schemas.d.ts.map +1 -1
  472. package/dist/esm/monitoring/monitoring.shared.schemas.js.map +1 -1
  473. package/dist/esm/notifications/email/email-context.shared.schemas.d.ts.map +1 -1
  474. package/dist/esm/notifications/email/email-context.shared.schemas.js.map +1 -1
  475. package/dist/esm/notifications/email/email-submission.shared.enums.d.ts.map +1 -1
  476. package/dist/esm/notifications/email/email-submission.shared.enums.js.map +1 -1
  477. package/dist/esm/notifications/email/email-template-registry.shared.schemas.d.ts.map +1 -1
  478. package/dist/esm/notifications/email/email-template-registry.shared.schemas.js.map +1 -1
  479. package/dist/esm/notifications/email/email-template.shared.enums.d.ts.map +1 -1
  480. package/dist/esm/notifications/email/email-template.shared.enums.js.map +1 -1
  481. package/dist/esm/notifications/inbound-email/inbound-email.shared.resources-config.schemas.d.ts.map +1 -1
  482. package/dist/esm/notifications/inbound-email/inbound-email.shared.resources-config.schemas.js.map +1 -1
  483. package/dist/esm/notifications/inbound-email/inbound-email.shared.schemas.d.ts.map +1 -1
  484. package/dist/esm/notifications/inbound-email/inbound-email.shared.schemas.js.map +1 -1
  485. package/dist/esm/notifications/m2m/m2m-webhook-delivery-contract.shared.d.ts.map +1 -1
  486. package/dist/esm/notifications/m2m/m2m-webhook-delivery-contract.shared.js.map +1 -1
  487. package/dist/esm/notifications/m2m/m2m-webhook-delivery-log.shared.resources-config.schemas.d.ts.map +1 -1
  488. package/dist/esm/notifications/m2m/m2m-webhook-delivery-log.shared.resources-config.schemas.js.map +1 -1
  489. package/dist/esm/notifications/m2m/m2m-webhook-delivery-log.shared.schemas.d.ts.map +1 -1
  490. package/dist/esm/notifications/m2m/m2m-webhook-delivery-log.shared.schemas.js.map +1 -1
  491. package/dist/esm/notifications/m2m/webhook-config.shared.resources-config.schemas.d.ts.map +1 -1
  492. package/dist/esm/notifications/m2m/webhook-config.shared.resources-config.schemas.js.map +1 -1
  493. package/dist/esm/notifications/m2m/webhook-config.shared.schemas.d.ts.map +1 -1
  494. package/dist/esm/notifications/m2m/webhook-config.shared.schemas.js.map +1 -1
  495. package/dist/esm/notifications/notification-badges.core.definitions.d.ts.map +1 -1
  496. package/dist/esm/notifications/notification-badges.core.definitions.js.map +1 -1
  497. package/dist/esm/notifications/notification-badges.schemas.d.ts.map +1 -1
  498. package/dist/esm/notifications/notification-badges.schemas.js.map +1 -1
  499. package/dist/esm/notifications/notification-badges.shared.resources-config.schemas.d.ts.map +1 -1
  500. package/dist/esm/notifications/notification-badges.shared.resources-config.schemas.js.map +1 -1
  501. package/dist/esm/notifications/notifications.shared.schemas.d.ts.map +1 -1
  502. package/dist/esm/notifications/notifications.shared.schemas.js.map +1 -1
  503. package/dist/esm/organizations/application-owner-organization.shared.schemas.d.ts.map +1 -1
  504. package/dist/esm/organizations/application-owner-organization.shared.schemas.js.map +1 -1
  505. package/dist/esm/organizations/organization-features.shared.resources-config.schemas.d.ts.map +1 -1
  506. package/dist/esm/organizations/organization-features.shared.resources-config.schemas.js.map +1 -1
  507. package/dist/esm/organizations/organization-features.shared.schemas.d.ts.map +1 -1
  508. package/dist/esm/organizations/organization-features.shared.schemas.js.map +1 -1
  509. package/dist/esm/organizations/organization-members.shared.resources-config.schemas.d.ts.map +1 -1
  510. package/dist/esm/organizations/organization-members.shared.resources-config.schemas.js.map +1 -1
  511. package/dist/esm/organizations/organization-members.shared.schemas.d.ts.map +1 -1
  512. package/dist/esm/organizations/organization-members.shared.schemas.js.map +1 -1
  513. package/dist/esm/organizations/organization-notifications.shared.resources-config.schemas.d.ts.map +1 -1
  514. package/dist/esm/organizations/organization-notifications.shared.resources-config.schemas.js.map +1 -1
  515. package/dist/esm/organizations/organization-notifications.shared.schemas.d.ts.map +1 -1
  516. package/dist/esm/organizations/organization-notifications.shared.schemas.js.map +1 -1
  517. package/dist/esm/organizations/organization-preferences.shared.resources-config.schemas.d.ts.map +1 -1
  518. package/dist/esm/organizations/organization-preferences.shared.resources-config.schemas.js.map +1 -1
  519. package/dist/esm/organizations/organization-preferences.shared.schemas.d.ts.map +1 -1
  520. package/dist/esm/organizations/organization-preferences.shared.schemas.js.map +1 -1
  521. package/dist/esm/organizations/organization-profile.shared.resources-config.schemas.d.ts.map +1 -1
  522. package/dist/esm/organizations/organization-profile.shared.resources-config.schemas.js.map +1 -1
  523. package/dist/esm/organizations/organization-profile.shared.schemas.d.ts.map +1 -1
  524. package/dist/esm/organizations/organization-profile.shared.schemas.js.map +1 -1
  525. package/dist/esm/organizations/organization-unit-inheritance.shared.d.ts.map +1 -1
  526. package/dist/esm/organizations/organization-unit-inheritance.shared.js.map +1 -1
  527. package/dist/esm/organizations/organization-unit-members.shared.resources-config.schemas.d.ts.map +1 -1
  528. package/dist/esm/organizations/organization-unit-members.shared.resources-config.schemas.js.map +1 -1
  529. package/dist/esm/organizations/organization-unit-members.shared.schemas.d.ts.map +1 -1
  530. package/dist/esm/organizations/organization-unit-members.shared.schemas.js.map +1 -1
  531. package/dist/esm/organizations/organization-unit-narrowing-decision.shared.d.ts.map +1 -1
  532. package/dist/esm/organizations/organization-unit-narrowing-decision.shared.js.map +1 -1
  533. package/dist/esm/organizations/organization-unit-narrowing.example.d.ts.map +1 -1
  534. package/dist/esm/organizations/organization-unit-narrowing.example.js.map +1 -1
  535. package/dist/esm/organizations/organization-unit-narrowing.shared.d.ts.map +1 -1
  536. package/dist/esm/organizations/organization-unit-narrowing.shared.js.map +1 -1
  537. package/dist/esm/organizations/organization-units.shared.path.d.ts.map +1 -1
  538. package/dist/esm/organizations/organization-units.shared.path.js.map +1 -1
  539. package/dist/esm/organizations/organization-units.shared.resources-config.schemas.d.ts.map +1 -1
  540. package/dist/esm/organizations/organization-units.shared.resources-config.schemas.js.map +1 -1
  541. package/dist/esm/organizations/organization-units.shared.schemas.d.ts.map +1 -1
  542. package/dist/esm/organizations/organization-units.shared.schemas.js.map +1 -1
  543. package/dist/esm/organizations/organizations.shared.resources-config.schemas.d.ts.map +1 -1
  544. package/dist/esm/organizations/organizations.shared.resources-config.schemas.js.map +1 -1
  545. package/dist/esm/organizations/organizations.shared.schemas.d.ts.map +1 -1
  546. package/dist/esm/organizations/organizations.shared.schemas.js.map +1 -1
  547. package/dist/esm/organizations/service-provider-activity-feed.shared.resources-config.schemas.d.ts.map +1 -1
  548. package/dist/esm/organizations/service-provider-activity-feed.shared.resources-config.schemas.js.map +1 -1
  549. package/dist/esm/organizations/service-provider-activity-feed.shared.schemas.d.ts.map +1 -1
  550. package/dist/esm/organizations/service-provider-activity-feed.shared.schemas.js.map +1 -1
  551. package/dist/esm/organizations/service-provider-capability-grants.shared.resources-config.schemas.d.ts.map +1 -1
  552. package/dist/esm/organizations/service-provider-capability-grants.shared.resources-config.schemas.js.map +1 -1
  553. package/dist/esm/organizations/service-provider-capability-grants.shared.schemas.d.ts.map +1 -1
  554. package/dist/esm/organizations/service-provider-capability-grants.shared.schemas.js.map +1 -1
  555. package/dist/esm/organizations/service-provider-client-controls.shared.schemas.d.ts.map +1 -1
  556. package/dist/esm/organizations/service-provider-client-controls.shared.schemas.js.map +1 -1
  557. package/dist/esm/organizations/service-provider-relationships.shared.resources-config.schemas.d.ts.map +1 -1
  558. package/dist/esm/organizations/service-provider-relationships.shared.resources-config.schemas.js.map +1 -1
  559. package/dist/esm/organizations/service-provider-relationships.shared.schemas.d.ts.map +1 -1
  560. package/dist/esm/organizations/service-provider-relationships.shared.schemas.js.map +1 -1
  561. package/dist/esm/organizations/tenant-teardown-config.shared.schemas.d.ts.map +1 -1
  562. package/dist/esm/organizations/tenant-teardown-config.shared.schemas.js.map +1 -1
  563. package/dist/esm/provider-registration-runtime.exports.d.ts.map +1 -1
  564. package/dist/esm/provider-registration-runtime.exports.js.map +1 -1
  565. package/dist/esm/public-runtime/index.d.ts.map +1 -1
  566. package/dist/esm/public-runtime/index.js.map +1 -1
  567. package/dist/esm/queue/jobs.shared.resources-config.schemas.d.ts.map +1 -1
  568. package/dist/esm/queue/jobs.shared.resources-config.schemas.js.map +1 -1
  569. package/dist/esm/queue/jobs.shared.schemas.d.ts.map +1 -1
  570. package/dist/esm/queue/jobs.shared.schemas.js.map +1 -1
  571. package/dist/esm/queue/jobs.shared.utils.d.ts.map +1 -1
  572. package/dist/esm/queue/jobs.shared.utils.js.map +1 -1
  573. package/dist/esm/queue/queues.shared.schemas.d.ts.map +1 -1
  574. package/dist/esm/queue/queues.shared.schemas.js.map +1 -1
  575. package/dist/esm/queue/queues.shared.utils.d.ts.map +1 -1
  576. package/dist/esm/queue/queues.shared.utils.js.map +1 -1
  577. package/dist/esm/queue/rabbitmq-queue-args.shared.d.ts.map +1 -1
  578. package/dist/esm/queue/rabbitmq-queue-args.shared.js.map +1 -1
  579. package/dist/esm/rag/rag-retrieval-health.shared.d.ts.map +1 -1
  580. package/dist/esm/rag/rag-retrieval-health.shared.js.map +1 -1
  581. package/dist/esm/requests/header-keys.shared.d.ts.map +1 -1
  582. package/dist/esm/requests/header-keys.shared.js.map +1 -1
  583. package/dist/esm/requests/http-requests.shared.d.ts.map +1 -1
  584. package/dist/esm/requests/http-requests.shared.js.map +1 -1
  585. package/dist/esm/requests/idempotency-key.shared.d.ts.map +1 -1
  586. package/dist/esm/requests/idempotency-key.shared.js.map +1 -1
  587. package/dist/esm/requests/manual-controllers-routes-documentation.d.ts.map +1 -1
  588. package/dist/esm/requests/manual-controllers-routes-documentation.js.map +1 -1
  589. package/dist/esm/requests/manual-controllers-routes-urls.d.ts.map +1 -1
  590. package/dist/esm/requests/manual-controllers-routes-urls.js.map +1 -1
  591. package/dist/esm/requests/rate-limits.shared.schemas.d.ts.map +1 -1
  592. package/dist/esm/requests/rate-limits.shared.schemas.js.map +1 -1
  593. package/dist/esm/requests/websocket.shared.schemas.d.ts.map +1 -1
  594. package/dist/esm/requests/websocket.shared.schemas.js.map +1 -1
  595. package/dist/esm/resources/child-operations.shared.schemas.d.ts.map +1 -1
  596. package/dist/esm/resources/child-operations.shared.schemas.js.map +1 -1
  597. package/dist/esm/resources/collection-query-parameters.shared.d.ts.map +1 -1
  598. package/dist/esm/resources/collection-query-parameters.shared.js.map +1 -1
  599. package/dist/esm/resources/context-policy.shared.schemas.d.ts.map +1 -1
  600. package/dist/esm/resources/context-policy.shared.schemas.js.map +1 -1
  601. package/dist/esm/resources/embedded-resource-mark.shared.utils.d.ts.map +1 -1
  602. package/dist/esm/resources/embedded-resource-mark.shared.utils.js.map +1 -1
  603. package/dist/esm/resources/relationship-display.shared.schemas.d.ts.map +1 -1
  604. package/dist/esm/resources/relationship-display.shared.schemas.js.map +1 -1
  605. package/dist/esm/resources/resources-config.shared.factory.d.ts.map +1 -1
  606. package/dist/esm/resources/resources-config.shared.factory.js.map +1 -1
  607. package/dist/esm/resources/resources-config.shared.schemas.d.ts.map +1 -1
  608. package/dist/esm/resources/resources-config.shared.schemas.js.map +1 -1
  609. package/dist/esm/resources/resources-registry.shared.core.definitions.d.ts.map +1 -1
  610. package/dist/esm/resources/resources-registry.shared.core.definitions.js.map +1 -1
  611. package/dist/esm/resources/resources-relationships.shared.factory.d.ts.map +1 -1
  612. package/dist/esm/resources/resources-relationships.shared.factory.js.map +1 -1
  613. package/dist/esm/resources/resources-serialization.shared.schemas.d.ts.map +1 -1
  614. package/dist/esm/resources/resources-serialization.shared.schemas.js.map +1 -1
  615. package/dist/esm/resources/resources.shared.core.definitions.d.ts.map +1 -1
  616. package/dist/esm/resources/resources.shared.core.definitions.js.map +1 -1
  617. package/dist/esm/resources/resources.shared.schemas.d.ts.map +1 -1
  618. package/dist/esm/resources/resources.shared.schemas.js.map +1 -1
  619. package/dist/esm/resources/resources.shared.utils.d.ts.map +1 -1
  620. package/dist/esm/resources/resources.shared.utils.js.map +1 -1
  621. package/dist/esm/resources/utils/collection-export.shared.utils.d.ts.map +1 -1
  622. package/dist/esm/resources/utils/collection-export.shared.utils.js.map +1 -1
  623. package/dist/esm/resources/utils/composition-cascade-deletability.validation.d.ts.map +1 -1
  624. package/dist/esm/resources/utils/composition-cascade-deletability.validation.js.map +1 -1
  625. package/dist/esm/resources/utils/composition-seedability.validation.d.ts.map +1 -1
  626. package/dist/esm/resources/utils/composition-seedability.validation.js.map +1 -1
  627. package/dist/esm/resources/utils/context-addressed-composition-singleton.shared.utils.d.ts.map +1 -1
  628. package/dist/esm/resources/utils/context-addressed-composition-singleton.shared.utils.js.map +1 -1
  629. package/dist/esm/resources/utils/dependent-lifecycle-classification.validation.d.ts.map +1 -1
  630. package/dist/esm/resources/utils/dependent-lifecycle-classification.validation.js.map +1 -1
  631. package/dist/esm/resources/utils/duplicate-relationship-registration.validation.d.ts.map +1 -1
  632. package/dist/esm/resources/utils/duplicate-relationship-registration.validation.js.map +1 -1
  633. package/dist/esm/resources/utils/field-value-disclosure.utils.d.ts.map +1 -1
  634. package/dist/esm/resources/utils/field-value-disclosure.utils.js.map +1 -1
  635. package/dist/esm/resources/utils/http-api-write-declaration.shared.utils.d.ts.map +1 -1
  636. package/dist/esm/resources/utils/http-api-write-declaration.shared.utils.js.map +1 -1
  637. package/dist/esm/resources/utils/initiator-stamped-field-satisfiability.validation.d.ts.map +1 -1
  638. package/dist/esm/resources/utils/initiator-stamped-field-satisfiability.validation.js.map +1 -1
  639. package/dist/esm/resources/utils/no-subject-data-stance-coherence.shared.utils.d.ts.map +1 -1
  640. package/dist/esm/resources/utils/no-subject-data-stance-coherence.shared.utils.js.map +1 -1
  641. package/dist/esm/resources/utils/persistence-adapter-discrimination.shared.utils.d.ts.map +1 -1
  642. package/dist/esm/resources/utils/persistence-adapter-discrimination.shared.utils.js.map +1 -1
  643. package/dist/esm/resources/utils/populated-file-fields.shared.utils.d.ts.map +1 -1
  644. package/dist/esm/resources/utils/populated-file-fields.shared.utils.js.map +1 -1
  645. package/dist/esm/resources/utils/repository-dto-builder.utils.d.ts.map +1 -1
  646. package/dist/esm/resources/utils/repository-dto-builder.utils.js.map +1 -1
  647. package/dist/esm/resources/utils/request-schema-field-carriage.shared.utils.d.ts.map +1 -1
  648. package/dist/esm/resources/utils/request-schema-field-carriage.shared.utils.js.map +1 -1
  649. package/dist/esm/resources/utils/required-fk-fillability.validation.d.ts.map +1 -1
  650. package/dist/esm/resources/utils/required-fk-fillability.validation.js.map +1 -1
  651. package/dist/esm/resources/utils/resource-operation-type-guards.utils.d.ts.map +1 -1
  652. package/dist/esm/resources/utils/resource-operation-type-guards.utils.js.map +1 -1
  653. package/dist/esm/resources/utils/resource-polymorphism.factory.d.ts.map +1 -1
  654. package/dist/esm/resources/utils/resource-polymorphism.factory.js.map +1 -1
  655. package/dist/esm/resources/utils/resource-polymorphism.relationships.d.ts.map +1 -1
  656. package/dist/esm/resources/utils/resource-polymorphism.relationships.js.map +1 -1
  657. package/dist/esm/resources/utils/resource-polymorphism.schemas.d.ts.map +1 -1
  658. package/dist/esm/resources/utils/resource-polymorphism.schemas.js.map +1 -1
  659. package/dist/esm/resources/utils/resource-polymorphism.utils.d.ts.map +1 -1
  660. package/dist/esm/resources/utils/resource-polymorphism.utils.js.map +1 -1
  661. package/dist/esm/resources/utils/resource-subtree.utils.d.ts.map +1 -1
  662. package/dist/esm/resources/utils/resource-subtree.utils.js.map +1 -1
  663. package/dist/esm/resources/utils/resources-config-context-needs.utils.d.ts.map +1 -1
  664. package/dist/esm/resources/utils/resources-config-context-needs.utils.js.map +1 -1
  665. package/dist/esm/resources/utils/resources-config-naming.utils.d.ts.map +1 -1
  666. package/dist/esm/resources/utils/resources-config-naming.utils.js.map +1 -1
  667. package/dist/esm/resources/utils/resources-config-operations.dtos-builder.utils.d.ts.map +1 -1
  668. package/dist/esm/resources/utils/resources-config-operations.dtos-builder.utils.js.map +1 -1
  669. package/dist/esm/resources/utils/resources-config-operations.path.utils.d.ts.map +1 -1
  670. package/dist/esm/resources/utils/resources-config-operations.path.utils.js.map +1 -1
  671. package/dist/esm/resources/utils/resources-config-operations.urls-builder.utils.d.ts.map +1 -1
  672. package/dist/esm/resources/utils/resources-config-operations.urls-builder.utils.js.map +1 -1
  673. package/dist/esm/resources/utils/resources-config-operations.utils.d.ts.map +1 -1
  674. package/dist/esm/resources/utils/resources-config-operations.utils.js.map +1 -1
  675. package/dist/esm/resources/utils/resources-serialization.utils.d.ts.map +1 -1
  676. package/dist/esm/resources/utils/resources-serialization.utils.js.map +1 -1
  677. package/dist/esm/resources/utils/resources-summary.utils.d.ts.map +1 -1
  678. package/dist/esm/resources/utils/resources-summary.utils.js.map +1 -1
  679. package/dist/esm/resources/utils/schema-family-builder.utils.d.ts.map +1 -1
  680. package/dist/esm/resources/utils/schema-family-builder.utils.js.map +1 -1
  681. package/dist/esm/resources/utils/schema-type-inference.utils.d.ts.map +1 -1
  682. package/dist/esm/resources/utils/schema-type-inference.utils.js.map +1 -1
  683. package/dist/esm/resources/utils/schema-type-utils.d.ts.map +1 -1
  684. package/dist/esm/resources/utils/schema-type-utils.js.map +1 -1
  685. package/dist/esm/resources/utils/schema-variant-resolver.utils.d.ts.map +1 -1
  686. package/dist/esm/resources/utils/schema-variant-resolver.utils.js.map +1 -1
  687. package/dist/esm/resources/utils/shared-persistence-collection.utils.d.ts.map +1 -1
  688. package/dist/esm/resources/utils/shared-persistence-collection.utils.js.map +1 -1
  689. package/dist/esm/resources/utils/templatable-file-fields.shared.utils.d.ts.map +1 -1
  690. package/dist/esm/resources/utils/templatable-file-fields.shared.utils.js.map +1 -1
  691. package/dist/esm/resources/work-unit.shared.schemas.d.ts.map +1 -1
  692. package/dist/esm/resources/work-unit.shared.schemas.js.map +1 -1
  693. package/dist/esm/runtime/domain-module.shared.definitions.d.ts.map +1 -1
  694. package/dist/esm/runtime/domain-module.shared.definitions.js.map +1 -1
  695. package/dist/esm/runtime/execution-context.shared.schemas.d.ts.map +1 -1
  696. package/dist/esm/runtime/execution-context.shared.schemas.js.map +1 -1
  697. package/dist/esm/runtime/runtime.shared.schemas.d.ts.map +1 -1
  698. package/dist/esm/runtime/runtime.shared.schemas.js.map +1 -1
  699. package/dist/esm/security/api-keys/api-keys-application.shared.resources-config.schemas.d.ts.map +1 -1
  700. package/dist/esm/security/api-keys/api-keys-application.shared.resources-config.schemas.js.map +1 -1
  701. package/dist/esm/security/api-keys/api-keys-organization.shared.resources-config.schemas.d.ts.map +1 -1
  702. package/dist/esm/security/api-keys/api-keys-organization.shared.resources-config.schemas.js.map +1 -1
  703. package/dist/esm/security/api-keys/api-keys.shared.schemas.d.ts.map +1 -1
  704. package/dist/esm/security/api-keys/api-keys.shared.schemas.js.map +1 -1
  705. package/dist/esm/security/authentications/anonymous-session/anonymous-session.shared.contract.d.ts.map +1 -1
  706. package/dist/esm/security/authentications/anonymous-session/anonymous-session.shared.contract.js.map +1 -1
  707. package/dist/esm/security/authentications/authentication.shared.dto.schemas.d.ts.map +1 -1
  708. package/dist/esm/security/authentications/authentication.shared.dto.schemas.js.map +1 -1
  709. package/dist/esm/security/authentications/authentication.shared.schemas.d.ts.map +1 -1
  710. package/dist/esm/security/authentications/authentication.shared.schemas.js.map +1 -1
  711. package/dist/esm/security/authentications/authentication.shared.utils.d.ts.map +1 -1
  712. package/dist/esm/security/authentications/authentication.shared.utils.js.map +1 -1
  713. package/dist/esm/security/authentications/consumable-token.shared.schemas.d.ts.map +1 -1
  714. package/dist/esm/security/authentications/consumable-token.shared.schemas.js.map +1 -1
  715. package/dist/esm/security/authentications/cross-frontend-handoff.shared.dto.schemas.d.ts.map +1 -1
  716. package/dist/esm/security/authentications/cross-frontend-handoff.shared.dto.schemas.js.map +1 -1
  717. package/dist/esm/security/authentications/mfa-backup-code-contract.shared.d.ts.map +1 -1
  718. package/dist/esm/security/authentications/mfa-backup-code-contract.shared.js.map +1 -1
  719. package/dist/esm/security/authentications/password-blocklist.shared.utils.d.ts.map +1 -1
  720. package/dist/esm/security/authentications/password-blocklist.shared.utils.js.map +1 -1
  721. package/dist/esm/security/authentications/password-reset.shared.dto.schemas.d.ts.map +1 -1
  722. package/dist/esm/security/authentications/password-reset.shared.dto.schemas.js.map +1 -1
  723. package/dist/esm/security/authentications/registration.shared.dto.schemas.d.ts.map +1 -1
  724. package/dist/esm/security/authentications/registration.shared.dto.schemas.js.map +1 -1
  725. package/dist/esm/security/authentications/same-origin-redirect-path.shared.d.ts.map +1 -1
  726. package/dist/esm/security/authentications/same-origin-redirect-path.shared.js.map +1 -1
  727. package/dist/esm/security/authentications/scim/scim-organization-unit-mapping.shared.d.ts.map +1 -1
  728. package/dist/esm/security/authentications/scim/scim-organization-unit-mapping.shared.js.map +1 -1
  729. package/dist/esm/security/authentications/scim/scim-provisioning-config.shared.resources-config.schemas.d.ts.map +1 -1
  730. package/dist/esm/security/authentications/scim/scim-provisioning-config.shared.resources-config.schemas.js.map +1 -1
  731. package/dist/esm/security/authentications/scim/scim-provisioning-config.shared.schemas.d.ts.map +1 -1
  732. package/dist/esm/security/authentications/scim/scim-provisioning-config.shared.schemas.js.map +1 -1
  733. package/dist/esm/security/authentications/scim/scim-tokens.shared.resources-config.schemas.d.ts.map +1 -1
  734. package/dist/esm/security/authentications/scim/scim-tokens.shared.resources-config.schemas.js.map +1 -1
  735. package/dist/esm/security/authentications/scim/scim-tokens.shared.schemas.d.ts.map +1 -1
  736. package/dist/esm/security/authentications/scim/scim-tokens.shared.schemas.js.map +1 -1
  737. package/dist/esm/security/authentications/service-provider-client-authentication.shared.schemas.d.ts.map +1 -1
  738. package/dist/esm/security/authentications/service-provider-client-authentication.shared.schemas.js.map +1 -1
  739. package/dist/esm/security/authentications/siem/siem-delivery-dlq.shared.resources-config.schemas.d.ts.map +1 -1
  740. package/dist/esm/security/authentications/siem/siem-delivery-dlq.shared.resources-config.schemas.js.map +1 -1
  741. package/dist/esm/security/authentications/siem/siem-delivery-dlq.shared.schemas.d.ts.map +1 -1
  742. package/dist/esm/security/authentications/siem/siem-delivery-dlq.shared.schemas.js.map +1 -1
  743. package/dist/esm/security/authentications/siem/siem-delivery-outbox.shared.resources-config.schemas.d.ts.map +1 -1
  744. package/dist/esm/security/authentications/siem/siem-delivery-outbox.shared.resources-config.schemas.js.map +1 -1
  745. package/dist/esm/security/authentications/siem/siem-delivery-outbox.shared.schemas.d.ts.map +1 -1
  746. package/dist/esm/security/authentications/siem/siem-delivery-outbox.shared.schemas.js.map +1 -1
  747. package/dist/esm/security/authentications/siem/siem-delivery-reliability-contract.shared.d.ts.map +1 -1
  748. package/dist/esm/security/authentications/siem/siem-delivery-reliability-contract.shared.js.map +1 -1
  749. package/dist/esm/security/authentications/siem/siem-export-config.shared.resources-config.schemas.d.ts.map +1 -1
  750. package/dist/esm/security/authentications/siem/siem-export-config.shared.resources-config.schemas.js.map +1 -1
  751. package/dist/esm/security/authentications/siem/siem-export-config.shared.schemas.d.ts.map +1 -1
  752. package/dist/esm/security/authentications/siem/siem-export-config.shared.schemas.js.map +1 -1
  753. package/dist/esm/security/authentications/sso/sso-config.shared.resources-config.schemas.d.ts.map +1 -1
  754. package/dist/esm/security/authentications/sso/sso-config.shared.resources-config.schemas.js.map +1 -1
  755. package/dist/esm/security/authentications/sso/sso-config.shared.schemas.d.ts.map +1 -1
  756. package/dist/esm/security/authentications/sso/sso-config.shared.schemas.js.map +1 -1
  757. package/dist/esm/security/authentications/sso/sso-connection.shared.resources-config.schemas.d.ts.map +1 -1
  758. package/dist/esm/security/authentications/sso/sso-connection.shared.resources-config.schemas.js.map +1 -1
  759. package/dist/esm/security/authentications/sso/sso-connection.shared.schemas.d.ts.map +1 -1
  760. package/dist/esm/security/authentications/sso/sso-connection.shared.schemas.js.map +1 -1
  761. package/dist/esm/security/authorizations/administrative-continuity.shared.schemas.d.ts.map +1 -1
  762. package/dist/esm/security/authorizations/administrative-continuity.shared.schemas.js.map +1 -1
  763. package/dist/esm/security/authorizations/application-access-grants.shared.resources-config.schemas.d.ts.map +1 -1
  764. package/dist/esm/security/authorizations/application-access-grants.shared.resources-config.schemas.js.map +1 -1
  765. package/dist/esm/security/authorizations/application-access-grants.shared.schemas.d.ts.map +1 -1
  766. package/dist/esm/security/authorizations/application-access-grants.shared.schemas.js.map +1 -1
  767. package/dist/esm/security/authorizations/platform-access-grants.shared.resources-config.schemas.d.ts.map +1 -1
  768. package/dist/esm/security/authorizations/platform-access-grants.shared.resources-config.schemas.js.map +1 -1
  769. package/dist/esm/security/authorizations/platform-access-grants.shared.schemas.d.ts.map +1 -1
  770. package/dist/esm/security/authorizations/platform-access-grants.shared.schemas.js.map +1 -1
  771. package/dist/esm/security/authorizations/roles.shared.defaults.d.ts.map +1 -1
  772. package/dist/esm/security/authorizations/roles.shared.defaults.js.map +1 -1
  773. package/dist/esm/security/authorizations/roles.shared.schemas.d.ts.map +1 -1
  774. package/dist/esm/security/authorizations/roles.shared.schemas.js.map +1 -1
  775. package/dist/esm/security/authorizations/roles.shared.utils.d.ts.map +1 -1
  776. package/dist/esm/security/authorizations/roles.shared.utils.js.map +1 -1
  777. package/dist/esm/security/connected-accounts/provider-connection-listing.shared.schemas.d.ts.map +1 -1
  778. package/dist/esm/security/connected-accounts/provider-connection-listing.shared.schemas.js.map +1 -1
  779. package/dist/esm/security/connected-accounts/provider-credentials-organization.shared.resources-config.schemas.d.ts.map +1 -1
  780. package/dist/esm/security/connected-accounts/provider-credentials-organization.shared.resources-config.schemas.js.map +1 -1
  781. package/dist/esm/security/connected-accounts/provider-credentials-user.shared.resources-config.schemas.d.ts.map +1 -1
  782. package/dist/esm/security/connected-accounts/provider-credentials-user.shared.resources-config.schemas.js.map +1 -1
  783. package/dist/esm/security/connected-accounts/provider-credentials.shared.schemas.d.ts.map +1 -1
  784. package/dist/esm/security/connected-accounts/provider-credentials.shared.schemas.js.map +1 -1
  785. package/dist/esm/security/credential-rotation-grace.shared.utils.d.ts.map +1 -1
  786. package/dist/esm/security/credential-rotation-grace.shared.utils.js.map +1 -1
  787. package/dist/esm/security/crypto-keys/crypto-keys.shared.schemas.d.ts.map +1 -1
  788. package/dist/esm/security/crypto-keys/crypto-keys.shared.schemas.js.map +1 -1
  789. package/dist/esm/security/oauth-clients/oauth-clients-application.shared.resources-config.schemas.d.ts.map +1 -1
  790. package/dist/esm/security/oauth-clients/oauth-clients-application.shared.resources-config.schemas.js.map +1 -1
  791. package/dist/esm/security/oauth-clients/oauth-clients-organization.shared.resources-config.schemas.d.ts.map +1 -1
  792. package/dist/esm/security/oauth-clients/oauth-clients-organization.shared.resources-config.schemas.js.map +1 -1
  793. package/dist/esm/security/oauth-clients/oauth-clients.shared.schemas.d.ts.map +1 -1
  794. package/dist/esm/security/oauth-clients/oauth-clients.shared.schemas.js.map +1 -1
  795. package/dist/esm/security/oauth-clients/oauth-consent-grants.shared.resources-config.schemas.d.ts.map +1 -1
  796. package/dist/esm/security/oauth-clients/oauth-consent-grants.shared.resources-config.schemas.js.map +1 -1
  797. package/dist/esm/security/oauth-clients/oauth-consent-grants.shared.schemas.d.ts.map +1 -1
  798. package/dist/esm/security/oauth-clients/oauth-consent-grants.shared.schemas.js.map +1 -1
  799. package/dist/esm/security/oauth-clients/oauth-resource-server.shared.schemas.d.ts.map +1 -1
  800. package/dist/esm/security/oauth-clients/oauth-resource-server.shared.schemas.js.map +1 -1
  801. package/dist/esm/security/outbound-target-control.shared.schemas.d.ts.map +1 -1
  802. package/dist/esm/security/outbound-target-control.shared.schemas.js.map +1 -1
  803. package/dist/esm/security/submission-challenge/submission-challenge.shared.d.ts.map +1 -1
  804. package/dist/esm/security/submission-challenge/submission-challenge.shared.js.map +1 -1
  805. package/dist/esm/systems-of-record/system-of-record-actions.shared.schemas.d.ts.map +1 -1
  806. package/dist/esm/systems-of-record/system-of-record-actions.shared.schemas.js.map +1 -1
  807. package/dist/esm/systems-of-record/system-of-record-credential-kind.shared.d.ts.map +1 -1
  808. package/dist/esm/systems-of-record/system-of-record-credential-kind.shared.js.map +1 -1
  809. package/dist/esm/systems-of-record/system-of-record-declaration.shared.schemas.d.ts.map +1 -1
  810. package/dist/esm/systems-of-record/system-of-record-declaration.shared.schemas.js.map +1 -1
  811. package/dist/esm/systems-of-record/system-of-record-env.shared.d.ts.map +1 -1
  812. package/dist/esm/systems-of-record/system-of-record-env.shared.js.map +1 -1
  813. package/dist/esm/systems-of-record/system-of-record-error-codes.shared.d.ts.map +1 -1
  814. package/dist/esm/systems-of-record/system-of-record-error-codes.shared.js.map +1 -1
  815. package/dist/esm/systems-of-record/system-of-record-facet.shared.schemas.d.ts.map +1 -1
  816. package/dist/esm/systems-of-record/system-of-record-facet.shared.schemas.js.map +1 -1
  817. package/dist/esm/systems-of-record/system-of-record-partition-assignments.shared.resources-config.schemas.d.ts.map +1 -1
  818. package/dist/esm/systems-of-record/system-of-record-partition-assignments.shared.resources-config.schemas.js.map +1 -1
  819. package/dist/esm/systems-of-record/system-of-record-partition-assignments.shared.schemas.d.ts.map +1 -1
  820. package/dist/esm/systems-of-record/system-of-record-partition-assignments.shared.schemas.js.map +1 -1
  821. package/dist/esm/testing/resource-config-builders.d.ts.map +1 -1
  822. package/dist/esm/testing/resource-config-builders.js.map +1 -1
  823. package/dist/esm/testing.d.ts.map +1 -1
  824. package/dist/esm/testing.js.map +1 -1
  825. package/dist/esm/users/anonymous-user-marketing-metadata.shared.schemas.d.ts.map +1 -1
  826. package/dist/esm/users/anonymous-user-marketing-metadata.shared.schemas.js.map +1 -1
  827. package/dist/esm/users/anonymous-users.shared.resources-config.schemas.d.ts.map +1 -1
  828. package/dist/esm/users/anonymous-users.shared.resources-config.schemas.js.map +1 -1
  829. package/dist/esm/users/anonymous-users.shared.schema.d.ts.map +1 -1
  830. package/dist/esm/users/anonymous-users.shared.schema.js.map +1 -1
  831. package/dist/esm/users/inbound-contacts.shared.resources-config.schemas.d.ts.map +1 -1
  832. package/dist/esm/users/inbound-contacts.shared.resources-config.schemas.js.map +1 -1
  833. package/dist/esm/users/inbound-contacts.shared.schemas.d.ts.map +1 -1
  834. package/dist/esm/users/inbound-contacts.shared.schemas.js.map +1 -1
  835. package/dist/esm/users/user-consent-decision.shared.utils.d.ts.map +1 -1
  836. package/dist/esm/users/user-consent-decision.shared.utils.js.map +1 -1
  837. package/dist/esm/users/user-credentials.shared.resources-config.schemas.d.ts.map +1 -1
  838. package/dist/esm/users/user-credentials.shared.resources-config.schemas.js.map +1 -1
  839. package/dist/esm/users/user-credentials.shared.schemas.d.ts.map +1 -1
  840. package/dist/esm/users/user-credentials.shared.schemas.js.map +1 -1
  841. package/dist/esm/users/user-identity-links.shared.resources-config.schemas.d.ts.map +1 -1
  842. package/dist/esm/users/user-identity-links.shared.resources-config.schemas.js.map +1 -1
  843. package/dist/esm/users/user-identity-links.shared.schemas.d.ts.map +1 -1
  844. package/dist/esm/users/user-identity-links.shared.schemas.js.map +1 -1
  845. package/dist/esm/users/user-preferences-reset.shared.utils.d.ts.map +1 -1
  846. package/dist/esm/users/user-preferences-reset.shared.utils.js.map +1 -1
  847. package/dist/esm/users/user-preferences.shared.resources-config.schemas.d.ts.map +1 -1
  848. package/dist/esm/users/user-preferences.shared.resources-config.schemas.js.map +1 -1
  849. package/dist/esm/users/user-profiles.shared.resources-config.schemas.d.ts.map +1 -1
  850. package/dist/esm/users/user-profiles.shared.resources-config.schemas.js.map +1 -1
  851. package/dist/esm/users/user-self-preferences.shared.resources-config.schemas.d.ts.map +1 -1
  852. package/dist/esm/users/user-self-preferences.shared.resources-config.schemas.js.map +1 -1
  853. package/dist/esm/users/user-self-profiles.shared.resources-config.schemas.d.ts.map +1 -1
  854. package/dist/esm/users/user-self-profiles.shared.resources-config.schemas.js.map +1 -1
  855. package/dist/esm/users/user-self.shared.resources-config.schemas.d.ts.map +1 -1
  856. package/dist/esm/users/user-self.shared.resources-config.schemas.js.map +1 -1
  857. package/dist/esm/users/users.shared.resources-config.schemas.d.ts.map +1 -1
  858. package/dist/esm/users/users.shared.resources-config.schemas.js.map +1 -1
  859. package/dist/esm/users/users.shared.schemas.d.ts.map +1 -1
  860. package/dist/esm/users/users.shared.schemas.js.map +1 -1
  861. package/package.json +4 -4
@@ -1 +1 @@
1
- {"version":3,"file":"service-provider-activity-feed.shared.schemas.js","sourceRoot":"","sources":["../../../src/organizations/service-provider-activity-feed.shared.schemas.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAA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,EAAE,CAAC,QAAQ,EAAE;CAC/B,CAAC,CAAC;AAGH,+CAA+C;AAC/C,MAAM,CAAN,IAAY,8CAKX;AALD,WAAY,8CAA8C;IACxD,8GAA8G;IAC9G,mEAAiB,CAAA;IACjB,qGAAqG;IACrG,qEAAmB,CAAA;AACrB,CAAC,EALW,8CAA8C,KAA9C,8CAA8C,QAKzD;AACD,sFAAsF","sourcesContent":["/**\n * The firm's EXPERT-ACTIVITY FEED (#1632): an opt-in, metadata-only record, in the PROVIDER organization, of what its\n * own experts did inside client organizations.\n *\n * ## Why it exists, and why it is shaped this way\n *\n * Under #1597 an expert's actions are recorded in the CLIENT's audit trail, attributed to the relationship. The firm is\n * accountable for its staff and runs on operating metrics, and it cannot read that trail: it is another tenant's. The\n * field's answer is the shape Microsoft Partner Center gives a partner — an activity log of its own delegated actions\n * (date, affected customer, action, partner user) while the detailed in-tenant trail stays in the customer's tenant.\n *\n * Three constraints decide everything below:\n *\n * - **No client content, ever.** A firm acting for a client acts on the client's documented instructions (GDPR\n * Art. 28(3)(a)); a firm-wide view of client content would make the firm decide purposes of its own over that data\n * (Art. 28(10)). So an entry carries operation TYPES, resource TYPES, ids of the parties — never a record id, a\n * field value, free text or a payload. {@link ServiceProviderActivityFeedEntryContentSchema} is STRICT so a new\n * field is a deliberate schema change rather than a spread.\n * - **It is worker monitoring.** Collecting it is the FIRM's decision, recorded with who, when, and the fact that it\n * was told consultation may be owed (BetrVG §87(1) no. 6; the CNIL's CSE consultation). The framework RECORDS the\n * decision and does not judge its lawfulness. Off by default, with no row needed for \"off\".\n * - **The client can narrow or stop it** for its own tenant, per relationship\n * (`ServiceProviderRelationship.activityFeedDisclosure`). An entry is written only when both sides allow it.\n *\n * Entries are written by the engine at AUDIT time, from the same attribution the audit writer already resolves for\n * the client's own row — never through a client-facing verb.\n */\n\nimport { z } from 'zod';\nimport { CoreResourceOperation } from '../resources/resources.shared.core.definitions';\n\n/** @wildo_source:part:start saas.models.organizations.service-provider-activity-feed facet:layer:shared facet:audience:app-developer */\n/**\n * Whether the FIRM collects activity metadata about its own experts' work in client organizations (#1632).\n *\n * The absence of a settings row means {@link DISABLED}: switching the feed on is a recorded decision, and switching it\n * off again is one too.\n */\nexport enum ServiceProviderActivityFeedStatus {\n /** No feed entry is written, whatever a client allows. The default. */\n DISABLED = 'DISABLED',\n /** Entries are written for every client whose relationship's disclosure level is not `NONE`. */\n ENABLED = 'ENABLED',\n}\n\n/**\n * How an expert's operation in a client ended, as the firm's feed may say it (#1632).\n *\n * Its own vocabulary rather than the SIEM envelope's success/failure: this is what the FIRM is told about an act\n * performed elsewhere, and a client at `OPERATION_TYPE_ONLY` withholds it entirely.\n */\nexport enum ServiceProviderActivityOutcome {\n /** The operation took effect in the client organization. */\n SUCCEEDED = 'SUCCEEDED',\n /** The client organization refused the operation (authorization, a policy gate). Nothing took effect. */\n REFUSED = 'REFUSED',\n}\n\n/**\n * The firm's decision about its feed. One row per PROVIDER organization: a singleton the backend creates, DISABLED and\n * with no decision recorded, the first time the firm reads it or decides. An absent row still reads as\n * {@link ServiceProviderActivityFeedStatus.DISABLED}, which is what the feed writer relies on.\n */\nexport const ServiceProviderActivityFeedSettingsSchema = z.object({\n _id: z.string().min(1).isPrimaryKey().isSummaryField(),\n /** The PROVIDER organization — the firm whose staff the feed is about. One row per organization. */\n organizationId: z.string().min(1).isDBIndexed().isUnique().isForeignKey().isSummaryField().excludeFromUpdate().isAuditEvidence(),\n status: z.enum(ServiceProviderActivityFeedStatus)\n .systemEnum('ServiceProviderActivityFeedStatus')\n .default(ServiceProviderActivityFeedStatus.DISABLED)\n .isSummaryField()\n .excludeFromCreate()\n .excludeFromUpdate()\n .isAuditEvidence(),\n /** The firm owner who made the current decision. */\n decidedByUserId: z.string().min(1).optional().excludeFromCreate().excludeFromUpdate().isAuditEvidence(),\n /** When the current decision was made — for a firm's employee privacy information, \"collected since\". */\n decidedAt: z.date().optional().isSummaryField().excludeFromCreate().excludeFromUpdate().isAuditEvidence(),\n /**\n * Whether the person who ENABLED the feed was shown that works-council or CSE consultation and employee notice may\n * be required before switching it on. Recorded, never judged: the framework states the notice and records that it\n * was shown; whether consultation happened is the firm's to establish.\n */\n acknowledgedWorkerConsultationNotice: z.boolean().default(false).excludeFromCreate().excludeFromUpdate().isAuditEvidence(),\n createdAt: z.date().optional(),\n updatedAt: z.date().optional(),\n});\nexport type ServiceProviderActivityFeedSettings = z.infer<typeof ServiceProviderActivityFeedSettingsSchema>;\n\n/**\n * EVERYTHING a feed entry may say, and nothing else (#1632). Strict: an unknown key is refused, so widening what the\n * firm learns about client work is a deliberate change to this schema — never a spread of a richer object.\n *\n * Deliberately absent: the record id, field names or values, the request payload, free text, and anything the\n * client's own trail marks `.isAuditEvidence()`.\n */\nexport const ServiceProviderActivityFeedEntryContentSchema = z.strictObject({\n /** The PROVIDER organization — the firm the entry is written to. */\n organizationId: z.string().min(1),\n /** The firm's expert who acted. */\n expertUserId: z.string().min(1),\n /** The CLIENT organization the expert acted in. A plain id: the firm cannot read the client's row. */\n clientOrganizationId: z.string().min(1),\n /** The relationship the expert acted through. */\n relationshipId: z.string().min(1),\n occurredAt: z.date(),\n /** The operation TYPE (e.g. UPDATE), never which record. */\n operationKind: z.enum(CoreResourceOperation),\n /** The resource TYPE the operation was on. */\n resourceType: z.string().min(1),\n /** Present only when the client's disclosure level is `OPERATION_AND_OUTCOME`. */\n outcome: z.enum(ServiceProviderActivityOutcome).optional(),\n});\nexport type ServiceProviderActivityFeedEntryContent = z.infer<typeof ServiceProviderActivityFeedEntryContentSchema>;\n\n/**\n * One feed entry as stored in the PROVIDER organization: the strict content plus the row's own identity. Written by\n * the engine only; no client-facing verb creates, changes or deletes one.\n */\nexport const ServiceProviderActivityFeedEntrySchema = z.object({\n _id: z.string().min(1).isPrimaryKey().isSummaryField(),\n organizationId: z.string().min(1).isDBIndexed().isForeignKey().isSummaryField().excludeFromUpdate(),\n expertUserId: z.string().min(1).isDBIndexed().isForeignKey().isSummaryField().excludeFromUpdate(),\n clientOrganizationId: z.string().min(1).isDBIndexed().isSummaryField().excludeFromUpdate(),\n relationshipId: z.string().min(1).isDBIndexed().excludeFromUpdate(),\n occurredAt: z.date().isDBIndexed().isSummaryField().excludeFromUpdate(),\n operationKind: z.enum(CoreResourceOperation).systemEnum('CoreResourceOperation').isSummaryField().excludeFromUpdate(),\n resourceType: z.string().min(1).isSummaryField().excludeFromUpdate(),\n outcome: z.enum(ServiceProviderActivityOutcome).systemEnum('ServiceProviderActivityOutcome').optional().isSummaryField().excludeFromUpdate(),\n createdAt: z.date().isDBIndexed().optional(),\n updatedAt: z.date().optional(),\n});\nexport type ServiceProviderActivityFeedEntry = z.infer<typeof ServiceProviderActivityFeedEntrySchema>;\n\n/** The firm's two decisions about its feed. */\nexport enum ServiceProviderActivityFeedSettings_Operations {\n /** Firm ORG_OWNER switches the feed on (step-up). Refused unless the consultation notice was acknowledged. */\n ENABLE = 'enable',\n /** Firm ORG_OWNER switches the feed off. Entries already written stay until their retention ends. */\n DISABLE = 'disable',\n}\n/** @wildo_source:part:end saas.models.organizations.service-provider-activity-feed */\n"]}
1
+ {"version":3,"file":"service-provider-activity-feed.shared.schemas.js","sourceRoot":"","sources":["../../../../src/organizations/service-provider-activity-feed.shared.schemas.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,qBAAqB,EAAE,MAAM,gDAAgD,CAAC;AAEvF,wIAAwI;AACxI;;;;;GAKG;AACH,MAAM,CAAN,IAAY,iCAKX;AALD,WAAY,iCAAiC;IAC3C,uEAAuE;IACvE,0DAAqB,CAAA;IACrB,gGAAgG;IAChG,wDAAmB,CAAA;AACrB,CAAC,EALW,iCAAiC,KAAjC,iCAAiC,QAK5C;AAED;;;;;GAKG;AACH,MAAM,CAAN,IAAY,8BAKX;AALD,WAAY,8BAA8B;IACxC,4DAA4D;IAC5D,yDAAuB,C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AC,YAAY,EAAE,CAAC,cAAc,EAAE,CAAC,iBAAiB,EAAE;IACjG,oBAAoB,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,WAAW,EAAE,CAAC,cAAc,EAAE,CAAC,iBAAiB,EAAE;IAC1F,cAAc,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,WAAW,EAAE,CAAC,iBAAiB,EAAE;IACnE,UAAU,EAAE,CAAC,CAAC,IAAI,EAAE,CAAC,WAAW,EAAE,CAAC,cAAc,EAAE,CAAC,iBAAiB,EAAE;IACvE,aAAa,EAAE,CAAC,CAAC,IAAI,CAAC,qBAAqB,CAAC,CAAC,UAAU,CAAC,uBAAuB,CAAC,CAAC,cAAc,EAAE,CAAC,iBAAiB,EAAE;IACrH,YAAY,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,cAAc,EAAE,CAAC,iBAAiB,EAAE;IACpE,OAAO,EAAE,CAAC,CAAC,IAAI,CAAC,8BAA8B,CAAC,CAAC,UAAU,CAAC,gCAAgC,CAAC,CAAC,QAAQ,EAAE,CAAC,cAAc,EAAE,CAAC,iBAAiB,EAAE;IAC5I,SAAS,EAAE,CAAC,CAAC,IAAI,EAAE,CAAC,WAAW,EAAE,CAAC,QAAQ,EAAE;IAC5C,SAAS,EAAE,CAAC,CAAC,IAAI,EAAE,CAAC,QAAQ,EAAE;CAC/B,CAAC,CAAC;AAGH,+CAA+C;AAC/C,MAAM,CAAN,IAAY,8CAKX;AALD,WAAY,8CAA8C;IACxD,8GAA8G;IAC9G,mEAAiB,CAAA;IACjB,qGAAqG;IACrG,qEAAmB,CAAA;AACrB,CAAC,EALW,8CAA8C,KAA9C,8CAA8C,QAKzD;AACD,sFAAsF","sourcesContent":["/**\n * The firm's EXPERT-ACTIVITY FEED (#1632): an opt-in, metadata-only record, in the PROVIDER organization, of what its\n * own experts did inside client organizations.\n *\n * ## Why it exists, and why it is shaped this way\n *\n * Under #1597 an expert's actions are recorded in the CLIENT's audit trail, attributed to the relationship. The firm is\n * accountable for its staff and runs on operating metrics, and it cannot read that trail: it is another tenant's. The\n * field's answer is the shape Microsoft Partner Center gives a partner — an activity log of its own delegated actions\n * (date, affected customer, action, partner user) while the detailed in-tenant trail stays in the customer's tenant.\n *\n * Three constraints decide everything below:\n *\n * - **No client content, ever.** A firm acting for a client acts on the client's documented instructions (GDPR\n * Art. 28(3)(a)); a firm-wide view of client content would make the firm decide purposes of its own over that data\n * (Art. 28(10)). So an entry carries operation TYPES, resource TYPES, ids of the parties — never a record id, a\n * field value, free text or a payload. {@link ServiceProviderActivityFeedEntryContentSchema} is STRICT so a new\n * field is a deliberate schema change rather than a spread.\n * - **It is worker monitoring.** Collecting it is the FIRM's decision, recorded with who, when, and the fact that it\n * was told consultation may be owed (BetrVG §87(1) no. 6; the CNIL's CSE consultation). The framework RECORDS the\n * decision and does not judge its lawfulness. Off by default, with no row needed for \"off\".\n * - **The client can narrow or stop it** for its own tenant, per relationship\n * (`ServiceProviderRelationship.activityFeedDisclosure`). An entry is written only when both sides allow it.\n *\n * Entries are written by the engine at AUDIT time, from the same attribution the audit writer already resolves for\n * the client's own row — never through a client-facing verb.\n */\n\nimport { z } from 'zod';\nimport { CoreResourceOperation } from '../resources/resources.shared.core.definitions';\n\n/** @wildo_source:part:start saas.models.organizations.service-provider-activity-feed facet:layer:shared facet:audience:app-developer */\n/**\n * Whether the FIRM collects activity metadata about its own experts' work in client organizations (#1632).\n *\n * The absence of a settings row means {@link DISABLED}: switching the feed on is a recorded decision, and switching it\n * off again is one too.\n */\nexport enum ServiceProviderActivityFeedStatus {\n /** No feed entry is written, whatever a client allows. The default. */\n DISABLED = 'DISABLED',\n /** Entries are written for every client whose relationship's disclosure level is not `NONE`. */\n ENABLED = 'ENABLED',\n}\n\n/**\n * How an expert's operation in a client ended, as the firm's feed may say it (#1632).\n *\n * Its own vocabulary rather than the SIEM envelope's success/failure: this is what the FIRM is told about an act\n * performed elsewhere, and a client at `OPERATION_TYPE_ONLY` withholds it entirely.\n */\nexport enum ServiceProviderActivityOutcome {\n /** The operation took effect in the client organization. */\n SUCCEEDED = 'SUCCEEDED',\n /** The client organization refused the operation (authorization, a policy gate). Nothing took effect. */\n REFUSED = 'REFUSED',\n}\n\n/**\n * The firm's decision about its feed. One row per PROVIDER organization: a singleton the backend creates, DISABLED and\n * with no decision recorded, the first time the firm reads it or decides. An absent row still reads as\n * {@link ServiceProviderActivityFeedStatus.DISABLED}, which is what the feed writer relies on.\n */\nexport const ServiceProviderActivityFeedSettingsSchema = z.object({\n _id: z.string().min(1).isPrimaryKey().isSummaryField(),\n /** The PROVIDER organization — the firm whose staff the feed is about. One row per organization. */\n organizationId: z.string().min(1).isDBIndexed().isUnique().isForeignKey().isSummaryField().excludeFromUpdate().isAuditEvidence(),\n status: z.enum(ServiceProviderActivityFeedStatus)\n .systemEnum('ServiceProviderActivityFeedStatus')\n .default(ServiceProviderActivityFeedStatus.DISABLED)\n .isSummaryField()\n .excludeFromCreate()\n .excludeFromUpdate()\n .isAuditEvidence(),\n /** The firm owner who made the current decision. */\n decidedByUserId: z.string().min(1).optional().excludeFromCreate().excludeFromUpdate().isAuditEvidence(),\n /** When the current decision was made — for a firm's employee privacy information, \"collected since\". */\n decidedAt: z.date().optional().isSummaryField().excludeFromCreate().excludeFromUpdate().isAuditEvidence(),\n /**\n * Whether the person who ENABLED the feed was shown that works-council or CSE consultation and employee notice may\n * be required before switching it on. Recorded, never judged: the framework states the notice and records that it\n * was shown; whether consultation happened is the firm's to establish.\n */\n acknowledgedWorkerConsultationNotice: z.boolean().default(false).excludeFromCreate().excludeFromUpdate().isAuditEvidence(),\n createdAt: z.date().optional(),\n updatedAt: z.date().optional(),\n});\nexport type ServiceProviderActivityFeedSettings = z.infer<typeof ServiceProviderActivityFeedSettingsSchema>;\n\n/**\n * EVERYTHING a feed entry may say, and nothing else (#1632). Strict: an unknown key is refused, so widening what the\n * firm learns about client work is a deliberate change to this schema — never a spread of a richer object.\n *\n * Deliberately absent: the record id, field names or values, the request payload, free text, and anything the\n * client's own trail marks `.isAuditEvidence()`.\n */\nexport const ServiceProviderActivityFeedEntryContentSchema = z.strictObject({\n /** The PROVIDER organization — the firm the entry is written to. */\n organizationId: z.string().min(1),\n /** The firm's expert who acted. */\n expertUserId: z.string().min(1),\n /** The CLIENT organization the expert acted in. A plain id: the firm cannot read the client's row. */\n clientOrganizationId: z.string().min(1),\n /** The relationship the expert acted through. */\n relationshipId: z.string().min(1),\n occurredAt: z.date(),\n /** The operation TYPE (e.g. UPDATE), never which record. */\n operationKind: z.enum(CoreResourceOperation),\n /** The resource TYPE the operation was on. */\n resourceType: z.string().min(1),\n /** Present only when the client's disclosure level is `OPERATION_AND_OUTCOME`. */\n outcome: z.enum(ServiceProviderActivityOutcome).optional(),\n});\nexport type ServiceProviderActivityFeedEntryContent = z.infer<typeof ServiceProviderActivityFeedEntryContentSchema>;\n\n/**\n * One feed entry as stored in the PROVIDER organization: the strict content plus the row's own identity. Written by\n * the engine only; no client-facing verb creates, changes or deletes one.\n */\nexport const ServiceProviderActivityFeedEntrySchema = z.object({\n _id: z.string().min(1).isPrimaryKey().isSummaryField(),\n organizationId: z.string().min(1).isDBIndexed().isForeignKey().isSummaryField().excludeFromUpdate(),\n expertUserId: z.string().min(1).isDBIndexed().isForeignKey().isSummaryField().excludeFromUpdate(),\n clientOrganizationId: z.string().min(1).isDBIndexed().isSummaryField().excludeFromUpdate(),\n relationshipId: z.string().min(1).isDBIndexed().excludeFromUpdate(),\n occurredAt: z.date().isDBIndexed().isSummaryField().excludeFromUpdate(),\n operationKind: z.enum(CoreResourceOperation).systemEnum('CoreResourceOperation').isSummaryField().excludeFromUpdate(),\n resourceType: z.string().min(1).isSummaryField().excludeFromUpdate(),\n outcome: z.enum(ServiceProviderActivityOutcome).systemEnum('ServiceProviderActivityOutcome').optional().isSummaryField().excludeFromUpdate(),\n createdAt: z.date().isDBIndexed().optional(),\n updatedAt: z.date().optional(),\n});\nexport type ServiceProviderActivityFeedEntry = z.infer<typeof ServiceProviderActivityFeedEntrySchema>;\n\n/** The firm's two decisions about its feed. */\nexport enum ServiceProviderActivityFeedSettings_Operations {\n /** Firm ORG_OWNER switches the feed on (step-up). Refused unless the consultation notice was acknowledged. */\n ENABLE = 'enable',\n /** Firm ORG_OWNER switches the feed off. Entries already written stay until their retention ends. */\n DISABLE = 'disable',\n}\n/** @wildo_source:part:end saas.models.organizations.service-provider-activity-feed */\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"service-provider-capability-grants.shared.resources-config.schemas.d.ts","sourceRoot":"","sources":["../../../src/organizations/service-provider-capability-grants.shared.resources-config.schemas.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EACL,iCAAiC,EAEjC,oCAAoC,EACpC,0CAA0C,EAC3C,MAAM,qDAAqD,CAAC;AAC7D,OAAO,EAAE,qBAAqB,EAAwD,MAAM,gDAAgD,CAAC;AAC7I,OAAO,EAA4D,KAAK,oBAAoB,EAAE,MAAM,uCAAuC,CAAC;AAO5I,KAAK,6BAA6B,GAC9B,qBAAqB,CAAC,IAAI,GAC1B,qBAAqB,CAAC,IAAI,GAC1B,qBAAqB,CAAC,KAAK,GAC3B,qBAAqB,CAAC,MAAM,GAC5B,qBAAqB,CAAC,MAAM,GAC5B,qBAAqB,CAAC,WAAW,GACjC,qBAAqB,CAAC,MAAM,CAAC;AAUjC,eAAO,MAAM,0EAA0E,GAAI,wBAAwB,oBAAoB,EAAE;;;;;;;;;;;;;;;kBAqIrI,CAAC"}
1
+ {"version":3,"file":"service-provider-capability-grants.shared.resources-config.schemas.d.ts","sourceRoot":"","sources":["../../../../src/organizations/service-provider-capability-grants.shared.resources-config.schemas.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EACL,iCAAiC,EAEjC,oCAAoC,EACpC,0CAA0C,EAC3C,MAAM,qDAAqD,CAAC;AAC7D,OAAO,EAAE,qBAAqB,EAAwD,MAAM,gDAAgD,CAAC;AAC7I,OAAO,EAA4D,KAAK,oBAAoB,EAAE,MAAM,uCAAuC,CAAC;AAO5I,KAAK,6BAA6B,GAC9B,qBAAqB,CAAC,IAAI,GAC1B,qBAAqB,CAAC,IAAI,GAC1B,qBAAqB,CAAC,KAAK,GAC3B,qBAAqB,CAAC,MAAM,GAC5B,qBAAqB,CAAC,MAAM,GAC5B,qBAAqB,CAAC,WAAW,GACjC,qBAAqB,CAAC,MAAM,CAAC;AAUjC,eAAO,MAAM,0EAA0E,GAAI,wBAAwB,oBAAoB,EAAE;;;;;;;;;;;;;;;kBAqIrI,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"service-provider-capability-grants.shared.resources-config.schemas.js","sourceRoot":"","sources":["../../../src/organizations/service-provider-capability-grants.shared.resources-config.schemas.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EACL,iCAAiC,EACjC,oCAAoC,EACpC,oCAAoC,EACpC,0CAA0C,GAC3C,MAAM,qDAAqD,CAAC;AAC7D,OAAO,EAAE,qBAAqB,EAAE,gBAAgB,EAAE,kCAAkC,EAAE,MAAM,gDAAgD,CAAC;AAC7I,OAAO,EAAE,0BAA0B,EAAE,4BAA4B,EAA6B,MAAM,uCAAuC,CAAC;AAC5I,OAAO,EAAE,0CAA0C,EAAE,MAAM,8CAA8C,CAAC;AAC1G,OAAO,EAAE,wBAAwB,EAAE,MAAM,8CAA8C,CAAC;AACxF,OAAO,EAAE,cAAc,EAAE,cAAc,EAAE,MAAM,iDAAiD,CAAC;AACjG,OAAO,EAAE,oBAAoB,EAAE,uBAAuB,EAAE,MAAM,wDAAwD,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AE,IAAI;oBAClC,UAAU,EAAE,eAAe;iBAC5B,CAAC;SACH;QAED,8GAA8G;QAC9G,CAAC,0CAA0C,CAAC,MAAM,CAAC,EAAE;YACnD,QAAQ,EAAE,CAAC;oBACT,WAAW,EAAE,4BAA4B,CAAC,QAAQ;oBAClD,SAAS,EAAE,IAAI;oBACf,KAAK,EAAE,CAAC,cAAc,CAAC,SAAS,CAAC;oBACjC,SAAS,EAAE,0BAA0B,CAAC,IAAI;oBAC1C,qBAAqB,EAAE,qBAAqB,CAAC,MAAM;oBACnD,UAAU,EAAE,CAAC,CAAC,MAAM,CAAC,EAAE,CAAC;oBACxB,gBAAgB,EAAE,CAAC,EAAE,aAAa,EAAE,EAAE,EAAE,CAAC,aAAa,CAAC,MAAM,KAAK,oCAAoC,CAAC,MAAM;iBAC9G,CAAC;SACH;QAED;;;WAGG;QACH,CAAC,0CAA0C,CAAC,MAAM,CAAC,EAAE;YACnD,QAAQ,EAAE,CAAC;oBACT,WAAW,EAAE,4BAA4B,CAAC,aAAa;oBACvD,SAAS,EAAE,IAAI;oBACf,KAAK,EAAE,CAAC,cAAc,CAAC,qBAAqB,CAAC;oBAC7C,SAAS,EAAE,0BAA0B,CAAC,GAAG;oBACzC,qBAAqB,EAAE,qBAAqB,CAAC,MAAM;oBACnD,UAAU,EAAE,CAAC,CAAC,MAAM,CAAC,EAAE,CAAC;iBACzB,CAAC;SACH;KACF;CACF,CAAC,CAAC","sourcesContent":["/**\n * `SERVICE_PROVIDER_CAPABILITY_GRANTS` — the client's delegated administrative capabilities, one row per grant (#1631).\n *\n * Stored in the CLIENT organization, which lends them; the firm has no verb on this resource and reads what it holds on\n * its engagement mirror. There is no generic CREATE or UPDATE: the verbs author every field, which is what makes a row\n * evidence rather than a form.\n *\n * Two grant verbs rather than one with a role check inside: the ordinary `grant` is a client administrator's, the\n * security-critical `grantSecurityCritical` is the OWNER's with step-up. Declaring each as its own variant lets the\n * framework's role gate and step-up gate enforce the split, and the implementation refuses a capability sent to the\n * wrong verb (`SERVICE_PROVIDER_CAPABILITY_WRONG_GRANT_VERB`), so an administrator can never reach a security-critical\n * capability through the ordinary door.\n */\n\nimport { z } from 'zod';\nimport {\n DelegatedAdministrativeCapability,\n ServiceProviderCapabilityGrantSchema,\n ServiceProviderCapabilityGrantStatus,\n ServiceProviderCapabilityGrants_Operations,\n} from './service-provider-capability-grants.shared.schemas';\nimport { CoreResourceOperation, CoreResourceType, coreResourceShared_FieldIdentifier } from '../resources/resources.shared.core.definitions';\nimport { ResourceOperationRiskLevel, ResourceOperationVariantType, type ResourceRelationship } from '../resources/resources.shared.schemas';\nimport { createResourceConfiguration_Initialization } from '../resources/resources-config.shared.factory';\nimport { ResourceSystemAccessMode } from '../resources/resources-config.shared.schemas';\nimport { CORE_APP_ROLES, CORE_ORG_ROLES } from '../security/authorizations/roles.shared.schemas';\nimport { ErasureRetentionMode, ResourceDataSubjectKind } from '../compliance/privacy/impersonalization.shared.schemas';\nimport { DataRetentionClass, RetentionStartPoint } from '../compliance/privacy/retention-schedule.shared.schemas';\n\ntype CapabilityGrantCoreOperations =\n | CoreResourceOperation.READ\n | CoreResourceOperation.LIST\n | CoreResourceOperation.COUNT\n | CoreResourceOperation.CREATE\n | CoreResourceOperation.UPDATE\n | CoreResourceOperation.UPDATE_MANY\n | CoreResourceOperation.DELETE;\n\n/** What a grant request carries: the relationship, the capability and when it ends. The rest is server-authored. */\nconst grantRequestDto = z.object({\n relationshipId: z.string().min(1),\n capability: z.enum(DelegatedAdministrativeCapability),\n /** Required: a delegation always ends. At most two years, or the security-critical cap. */\n endsAt: z.coerce.date(),\n});\n\nexport const serviceProviderCapabilityGrantsResourceConfiguration_InitializationFactory = (resourcesRelationships: ResourceRelationship[]) =>\n createResourceConfiguration_Initialization<\n typeof ServiceProviderCapabilityGrants_Operations,\n CapabilityGrantCoreOperations,\n typeof ServiceProviderCapabilityGrantSchema\n >({\n mainSchema: ServiceProviderCapabilityGrantSchema,\n resourceIdentifier: CoreResourceType.SERVICE_PROVIDER_CAPABILITY_GRANTS,\n resourceFieldIdentifier: coreResourceShared_FieldIdentifier[CoreResourceType.SERVICE_PROVIDER_CAPABILITY_GRANTS],\n resourceRelationships: resourcesRelationships,\n isSystemResource: true,\n /**\n * `read` / `list` are ALLOWED because the execution-context live filter reads grants on a system context to decide a\n * caller's authority — the caller is, by construction, not yet authorized. `update` is the verbs' system door for the\n * mirror sync and the relationship-end revocation.\n */\n systemAccessPolicy: {\n read: ResourceSystemAccessMode.ALLOWED,\n list: ResourceSystemAccessMode.ALLOWED,\n create: ResourceSystemAccessMode.ALLOWED,\n update: ResourceSystemAccessMode.ALLOWED,\n updateMany: ResourceSystemAccessMode.ALLOWED,\n },\n /** A grant holds ids, a capability, dates and a status — no personal text to scrub. Kept whole as access evidence. */\n retentionPolicy: { mode: ErasureRetentionMode.RETAIN_ONLY },\n /**\n * The AUDIT_LOGS class from the moment the grant ENDS (#1613): who from outside could administer what, and when, is\n * what an access review asks years later. `endedAt` is set on revoke and on the sweep's relabel; while ACTIVE it is\n * null and the row never expires.\n */\n retentionBinding: {\n retentionClass: DataRetentionClass.AUDIT_LOGS,\n startPoint: RetentionStartPoint.CLOSURE_EVENT,\n closureFieldName: 'endedAt',\n },\n dataSubjectPolicy: { kind: ResourceDataSubjectKind.NO_PRINCIPAL },\n coreOperations: [\n CoreResourceOperation.READ,\n CoreResourceOperation.LIST,\n CoreResourceOperation.COUNT,\n CoreResourceOperation.CREATE,\n CoreResourceOperation.UPDATE,\n CoreResourceOperation.UPDATE_MANY,\n CoreResourceOperation.DELETE,\n ],\n operationsConfiguration: {\n // The retention writer's verb, and the purge cascade's DELETE — no client route.\n [CoreResourceOperation.UPDATE_MANY]: {\n variants: [{ variantType: ResourceOperationVariantType.INTERNAL_CALL, isDefault: true, roles: [CORE_APP_ROLES.APP_ADMIN_SUPER_ADMIN], riskLevel: ResourceOperationRiskLevel.CRITICAL }],\n },\n [CoreResourceOperation.DELETE]: {\n variants: [{ variantType: ResourceOperationVariantType.INTERNAL_CALL, isDefault: true, roles: [], riskLevel: ResourceOperationRiskLevel.CRITICAL }],\n },\n // The system door the verbs write through. INTERNAL_CALL registers no route.\n [CoreResourceOperation.CREATE]: {\n variants: [{ variantType: ResourceOperationVariantType.INTERNAL_CALL, isDefault: true, roles: [CORE_APP_ROLES.APP_ADMIN_SUPER_ADMIN], riskLevel: ResourceOperationRiskLevel.HIGH }],\n },\n [CoreResourceOperation.UPDATE]: {\n variants: [{ variantType: ResourceOperationVariantType.INTERNAL_CALL, isDefault: true, roles: [CORE_APP_ROLES.APP_ADMIN_SUPER_ADMIN], riskLevel: ResourceOperationRiskLevel.HIGH }],\n },\n [CoreResourceOperation.READ]: {\n variants: [{ variantType: ResourceOperationVariantType.API_CALL, isDefault: true, roles: [CORE_ORG_ROLES.ORG_ADMIN], riskLevel: ResourceOperationRiskLevel.LOW }],\n },\n [CoreResourceOperation.LIST]: {\n variants: [{ variantType: ResourceOperationVariantType.API_CALL, isDefault: true, roles: [CORE_ORG_ROLES.ORG_ADMIN], riskLevel: ResourceOperationRiskLevel.LOW }],\n },\n [CoreResourceOperation.COUNT]: {\n variants: [{ variantType: ResourceOperationVariantType.API_CALL, isDefault: true, roles: [CORE_ORG_ROLES.ORG_ADMIN], riskLevel: ResourceOperationRiskLevel.LOW }],\n },\n\n /**\n * A client administrator lends one ORDINARY capability to a live relationship, for at most two years. A\n * security-critical capability sent here is refused (`SERVICE_PROVIDER_CAPABILITY_WRONG_GRANT_VERB`).\n *\n * assurance-control: WILDO.ACCESS.LEAST_PRIVILEGE — delegated administration is named, time-bound and client-revocable.\n */\n [ServiceProviderCapabilityGrants_Operations.GRANT]: {\n variants: [{\n variantType: ResourceOperationVariantType.API_CALL,\n isDefault: true,\n roles: [CORE_ORG_ROLES.ORG_ADMIN],\n riskLevel: ResourceOperationRiskLevel.HIGH,\n resourceOperationLike: CoreResourceOperation.CREATE,\n requestDto: grantRequestDto,\n }],\n },\n\n /**\n * The client OWNER lends one SECURITY-CRITICAL capability, with step-up, for a task-sized window (30 days at most,\n * or the application's lower cap). There is no renewal: a new window is a new grant by an owner.\n *\n * assurance-control: WILDO.ACCESS.LEAST_PRIVILEGE — a capability that decides who can sign in or act as the client is lent only by its owner, briefly.\n */\n [ServiceProviderCapabilityGrants_Operations.GRANT_SECURITY_CRITICAL]: {\n variants: [{\n variantType: ResourceOperationVariantType.API_CALL,\n isDefault: true,\n roles: [CORE_ORG_ROLES.ORG_OWNER],\n riskLevel: ResourceOperationRiskLevel.CRITICAL,\n resourceOperationLike: CoreResourceOperation.CREATE,\n requiresStepUpAuthentication: true,\n requestDto: grantRequestDto,\n }],\n },\n\n /** A client administrator revokes a grant — any grant, at any time, without asking the firm. Next request. */\n [ServiceProviderCapabilityGrants_Operations.REVOKE]: {\n variants: [{\n variantType: ResourceOperationVariantType.API_CALL,\n isDefault: true,\n roles: [CORE_ORG_ROLES.ORG_ADMIN],\n riskLevel: ResourceOperationRiskLevel.HIGH,\n resourceOperationLike: CoreResourceOperation.UPDATE,\n requestDto: z.object({}),\n enabledCondition: ({ currentObject }) => currentObject.status === ServiceProviderCapabilityGrantStatus.ACTIVE,\n }],\n },\n\n /**\n * ACTIVE → EXPIRED past `endsAt`, dispatched by the credential-expiry sweep only. Bookkeeping: the grant already\n * stopped conferring at `endsAt`, which is what admission reads.\n */\n [ServiceProviderCapabilityGrants_Operations.EXPIRE]: {\n variants: [{\n variantType: ResourceOperationVariantType.INTERNAL_CALL,\n isDefault: true,\n roles: [CORE_APP_ROLES.APP_ADMIN_SUPER_ADMIN],\n riskLevel: ResourceOperationRiskLevel.LOW,\n resourceOperationLike: CoreResourceOperation.UPDATE,\n requestDto: z.object({}),\n }],\n },\n },\n });\n"]}
1
+ {"version":3,"file":"service-provider-capability-grants.shared.resources-config.schemas.js","sourceRoot":"","sources":["../../../../src/organizations/service-provider-capability-grants.shared.resources-config.schemas.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,OAAO,EAAE,CA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AAS,EAAE,0BAA0B,CAAC,GAAG;oBACzC,qBAAqB,EAAE,qBAAqB,CAAC,MAAM;oBACnD,UAAU,EAAE,CAAC,CAAC,MAAM,CAAC,EAAE,CAAC;iBACzB,CAAC;SACH;KACF;CACF,CAAC,CAAC","sourcesContent":["/**\n * `SERVICE_PROVIDER_CAPABILITY_GRANTS` — the client's delegated administrative capabilities, one row per grant (#1631).\n *\n * Stored in the CLIENT organization, which lends them; the firm has no verb on this resource and reads what it holds on\n * its engagement mirror. There is no generic CREATE or UPDATE: the verbs author every field, which is what makes a row\n * evidence rather than a form.\n *\n * Two grant verbs rather than one with a role check inside: the ordinary `grant` is a client administrator's, the\n * security-critical `grantSecurityCritical` is the OWNER's with step-up. Declaring each as its own variant lets the\n * framework's role gate and step-up gate enforce the split, and the implementation refuses a capability sent to the\n * wrong verb (`SERVICE_PROVIDER_CAPABILITY_WRONG_GRANT_VERB`), so an administrator can never reach a security-critical\n * capability through the ordinary door.\n */\n\nimport { z } from 'zod';\nimport {\n DelegatedAdministrativeCapability,\n ServiceProviderCapabilityGrantSchema,\n ServiceProviderCapabilityGrantStatus,\n ServiceProviderCapabilityGrants_Operations,\n} from './service-provider-capability-grants.shared.schemas';\nimport { CoreResourceOperation, CoreResourceType, coreResourceShared_FieldIdentifier } from '../resources/resources.shared.core.definitions';\nimport { ResourceOperationRiskLevel, ResourceOperationVariantType, type ResourceRelationship } from '../resources/resources.shared.schemas';\nimport { createResourceConfiguration_Initialization } from '../resources/resources-config.shared.factory';\nimport { ResourceSystemAccessMode } from '../resources/resources-config.shared.schemas';\nimport { CORE_APP_ROLES, CORE_ORG_ROLES } from '../security/authorizations/roles.shared.schemas';\nimport { ErasureRetentionMode, ResourceDataSubjectKind } from '../compliance/privacy/impersonalization.shared.schemas';\nimport { DataRetentionClass, RetentionStartPoint } from '../compliance/privacy/retention-schedule.shared.schemas';\n\ntype CapabilityGrantCoreOperations =\n | CoreResourceOperation.READ\n | CoreResourceOperation.LIST\n | CoreResourceOperation.COUNT\n | CoreResourceOperation.CREATE\n | CoreResourceOperation.UPDATE\n | CoreResourceOperation.UPDATE_MANY\n | CoreResourceOperation.DELETE;\n\n/** What a grant request carries: the relationship, the capability and when it ends. The rest is server-authored. */\nconst grantRequestDto = z.object({\n relationshipId: z.string().min(1),\n capability: z.enum(DelegatedAdministrativeCapability),\n /** Required: a delegation always ends. At most two years, or the security-critical cap. */\n endsAt: z.coerce.date(),\n});\n\nexport const serviceProviderCapabilityGrantsResourceConfiguration_InitializationFactory = (resourcesRelationships: ResourceRelationship[]) =>\n createResourceConfiguration_Initialization<\n typeof ServiceProviderCapabilityGrants_Operations,\n CapabilityGrantCoreOperations,\n typeof ServiceProviderCapabilityGrantSchema\n >({\n mainSchema: ServiceProviderCapabilityGrantSchema,\n resourceIdentifier: CoreResourceType.SERVICE_PROVIDER_CAPABILITY_GRANTS,\n resourceFieldIdentifier: coreResourceShared_FieldIdentifier[CoreResourceType.SERVICE_PROVIDER_CAPABILITY_GRANTS],\n resourceRelationships: resourcesRelationships,\n isSystemResource: true,\n /**\n * `read` / `list` are ALLOWED because the execution-context live filter reads grants on a system context to decide a\n * caller's authority — the caller is, by construction, not yet authorized. `update` is the verbs' system door for the\n * mirror sync and the relationship-end revocation.\n */\n systemAccessPolicy: {\n read: ResourceSystemAccessMode.ALLOWED,\n list: ResourceSystemAccessMode.ALLOWED,\n create: ResourceSystemAccessMode.ALLOWED,\n update: ResourceSystemAccessMode.ALLOWED,\n updateMany: ResourceSystemAccessMode.ALLOWED,\n },\n /** A grant holds ids, a capability, dates and a status — no personal text to scrub. Kept whole as access evidence. */\n retentionPolicy: { mode: ErasureRetentionMode.RETAIN_ONLY },\n /**\n * The AUDIT_LOGS class from the moment the grant ENDS (#1613): who from outside could administer what, and when, is\n * what an access review asks years later. `endedAt` is set on revoke and on the sweep's relabel; while ACTIVE it is\n * null and the row never expires.\n */\n retentionBinding: {\n retentionClass: DataRetentionClass.AUDIT_LOGS,\n startPoint: RetentionStartPoint.CLOSURE_EVENT,\n closureFieldName: 'endedAt',\n },\n dataSubjectPolicy: { kind: ResourceDataSubjectKind.NO_PRINCIPAL },\n coreOperations: [\n CoreResourceOperation.READ,\n CoreResourceOperation.LIST,\n CoreResourceOperation.COUNT,\n CoreResourceOperation.CREATE,\n CoreResourceOperation.UPDATE,\n CoreResourceOperation.UPDATE_MANY,\n CoreResourceOperation.DELETE,\n ],\n operationsConfiguration: {\n // The retention writer's verb, and the purge cascade's DELETE — no client route.\n [CoreResourceOperation.UPDATE_MANY]: {\n variants: [{ variantType: ResourceOperationVariantType.INTERNAL_CALL, isDefault: true, roles: [CORE_APP_ROLES.APP_ADMIN_SUPER_ADMIN], riskLevel: ResourceOperationRiskLevel.CRITICAL }],\n },\n [CoreResourceOperation.DELETE]: {\n variants: [{ variantType: ResourceOperationVariantType.INTERNAL_CALL, isDefault: true, roles: [], riskLevel: ResourceOperationRiskLevel.CRITICAL }],\n },\n // The system door the verbs write through. INTERNAL_CALL registers no route.\n [CoreResourceOperation.CREATE]: {\n variants: [{ variantType: ResourceOperationVariantType.INTERNAL_CALL, isDefault: true, roles: [CORE_APP_ROLES.APP_ADMIN_SUPER_ADMIN], riskLevel: ResourceOperationRiskLevel.HIGH }],\n },\n [CoreResourceOperation.UPDATE]: {\n variants: [{ variantType: ResourceOperationVariantType.INTERNAL_CALL, isDefault: true, roles: [CORE_APP_ROLES.APP_ADMIN_SUPER_ADMIN], riskLevel: ResourceOperationRiskLevel.HIGH }],\n },\n [CoreResourceOperation.READ]: {\n variants: [{ variantType: ResourceOperationVariantType.API_CALL, isDefault: true, roles: [CORE_ORG_ROLES.ORG_ADMIN], riskLevel: ResourceOperationRiskLevel.LOW }],\n },\n [CoreResourceOperation.LIST]: {\n variants: [{ variantType: ResourceOperationVariantType.API_CALL, isDefault: true, roles: [CORE_ORG_ROLES.ORG_ADMIN], riskLevel: ResourceOperationRiskLevel.LOW }],\n },\n [CoreResourceOperation.COUNT]: {\n variants: [{ variantType: ResourceOperationVariantType.API_CALL, isDefault: true, roles: [CORE_ORG_ROLES.ORG_ADMIN], riskLevel: ResourceOperationRiskLevel.LOW }],\n },\n\n /**\n * A client administrator lends one ORDINARY capability to a live relationship, for at most two years. A\n * security-critical capability sent here is refused (`SERVICE_PROVIDER_CAPABILITY_WRONG_GRANT_VERB`).\n *\n * assurance-control: WILDO.ACCESS.LEAST_PRIVILEGE — delegated administration is named, time-bound and client-revocable.\n */\n [ServiceProviderCapabilityGrants_Operations.GRANT]: {\n variants: [{\n variantType: ResourceOperationVariantType.API_CALL,\n isDefault: true,\n roles: [CORE_ORG_ROLES.ORG_ADMIN],\n riskLevel: ResourceOperationRiskLevel.HIGH,\n resourceOperationLike: CoreResourceOperation.CREATE,\n requestDto: grantRequestDto,\n }],\n },\n\n /**\n * The client OWNER lends one SECURITY-CRITICAL capability, with step-up, for a task-sized window (30 days at most,\n * or the application's lower cap). There is no renewal: a new window is a new grant by an owner.\n *\n * assurance-control: WILDO.ACCESS.LEAST_PRIVILEGE — a capability that decides who can sign in or act as the client is lent only by its owner, briefly.\n */\n [ServiceProviderCapabilityGrants_Operations.GRANT_SECURITY_CRITICAL]: {\n variants: [{\n variantType: ResourceOperationVariantType.API_CALL,\n isDefault: true,\n roles: [CORE_ORG_ROLES.ORG_OWNER],\n riskLevel: ResourceOperationRiskLevel.CRITICAL,\n resourceOperationLike: CoreResourceOperation.CREATE,\n requiresStepUpAuthentication: true,\n requestDto: grantRequestDto,\n }],\n },\n\n /** A client administrator revokes a grant — any grant, at any time, without asking the firm. Next request. */\n [ServiceProviderCapabilityGrants_Operations.REVOKE]: {\n variants: [{\n variantType: ResourceOperationVariantType.API_CALL,\n isDefault: true,\n roles: [CORE_ORG_ROLES.ORG_ADMIN],\n riskLevel: ResourceOperationRiskLevel.HIGH,\n resourceOperationLike: CoreResourceOperation.UPDATE,\n requestDto: z.object({}),\n enabledCondition: ({ currentObject }) => currentObject.status === ServiceProviderCapabilityGrantStatus.ACTIVE,\n }],\n },\n\n /**\n * ACTIVE → EXPIRED past `endsAt`, dispatched by the credential-expiry sweep only. Bookkeeping: the grant already\n * stopped conferring at `endsAt`, which is what admission reads.\n */\n [ServiceProviderCapabilityGrants_Operations.EXPIRE]: {\n variants: [{\n variantType: ResourceOperationVariantType.INTERNAL_CALL,\n isDefault: true,\n roles: [CORE_APP_ROLES.APP_ADMIN_SUPER_ADMIN],\n riskLevel: ResourceOperationRiskLevel.LOW,\n resourceOperationLike: CoreResourceOperation.UPDATE,\n requestDto: z.object({}),\n }],\n },\n },\n });\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"service-provider-capability-grants.shared.schemas.d.ts","sourceRoot":"","sources":["../../../src/organizations/service-provider-capability-grants.shared.schemas.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,cAAc,EAA4B,MAAM,iDAAiD,CAAC;AAE3G,4IAA4I;AAC5I;;;GAGG;AACH,oBAAY,iCAAiC;IAC3C,uEAAuE;IACvE,cAAc,mBAAmB;IACjC;;;OAGG;IACH,2BAA2B,gCAAgC;IAC3D,kDAAkD;IAClD,gBAAgB,qBAAqB;IACrC,sFAAsF;IACtF,eAAe,oBAAoB;IACnC,oEAAoE;IACpE,eAAe,oBAAoB;IACnC,6GAA6G;IAC7G,qBAAqB,0BAA0B;CAChD;AAED;;;GAGG;AACH,eAAO,MAAM,yBAAyB,EAAE,QAAQ,CAAC,MAAM,CAAC,iCAAiC,EAAE,cAAc,CAAC,CAOxG,CAAC;AAEH,6HAA6H;AAC7H,eAAO,MAAM,0BAA0B,EAAE,WAAW,CAAC,MAAM,CAA6D,CAAC;AAEzH,qEAAqE;AACrE,wBAAgB,yBAAyB,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAE/D;AAED;;;;;;GAMG;AACH,wBAAgB,yBAAyB,CAAC,IAAI,EAAE,MAAM,GAAG,OA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KAAK,SAAS,MAAM,EAAE,CAAC;IACxE,QAAQ,CAAC,yBAAyB,EAAE,SAAS,MAAM,EAAE,CAAC;IACtD,6GAA6G;IAC7G,QAAQ,CAAC,iBAAiB,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;CAChD,GAAG;IAAE,UAAU,EAAE,iCAAiC,CAAC;IAAC,IAAI,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,oCAAoC,CAAC;IAAC,WAAW,CAAC,EAAE,MAAM,CAAA;CAAE,EAAE,CAmBtI"}
1
+ {"version":3,"file":"service-provider-capability-grants.shared.schemas.d.ts","sourceRoot":"","sources":["../../../../src/organizations/service-provider-capability-grants.shared.schemas.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,cAAc,EAA4B,MAAM,iDAAiD,CAAC;AAE3G,4IAA4I;AAC5I;;;GAGG;AACH,oBAAY,iCAAiC;IAC3C,uEAAuE;IACvE,cAAc,mBAAmB;IACjC;;;OAGG;IACH,2BAA2B,gCAAgC;IAC3D,kDAAkD;IAClD,gBAAgB,qBAAqB;IACrC,sFAAsF;IACtF,eAAe,oBAAoB;IACnC,oEAAoE;IACpE,eAAe,oBAAoB;IACnC,6GAA6G;IAC7G,qBAAqB,0BAA0B;CAChD;AAED;;;GAGG;AACH,eAAO,MAAM,yBAAyB,EAAE,QAAQ,CAAC,MAAM,CAAC,iCAAiC,EAAE,cAAc,CAAC,CAOxG,CAAC;AAEH,6HAA6H;AAC7H,eAAO,MAAM,0BAA0B,EAAE,WAAW,CAAC,MAAM,CAA6D,CAAC;AAEzH,qEAAqE;AACrE,wBAAgB,yBAAyB,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAE/D;AAED;;;;;;GAMG;AACH,wBAAgB,yBAAyB,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAE/D;AAED;;;;GA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E,CAAC;IACxE,QAAQ,CAAC,yBAAyB,EAAE,SAAS,MAAM,EAAE,CAAC;IACtD,6GAA6G;IAC7G,QAAQ,CAAC,iBAAiB,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;CAChD,GAAG;IAAE,UAAU,EAAE,iCAAiC,CAAC;IAAC,IAAI,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,oCAAoC,CAAC;IAAC,WAAW,CAAC,EAAE,MAAM,CAAA;CAAE,EAAE,CAmBtI"}
@@ -1 +1 @@
1
- {"version":3,"file":"service-provider-capability-grants.shared.schemas.js","sourceRoot":"","sources":["../../../src/organizations/service-provider-capability-grants.shared.schemas.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,cAAc,EAAE,wBAAwB,EAAE,MAAM,iDAAiD,CAAC;AAE3G,4IAA4I;AAC5I;;;GAGG;AACH,MAAM,CAAN,IAAY,iCAgBX;AAhBD,WAAY,iCAAiC;IAC3C,uEAAuE;IACvE,sEAAiC,CAAA;IACjC;;;OAGG;IACH,gGAA2D,CAAA;IAC3D,kDAAkD;IAClD,0EAAqC,CAAA;IACrC,sFAAsF;IACtF,wEAAmC,CAAA;IACnC,oEAAoE;IACpE,wEAAmC,CAAA;IACnC,6GAA6G;IAC7G,oFAA+C,CAAA;AACjD,CAAC,EAhBW,iCAAiC,KAAjC,iCAAiC,QAgB5C;AAED;;;GAGG;AACH,MAAM,CAAC,MAAM,yBAAyB,GAAwE,MAAM,CAAC,MAAM,CAAC;IAC1H,CAAC,iCAAiC,CAAC,cAAc,CAAC,EAAE,cAAc,CAAC,4BAA4B;IAC/F,CAAC,iCAAiC,CAAC,2BAA2B,CAAC,EAAE,cAAc,CAAC,yCAAyC;IACzH,CAAC,iCAAiC,CAAC,gBAAgB,CAAC,EAAE,cAAc,CAAC,8BAA8B;IACnG,CAAC,iC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AAC,sCAAsC,EAAE,CAAC,CAAC;QAC3H,CAAC;QACD,KAAK,MAAM,KAAK,IAAI,KAAK,CAAC,iBAAiB,IAAI,EAAE,EAAE,CAAC;YAClD,IAAI,KAAK,KAAK,IAAI,IAAI,KAAK,CAAC,yBAAyB,CAAC,KAAK,CAAC,CAAC,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC;gBAC5E,UAAU,CAAC,IAAI,CAAC,EAAE,UAAU,EAAE,IAAI,EAAE,IAAI,EAAE,oCAAoC,CAAC,yCAAyC,EAAE,WAAW,EAAE,KAAK,EAAE,CAAC,CAAC;YAClJ,CAAC;QACH,CAAC;IACH,CAAC;IACD,OAAO,UAAU,CAAC;AACpB,CAAC","sourcesContent":["/**\n * Delegated administrative capabilities (#1631) — a CLIENT organization lends one service firm's experts a NAMED,\n * narrow, time-bound administrative capability, without ever making the firm an administrator.\n *\n * ## The shape, and why capabilities are ROLES\n *\n * Paul (2026-09-25, #1597 Q2): never admin by default; narrow, time-limited, client-revocable delegation; a\n * security-critical capability needs the client's OWNER, is time-bound, and is never renewed automatically. Issue\n * #1631 records the practice this follows (Microsoft's granular delegated admin privileges for partners, with a\n * time-bound relationship that cannot be auto-extended for the highest role) with its sources; nothing here quotes\n * them.\n *\n * A capability is a NAMED ROLE in the organization role table, one per {@link DelegatedAdministrativeCapability},\n * inheriting from nothing, and listed EXPLICITLY — beside `ORG_ADMIN` — in the `roles` of exactly the core operations\n * it opens. The rejected alternative (review F7) was an operation-id allow-list per grant: a second authority beside\n * role resolution that the ~20 `initiatorRoles` readers and the role ceiling would not know about.\n *\n * ## Grants are rows, filtered live\n *\n * `SERVICE_PROVIDER_CAPABILITY_GRANTS` rows live in the CLIENT organization. The execution-context live filter that\n * decides whether a provider membership confers anything (#1597) reads the relationship's grants in the same pass and\n * adds a capability's role to the expert's entries only while {@link isServiceProviderCapabilityGrantConferring}\n * holds — ACTIVE and `endsAt` still in the future. `EXPIRED` is sweep bookkeeping: admission reads `endsAt`.\n *\n * ## What delegation never does\n *\n * No capability confers `ORG_ADMIN` or `ORG_OWNER`, accepts a relationship, amends its scope, delegates further, or\n * counts toward the owner floor (provider memberships never do). Startup refuses a capability role whose `inheritFrom`\n * chain reaches an administration anchor.\n */\n\nimport { z } from 'zod';\nimport { CORE_ORG_ROLES, isInboundHandlerOnlyRole } from '../security/authorizations/roles.shared.schemas';\n\n/** @wildo_source:part:start saas.models.organizations.service-provider-capability-grants facet:layer:shared facet:audience:app-developer */\n/**\n * The closed set of administrative capabilities a client may lend a service firm (#1631). Each is ONE role\n * ({@link DELEGATED_CAPABILITY_ROLE}); a grant names one capability.\n */\nexport enum DelegatedAdministrativeCapability {\n /** Invite people into the client, resend an invitation, revoke one. */\n INVITE_MEMBERS = 'INVITE_MEMBERS',\n /**\n * Suspend or remove the firm's OWN experts under this relationship — never an ordinary member, never another firm's.\n * Deliberately not reactivate: lifting a suspension would let the firm undo the client's bar against one person (#1597).\n */\n MANAGE_RELATIONSHIP_EXPERTS = 'MANAGE_RELATIONSHIP_EXPERTS',\n /** Read the client organization's audit trail. */\n READ_AUDIT_TRAIL = 'READ_AUDIT_TRAIL',\n /** Configure the client's single sign-on and SCIM provisioning. Security-critical. */\n MANAGE_SSO_SCIM = 'MANAGE_SSO_SCIM',\n /** Manage the client organization's API keys. Security-critical. */\n MANAGE_API_KEYS = 'MANAGE_API_KEYS',\n /** Approve or deny, as the tenant, a platform operator's request to access the client. Security-critical. */\n APPROVE_ACCESS_GRANTS = 'APPROVE_ACCESS_GRANTS',\n}\n\n/**\n * The role each capability confers — the ONE mapping, total over the enum, so a capability added tomorrow is a compile\n * error here rather than a grant that confers nothing.\n */\nexport const DELEGATED_CAPABILITY_ROLE: Readonly<Record<DelegatedAdministrativeCapability, CORE_ORG_ROLES>> = Object.freeze({\n [DelegatedAdministrativeCapability.INVITE_MEMBERS]: CORE_ORG_ROLES.ORG_DELEGATED_INVITE_MEMBERS,\n [DelegatedAdministrativeCapability.MANAGE_RELATIONSHIP_EXPERTS]: CORE_ORG_ROLES.ORG_DELEGATED_MANAGE_RELATIONSHIP_EXPERTS,\n [DelegatedAdministrativeCapability.READ_AUDIT_TRAIL]: CORE_ORG_ROLES.ORG_DELEGATED_READ_AUDIT_TRAIL,\n [DelegatedAdministrativeCapability.MANAGE_SSO_SCIM]: CORE_ORG_ROLES.ORG_DELEGATED_MANAGE_SSO_SCIM,\n [DelegatedAdministrativeCapability.MANAGE_API_KEYS]: CORE_ORG_ROLES.ORG_DELEGATED_MANAGE_API_KEYS,\n [DelegatedAdministrativeCapability.APPROVE_ACCESS_GRANTS]: CORE_ORG_ROLES.ORG_DELEGATED_APPROVE_ACCESS_GRANTS,\n});\n\n/** Every capability role — conferred ONLY by a live grant, never by a membership row (the member role doors refuse them). */\nexport const DELEGATED_CAPABILITY_ROLES: ReadonlySet<string> = new Set<string>(Object.values(DELEGATED_CAPABILITY_ROLE));\n\n/** Whether `role` is one only a live capability grant may confer. */\nexport function isDelegatedCapabilityRole(role: string): boolean {\n return DELEGATED_CAPABILITY_ROLES.has(role);\n}\n\n/**\n * Whether an organization MEMBERSHIP may hold `role` at all, whatever its organization's type (#1921): not a\n * handler-only role (an engine inbound handler's alone, #1629) and not a delegated capability role (a live grant's alone,\n * #1631). The ONE statement of that rule for every surface that offers or names a role a person holds — the published\n * role table a picker offers, and a setting that names one role (`contentReaderRole`). The membership write door\n * (`validateOrgMemberRoles`) refuses each of the two kinds with its own reason; a kind added here must be refused there too.\n */\nexport function roleMayBeHeldByMembership(role: string): boolean {\n return !isInboundHandlerOnlyRole(role) && !isDelegatedCapabilityRole(role);\n}\n\n/**\n * Capabilities that change who can authenticate into, or act as, the client: only the client's OWNER grants them,\n * with step-up, for a task-sized window ({@link SECURITY_CRITICAL_CAPABILITY_DEFAULT_MAX_DAYS} at most), and a renewal is\n * a new grant — there is no `autoRenew`.\n */\nexport const SECURITY_CRITICAL_DELEGATED_CAPABILITIES: readonly DelegatedAdministrativeCapability[] = Object.freeze([\n DelegatedAdministrativeCapability.MANAGE_SSO_SCIM,\n DelegatedAdministrativeCapability.MANAGE_API_KEYS,\n DelegatedAdministrativeCapability.APPROVE_ACCESS_GRANTS,\n]);\n\n/**\n * Capabilities that need an ORGANIZATION-WIDE relationship: refused at grant time on a relationship confined to\n * organization units, because a unit-scoped relationship has no organization-wide entry (#1597 F5) to carry them.\n *\n * Every capability is here, and that is measured rather than assumed: each one opens operations on resources that do\n * not narrow by organization unit (members, audit logs, SSO / SCIM, API keys, platform access grants), and the role gate\n * on those counts only organization-wide entries. A capability granted on a unit-scoped relationship would therefore\n * be audited, mirrored to the firm as held, and confer nothing — a grant that lies. The list stays a list (rather than\n * a blanket rule) so a future capability that opens a unit-narrowable operation can be left off it deliberately.\n */\nexport const ORGANIZATION_LEVEL_DELEGATED_CAPABILITIES: readonly DelegatedAdministrativeCapability[] = Object.freeze([\n DelegatedAdministrativeCapability.INVITE_MEMBERS,\n DelegatedAdministrativeCapability.MANAGE_RELATIONSHIP_EXPERTS,\n DelegatedAdministrativeCapability.READ_AUDIT_TRAIL,\n DelegatedAdministrativeCapability.MANAGE_SSO_SCIM,\n DelegatedAdministrativeCapability.MANAGE_API_KEYS,\n DelegatedAdministrativeCapability.APPROVE_ACCESS_GRANTS,\n]);\n\n/** The longest an ordinary capability may be granted for: two years, GDAP's relationship maximum. */\nexport const DELEGATED_CAPABILITY_MAX_DAYS = 730;\n/**\n * The longest a security-critical capability may be granted for, unless the application declares a lower cap\n * (`acceptsServiceProviders.securityCriticalCapabilityMaxDays`). A reversible default chosen for #1631 — a task-sized\n * window, far below the relationship maximum — NOT a figure taken from GDAP.\n */\nexport const SECURITY_CRITICAL_CAPABILITY_DEFAULT_MAX_DAYS = 30;\n\n/** Where one grant stands. */\nexport enum ServiceProviderCapabilityGrantStatus {\n /** Granted and not revoked. Confers only while `endsAt` is still in the future. */\n ACTIVE = 'ACTIVE',\n /** A client administrator revoked it, or the relationship ended. Terminal. */\n REVOKED = 'REVOKED',\n /** The sweep relabelled it after `endsAt`. Terminal bookkeeping — admission never reads this label. */\n EXPIRED = 'EXPIRED',\n}\n\n/** Why a grant stopped conferring before its term — what a REVOKED audit row records (#1631 review F10). */\nexport enum ServiceProviderCapabilityGrantEndCause {\n /** A client administrator revoked it. */\n REVOKED_BY_CLIENT = 'REVOKED_BY_CLIENT',\n /** Its relationship ended (terminated, withdrawn, expired, declined, or a party removed). */\n RELATIONSHIP_ENDED = 'RELATIONSHIP_ENDED',\n /** Its relationship was narrowed to organization units, which cannot carry any capability. */\n RELATIONSHIP_NARROWED = 'RELATIONSHIP_NARROWED',\n}\n\n/** The client's verbs on its grants. The firm has none: it can never grant, widen or extend. */\nexport enum ServiceProviderCapabilityGrants_Operations {\n /** Client ORG_ADMIN lends an ORDINARY capability, for at most two years. */\n GRANT = 'grant',\n /** Client ORG_OWNER lends a SECURITY-CRITICAL capability, with step-up, for a task-sized window. */\n GRANT_SECURITY_CRITICAL = 'grantSecurityCritical',\n /** Client ORG_ADMIN revokes any grant, at any time, without asking the firm. Takes effect on the next request. */\n REVOKE = 'revoke',\n /** ACTIVE → EXPIRED past `endsAt`, dispatched by the credential-expiry sweep only. */\n EXPIRE = 'expire',\n}\n\n/** The client-branchable codes a refused grant carries (409: authorized caller, valid payload, the STATE forbids it). */\nexport enum ServiceProviderCapabilityGrantErrorCode {\n /** The relationship is not ACTIVE (or SUSPENDED) — nothing can be lent to a relationship that confers nothing. */\n SERVICE_PROVIDER_CAPABILITY_RELATIONSHIP_NOT_LIVE = 'SERVICE_PROVIDER_CAPABILITY_RELATIONSHIP_NOT_LIVE',\n /** A security-critical capability through the ordinary `grant`, or an ordinary one through the owner's verb. */\n SERVICE_PROVIDER_CAPABILITY_WRONG_GRANT_VERB = 'SERVICE_PROVIDER_CAPABILITY_WRONG_GRANT_VERB',\n /** `endsAt` beyond the cap for this capability, or not in the future. */\n SERVICE_PROVIDER_CAPABILITY_TERM_NOT_ALLOWED = 'SERVICE_PROVIDER_CAPABILITY_TERM_NOT_ALLOWED',\n /** An organization-level capability on a relationship confined to organization units. */\n SERVICE_PROVIDER_CAPABILITY_REQUIRES_ORGANIZATION_WIDE_RELATIONSHIP = 'SERVICE_PROVIDER_CAPABILITY_REQUIRES_ORGANIZATION_WIDE_RELATIONSHIP',\n /** An ACTIVE grant of this capability already exists on this relationship; revoke it first (a renewal is a new grant). */\n SERVICE_PROVIDER_CAPABILITY_ALREADY_GRANTED = 'SERVICE_PROVIDER_CAPABILITY_ALREADY_GRANTED',\n /** MANAGE_RELATIONSHIP_EXPERTS used on a membership that is not an expert of the SAME relationship. */\n SERVICE_PROVIDER_CAPABILITY_TARGET_OUTSIDE_RELATIONSHIP = 'SERVICE_PROVIDER_CAPABILITY_TARGET_OUTSIDE_RELATIONSHIP',\n}\n/** @wildo_source:part:end saas.models.organizations.service-provider-capability-grants */\n\n/**\n * Does this grant confer its capability RIGHT NOW? The ONE predicate the live filter uses: ACTIVE, and `endsAt` in the\n * future. `endsAt` is read here rather than trusting the EXPIRED label, so a grant stops working the moment its term\n * passes whether or not the sweep has run (invariant 1).\n */\nexport function isServiceProviderCapabilityGrantConferring(\n grant: { readonly status?: unknown; readonly endsAt?: Date | string | null } | null | undefined,\n now: Date,\n): boolean {\n if (!grant || grant.status !== ServiceProviderCapabilityGrantStatus.ACTIVE) return false;\n if (grant.endsAt === undefined || grant.endsAt === null) return false;\n const endsAt = grant.endsAt instanceof Date ? grant.endsAt : new Date(grant.endsAt);\n return Number.isFinite(endsAt.getTime()) && endsAt.getTime() > now.getTime();\n}\n\nconst DAY_MS = 24 * 60 * 60 * 1000;\n\n/**\n * May this capability be lent on this relationship, until `endsAt`, through this verb? (#1631 invariants 3 and 5)\n *\n * The one rule both grant verbs apply. Pure: the caller supplies the relationship's scope and the application's\n * declared cap. Fails closed on anything it cannot prove.\n */\nexport function resolveServiceProviderCapabilityGrantTerms(input: {\n readonly capability: DelegatedAdministrativeCapability;\n readonly verb: ServiceProviderCapabilityGrants_Operations.GRANT | ServiceProviderCapabilityGrants_Operations.GRANT_SECURITY_CRITICAL;\n readonly endsAt: Date;\n readonly now: Date;\n /** The relationship's `organizationUnitIds`: non-empty ⇒ unit-scoped. */\n readonly relationshipOrganizationUnitIds?: readonly string[] | null;\n /** The client organization type's declared `acceptsServiceProviders.securityCriticalCapabilityMaxDays`. */\n readonly declaredSecurityCriticalMaxDays?: number;\n}):\n | { readonly allowed: true }\n | { readonly allowed: false; readonly code: ServiceProviderCapabilityGrantErrorCode } {\n const securityCritical = SECURITY_CRITICAL_DELEGATED_CAPABILITIES.includes(input.capability);\n const expectedVerb = securityCritical\n ? ServiceProviderCapabilityGrants_Operations.GRANT_SECURITY_CRITICAL\n : ServiceProviderCapabilityGrants_Operations.GRANT;\n if (input.verb !== expectedVerb) return { allowed: false, code: ServiceProviderCapabilityGrantErrorCode.SERVICE_PROVIDER_CAPABILITY_WRONG_GRANT_VERB };\n if ((input.relationshipOrganizationUnitIds ?? []).length > 0 && ORGANIZATION_LEVEL_DELEGATED_CAPABILITIES.includes(input.capability)) {\n return { allowed: false, code: ServiceProviderCapabilityGrantErrorCode.SERVICE_PROVIDER_CAPABILITY_REQUIRES_ORGANIZATION_WIDE_RELATIONSHIP };\n }\n const maxDays = securityCritical\n ? Math.min(SECURITY_CRITICAL_CAPABILITY_DEFAULT_MAX_DAYS, input.declaredSecurityCriticalMaxDays ?? SECURITY_CRITICAL_CAPABILITY_DEFAULT_MAX_DAYS)\n : DELEGATED_CAPABILITY_MAX_DAYS;\n const endsAtMs = input.endsAt.getTime();\n if (!Number.isFinite(endsAtMs) || endsAtMs <= input.now.getTime() || endsAtMs > input.now.getTime() + maxDays * DAY_MS) {\n return { allowed: false, code: ServiceProviderCapabilityGrantErrorCode.SERVICE_PROVIDER_CAPABILITY_TERM_NOT_ALLOWED };\n }\n return { allowed: true };\n}\n\n/**\n * One grant, stored in the CLIENT organization. Every field is server-authored: the verbs write them, and there is no\n * generic CREATE or UPDATE.\n */\nexport const ServiceProviderCapabilityGrantSchema = z.object({\n _id: z.string().min(1).isPrimaryKey().isSummaryField(),\n\n /** The CLIENT organization — the party lending the capability, and the scope anchor. */\n organizationId: z.string().min(1).isDBIndexed().isForeignKey().isSummaryField().excludeFromUpdate().isAuditEvidence(),\n\n /** The relationship the capability is lent through — same tenant, a real edge. The live filter reads grants by it. */\n relationshipId: z.string().min(1).isDBIndexed().isForeignKey().isSummaryField().excludeFromCreate().excludeFromUpdate().isAuditEvidence(),\n\n /** The firm, copied from the relationship so a row names both parties. A plain id, never an edge into another tenant. */\n providerOrganizationId: z.string().min(1).isDBIndexed().excludeFromCreate().excludeFromUpdate().isAuditEvidence(),\n\n capability: z.enum(DelegatedAdministrativeCapability)\n .systemEnum('DelegatedAdministrativeCapability')\n .isSummaryField()\n .excludeFromCreate()\n .excludeFromUpdate()\n .isAuditEvidence(),\n\n /** When the capability stops conferring. Required: a delegation always ends. Admission reads this, never the EXPIRED label. */\n endsAt: z.date().isDBIndexed().isSummaryField().excludeFromCreate().excludeFromUpdate().isAuditEvidence(),\n\n status: z.enum(ServiceProviderCapabilityGrantStatus)\n .systemEnum('ServiceProviderCapabilityGrantStatus')\n .default(ServiceProviderCapabilityGrantStatus.ACTIVE)\n .isDBIndexed()\n .isSummaryField()\n .excludeFromCreate()\n .excludeFromUpdate()\n .isAuditEvidence(),\n\n grantedByUserId: z.string().min(1).optional().excludeFromCreate().excludeFromUpdate().isAuditEvidence(),\n grantedAt: z.date().optional().excludeFromCreate().excludeFromUpdate(),\n revokedByUserId: z.string().min(1).optional().excludeFromCreate().excludeFromUpdate().isAuditEvidence(),\n revokedAt: z.date().optional().excludeFromCreate().excludeFromUpdate(),\n /** When the grant stopped — revoked, or relabelled after its term. The retention clock's start point (#1613). */\n endedAt: z.date().optional().isDBIndexed().excludeFromCreate().excludeFromUpdate(),\n\n createdAt: z.date().optional(),\n updatedAt: z.date().optional(),\n});\nexport type ServiceProviderCapabilityGrant = z.infer<typeof ServiceProviderCapabilityGrantSchema>;\n\n/** One capability the firm holds in a client, as its engagement mirror shows it. */\nexport const ServiceEngagementDelegatedCapabilitySchema = z.object({\n capability: z.enum(DelegatedAdministrativeCapability).systemEnum('DelegatedAdministrativeCapability')\n .describe('An administrative capability the client organization currently lends this firm.'),\n endsAt: z.date().describe('When the lending of that capability ends.'),\n});\nexport type ServiceEngagementDelegatedCapability = z.infer<typeof ServiceEngagementDelegatedCapabilitySchema>;\n\n/** Why the organization role table was refused at startup for a delegated capability role (#1631). */\nexport enum DelegatedCapabilityRoleViolationKind {\n /** The capability role is not in the organization role table at all — a grant of it would confer nothing, silently. */\n CAPABILITY_ROLE_UNDECLARED = 'CAPABILITY_ROLE_UNDECLARED',\n /** The role's `inheritFrom` chain reaches an administration anchor (ORG_ADMIN / ORG_OWNER): lending it would make the firm an administrator. */\n CAPABILITY_ROLE_REACHES_ADMINISTRATION = 'CAPABILITY_ROLE_REACHES_ADMINISTRATION',\n /**\n * Another organization role inherits the capability role: every holder of that role would carry the capability\n * standing, with no grant row, no term and no revocation. A capability is conferred only by a live grant.\n */\n CAPABILITY_ROLE_INHERITED_BY_ANOTHER_ROLE = 'CAPABILITY_ROLE_INHERITED_BY_ANOTHER_ROLE',\n}\n\n/**\n * Validate every delegated capability role against the LIVE organization role table (#1631 invariant 2). An application\n * may override the engine's role definitions, so the check runs on the table the authorizer actually uses: a capability\n * role redefined to inherit from `ORG_ADMIN` (or anything that leads there) is refused at boot, exactly as a provider\n * role that reaches `ORG_ADMIN` is.\n */\nexport function collectDelegatedCapabilityRoleViolations(input: {\n /** The role's `inheritFrom` walk in the ORGANIZATIONS table, the role itself included; empty ⇒ undeclared. */\n readonly organizationRoleHierarchy: (role: string) => readonly string[];\n readonly administrationAnchorRoles: readonly string[];\n /** Every key of the LIVE organization role table, so a role that inherits a capability role can be found. */\n readonly organizationRoles?: readonly string[];\n}): { capability: DelegatedAdministrativeCapability; role: string; kind: DelegatedCapabilityRoleViolationKind; inheritedBy?: string }[] {\n const violations: { capability: DelegatedAdministrativeCapability; role: string; kind: DelegatedCapabilityRoleViolationKind; inheritedBy?: string }[] = [];\n for (const capability of Object.values(DelegatedAdministrativeCapability)) {\n const role = DELEGATED_CAPABILITY_ROLE[capability];\n const hierarchy = input.organizationRoleHierarchy(role);\n if (hierarchy.length === 0) {\n violations.push({ capability, role, kind: DelegatedCapabilityRoleViolationKind.CAPABILITY_ROLE_UNDECLARED });\n continue;\n }\n if (hierarchy.some((held) => input.administrationAnchorRoles.includes(held))) {\n violations.push({ capability, role, kind: DelegatedCapabilityRoleViolationKind.CAPABILITY_ROLE_REACHES_ADMINISTRATION });\n }\n for (const other of input.organizationRoles ?? []) {\n if (other !== role && input.organizationRoleHierarchy(other).includes(role)) {\n violations.push({ capability, role, kind: DelegatedCapabilityRoleViolationKind.CAPABILITY_ROLE_INHERITED_BY_ANOTHER_ROLE, inheritedBy: other });\n }\n }\n }\n return violations;\n}\n"]}
1
+ {"version":3,"file":"service-provider-capability-grants.shared.schemas.js","sourceRoot":"","sources":["../../../../src/organizations/service-provider-capability-grants.shared.schemas.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,cAAc,EAAE,wBAAwB,EAAE,MAAM,iDAAiD,CAAC;AAE3G,4IAA4I;AAC5I;;;GAGG;AACH,MAAM,CAAN,IAAY,iCAgBX;AAhBD,WAAY,iCAAiC;IAC3C,uEAAuE;IACvE,sEAAiC,CAAA;IACjC;;;OAGG;IACH,gGAA2D,CAAA;IAC3D,kDAAkD;IAClD,0EAAqC,CAAA;IACrC,sFAAsF;IACtF,wEAAmC,CAAA;IACnC,oEAAoE;IACpE,wEAAmC,CAAA;IACnC,6GAA6G;IAC7G,oFAA+C,CAAA;AACjD,CAAC,EAhBW,iCAAiC,KAAjC,iCAAiC,QAgB5C;AAED;;;GAGG;AACH,MAAM,CAAC,MAAM,yBAAyB,GAAwE,MAAM,CAAC,MAAM,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AAC;QACD,IAAI,SAAS,CAAC,IAAI,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,KAAK,CAAC,yBAAyB,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,EAAE,CAAC;YAC7E,UAAU,CAAC,IAAI,CAAC,EAAE,UAAU,EAAE,IAAI,EAAE,IAAI,EAAE,oCAAoC,CAAC,sCAAsC,EAAE,CAAC,CAAC;QAC3H,CAAC;QACD,KAAK,MAAM,KAAK,IAAI,KAAK,CAAC,iBAAiB,IAAI,EAAE,EAAE,CAAC;YAClD,IAAI,KAAK,KAAK,IAAI,IAAI,KAAK,CAAC,yBAAyB,CAAC,KAAK,CAAC,CAAC,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC;gBAC5E,UAAU,CAAC,IAAI,CAAC,EAAE,UAAU,EAAE,IAAI,EAAE,IAAI,EAAE,oCAAoC,CAAC,yCAAyC,EAAE,WAAW,EAAE,KAAK,EAAE,CAAC,CAAC;YAClJ,CAAC;QACH,CAAC;IACH,CAAC;IACD,OAAO,UAAU,CAAC;AACpB,CAAC","sourcesContent":["/**\n * Delegated administrative capabilities (#1631) — a CLIENT organization lends one service firm's experts a NAMED,\n * narrow, time-bound administrative capability, without ever making the firm an administrator.\n *\n * ## The shape, and why capabilities are ROLES\n *\n * Paul (2026-09-25, #1597 Q2): never admin by default; narrow, time-limited, client-revocable delegation; a\n * security-critical capability needs the client's OWNER, is time-bound, and is never renewed automatically. Issue\n * #1631 records the practice this follows (Microsoft's granular delegated admin privileges for partners, with a\n * time-bound relationship that cannot be auto-extended for the highest role) with its sources; nothing here quotes\n * them.\n *\n * A capability is a NAMED ROLE in the organization role table, one per {@link DelegatedAdministrativeCapability},\n * inheriting from nothing, and listed EXPLICITLY — beside `ORG_ADMIN` — in the `roles` of exactly the core operations\n * it opens. The rejected alternative (review F7) was an operation-id allow-list per grant: a second authority beside\n * role resolution that the ~20 `initiatorRoles` readers and the role ceiling would not know about.\n *\n * ## Grants are rows, filtered live\n *\n * `SERVICE_PROVIDER_CAPABILITY_GRANTS` rows live in the CLIENT organization. The execution-context live filter that\n * decides whether a provider membership confers anything (#1597) reads the relationship's grants in the same pass and\n * adds a capability's role to the expert's entries only while {@link isServiceProviderCapabilityGrantConferring}\n * holds — ACTIVE and `endsAt` still in the future. `EXPIRED` is sweep bookkeeping: admission reads `endsAt`.\n *\n * ## What delegation never does\n *\n * No capability confers `ORG_ADMIN` or `ORG_OWNER`, accepts a relationship, amends its scope, delegates further, or\n * counts toward the owner floor (provider memberships never do). Startup refuses a capability role whose `inheritFrom`\n * chain reaches an administration anchor.\n */\n\nimport { z } from 'zod';\nimport { CORE_ORG_ROLES, isInboundHandlerOnlyRole } from '../security/authorizations/roles.shared.schemas';\n\n/** @wildo_source:part:start saas.models.organizations.service-provider-capability-grants facet:layer:shared facet:audience:app-developer */\n/**\n * The closed set of administrative capabilities a client may lend a service firm (#1631). Each is ONE role\n * ({@link DELEGATED_CAPABILITY_ROLE}); a grant names one capability.\n */\nexport enum DelegatedAdministrativeCapability {\n /** Invite people into the client, resend an invitation, revoke one. */\n INVITE_MEMBERS = 'INVITE_MEMBERS',\n /**\n * Suspend or remove the firm's OWN experts under this relationship — never an ordinary member, never another firm's.\n * Deliberately not reactivate: lifting a suspension would let the firm undo the client's bar against one person (#1597).\n */\n MANAGE_RELATIONSHIP_EXPERTS = 'MANAGE_RELATIONSHIP_EXPERTS',\n /** Read the client organization's audit trail. */\n READ_AUDIT_TRAIL = 'READ_AUDIT_TRAIL',\n /** Configure the client's single sign-on and SCIM provisioning. Security-critical. */\n MANAGE_SSO_SCIM = 'MANAGE_SSO_SCIM',\n /** Manage the client organization's API keys. Security-critical. */\n MANAGE_API_KEYS = 'MANAGE_API_KEYS',\n /** Approve or deny, as the tenant, a platform operator's request to access the client. Security-critical. */\n APPROVE_ACCESS_GRANTS = 'APPROVE_ACCESS_GRANTS',\n}\n\n/**\n * The role each capability confers — the ONE mapping, total over the enum, so a capability added tomorrow is a compile\n * error here rather than a grant that confers nothing.\n */\nexport const DELEGATED_CAPABILITY_ROLE: Readonly<Record<DelegatedAdministrativeCapability, CORE_ORG_ROLES>> = Object.freeze({\n [DelegatedAdministrativeCapability.INVITE_MEMBERS]: CORE_ORG_ROLES.ORG_DELEGATED_INVITE_MEMBERS,\n [DelegatedAdministrativeCapability.MANAGE_RELATIONSHIP_EXPERTS]: CORE_ORG_ROLES.ORG_DELEGATED_MANAGE_RELATIONSHIP_EXPERTS,\n [DelegatedAdministrativeCapability.READ_AUDIT_TRAIL]: CORE_ORG_ROLES.ORG_DELEGATED_READ_AUDIT_TRAIL,\n [DelegatedAdministrativeCapability.MANAGE_SSO_SCIM]: CORE_ORG_ROLES.ORG_DELEGATED_MANAGE_SSO_SCIM,\n [DelegatedAdministrativeCapability.MANAGE_API_KEYS]: CORE_ORG_ROLES.ORG_DELEGATED_MANAGE_API_KEYS,\n [DelegatedAdministrativeCapability.APPROVE_ACCESS_GRANTS]: CORE_ORG_ROLES.ORG_DELEGATED_APPROVE_ACCESS_GRANTS,\n});\n\n/** Every capability role — conferred ONLY by a live grant, never by a membership row (the member role doors refuse them). */\nexport const DELEGATED_CAPABILITY_ROLES: ReadonlySet<string> = new Set<string>(Object.values(DELEGATED_CAPABILITY_ROLE));\n\n/** Whether `role` is one only a live capability grant may confer. */\nexport function isDelegatedCapabilityRole(role: string): boolean {\n return DELEGATED_CAPABILITY_ROLES.has(role);\n}\n\n/**\n * Whether an organization MEMBERSHIP may hold `role` at all, whatever its organization's type (#1921): not a\n * handler-only role (an engine inbound handler's alone, #1629) and not a delegated capability role (a live grant's alone,\n * #1631). The ONE statement of that rule for every surface that offers or names a role a person holds — the published\n * role table a picker offers, and a setting that names one role (`contentReaderRole`). The membership write door\n * (`validateOrgMemberRoles`) refuses each of the two kinds with its own reason; a kind added here must be refused there too.\n */\nexport function roleMayBeHeldByMembership(role: string): boolean {\n return !isInboundHandlerOnlyRole(role) && !isDelegatedCapabilityRole(role);\n}\n\n/**\n * Capabilities that change who can authenticate into, or act as, the client: only the client's OWNER grants them,\n * with step-up, for a task-sized window ({@link SECURITY_CRITICAL_CAPABILITY_DEFAULT_MAX_DAYS} at most), and a renewal is\n * a new grant — there is no `autoRenew`.\n */\nexport const SECURITY_CRITICAL_DELEGATED_CAPABILITIES: readonly DelegatedAdministrativeCapability[] = Object.freeze([\n DelegatedAdministrativeCapability.MANAGE_SSO_SCIM,\n DelegatedAdministrativeCapability.MANAGE_API_KEYS,\n DelegatedAdministrativeCapability.APPROVE_ACCESS_GRANTS,\n]);\n\n/**\n * Capabilities that need an ORGANIZATION-WIDE relationship: refused at grant time on a relationship confined to\n * organization units, because a unit-scoped relationship has no organization-wide entry (#1597 F5) to carry them.\n *\n * Every capability is here, and that is measured rather than assumed: each one opens operations on resources that do\n * not narrow by organization unit (members, audit logs, SSO / SCIM, API keys, platform access grants), and the role gate\n * on those counts only organization-wide entries. A capability granted on a unit-scoped relationship would therefore\n * be audited, mirrored to the firm as held, and confer nothing — a grant that lies. The list stays a list (rather than\n * a blanket rule) so a future capability that opens a unit-narrowable operation can be left off it deliberately.\n */\nexport const ORGANIZATION_LEVEL_DELEGATED_CAPABILITIES: readonly DelegatedAdministrativeCapability[] = Object.freeze([\n DelegatedAdministrativeCapability.INVITE_MEMBERS,\n DelegatedAdministrativeCapability.MANAGE_RELATIONSHIP_EXPERTS,\n DelegatedAdministrativeCapability.READ_AUDIT_TRAIL,\n DelegatedAdministrativeCapability.MANAGE_SSO_SCIM,\n DelegatedAdministrativeCapability.MANAGE_API_KEYS,\n DelegatedAdministrativeCapability.APPROVE_ACCESS_GRANTS,\n]);\n\n/** The longest an ordinary capability may be granted for: two years, GDAP's relationship maximum. */\nexport const DELEGATED_CAPABILITY_MAX_DAYS = 730;\n/**\n * The longest a security-critical capability may be granted for, unless the application declares a lower cap\n * (`acceptsServiceProviders.securityCriticalCapabilityMaxDays`). A reversible default chosen for #1631 — a task-sized\n * window, far below the relationship maximum — NOT a figure taken from GDAP.\n */\nexport const SECURITY_CRITICAL_CAPABILITY_DEFAULT_MAX_DAYS = 30;\n\n/** Where one grant stands. */\nexport enum ServiceProviderCapabilityGrantStatus {\n /** Granted and not revoked. Confers only while `endsAt` is still in the future. */\n ACTIVE = 'ACTIVE',\n /** A client administrator revoked it, or the relationship ended. Terminal. */\n REVOKED = 'REVOKED',\n /** The sweep relabelled it after `endsAt`. Terminal bookkeeping — admission never reads this label. */\n EXPIRED = 'EXPIRED',\n}\n\n/** Why a grant stopped conferring before its term — what a REVOKED audit row records (#1631 review F10). */\nexport enum ServiceProviderCapabilityGrantEndCause {\n /** A client administrator revoked it. */\n REVOKED_BY_CLIENT = 'REVOKED_BY_CLIENT',\n /** Its relationship ended (terminated, withdrawn, expired, declined, or a party removed). */\n RELATIONSHIP_ENDED = 'RELATIONSHIP_ENDED',\n /** Its relationship was narrowed to organization units, which cannot carry any capability. */\n RELATIONSHIP_NARROWED = 'RELATIONSHIP_NARROWED',\n}\n\n/** The client's verbs on its grants. The firm has none: it can never grant, widen or extend. */\nexport enum ServiceProviderCapabilityGrants_Operations {\n /** Client ORG_ADMIN lends an ORDINARY capability, for at most two years. */\n GRANT = 'grant',\n /** Client ORG_OWNER lends a SECURITY-CRITICAL capability, with step-up, for a task-sized window. */\n GRANT_SECURITY_CRITICAL = 'grantSecurityCritical',\n /** Client ORG_ADMIN revokes any grant, at any time, without asking the firm. Takes effect on the next request. */\n REVOKE = 'revoke',\n /** ACTIVE → EXPIRED past `endsAt`, dispatched by the credential-expiry sweep only. */\n EXPIRE = 'expire',\n}\n\n/** The client-branchable codes a refused grant carries (409: authorized caller, valid payload, the STATE forbids it). */\nexport enum ServiceProviderCapabilityGrantErrorCode {\n /** The relationship is not ACTIVE (or SUSPENDED) — nothing can be lent to a relationship that confers nothing. */\n SERVICE_PROVIDER_CAPABILITY_RELATIONSHIP_NOT_LIVE = 'SERVICE_PROVIDER_CAPABILITY_RELATIONSHIP_NOT_LIVE',\n /** A security-critical capability through the ordinary `grant`, or an ordinary one through the owner's verb. */\n SERVICE_PROVIDER_CAPABILITY_WRONG_GRANT_VERB = 'SERVICE_PROVIDER_CAPABILITY_WRONG_GRANT_VERB',\n /** `endsAt` beyond the cap for this capability, or not in the future. */\n SERVICE_PROVIDER_CAPABILITY_TERM_NOT_ALLOWED = 'SERVICE_PROVIDER_CAPABILITY_TERM_NOT_ALLOWED',\n /** An organization-level capability on a relationship confined to organization units. */\n SERVICE_PROVIDER_CAPABILITY_REQUIRES_ORGANIZATION_WIDE_RELATIONSHIP = 'SERVICE_PROVIDER_CAPABILITY_REQUIRES_ORGANIZATION_WIDE_RELATIONSHIP',\n /** An ACTIVE grant of this capability already exists on this relationship; revoke it first (a renewal is a new grant). */\n SERVICE_PROVIDER_CAPABILITY_ALREADY_GRANTED = 'SERVICE_PROVIDER_CAPABILITY_ALREADY_GRANTED',\n /** MANAGE_RELATIONSHIP_EXPERTS used on a membership that is not an expert of the SAME relationship. */\n SERVICE_PROVIDER_CAPABILITY_TARGET_OUTSIDE_RELATIONSHIP = 'SERVICE_PROVIDER_CAPABILITY_TARGET_OUTSIDE_RELATIONSHIP',\n}\n/** @wildo_source:part:end saas.models.organizations.service-provider-capability-grants */\n\n/**\n * Does this grant confer its capability RIGHT NOW? The ONE predicate the live filter uses: ACTIVE, and `endsAt` in the\n * future. `endsAt` is read here rather than trusting the EXPIRED label, so a grant stops working the moment its term\n * passes whether or not the sweep has run (invariant 1).\n */\nexport function isServiceProviderCapabilityGrantConferring(\n grant: { readonly status?: unknown; readonly endsAt?: Date | string | null } | null | undefined,\n now: Date,\n): boolean {\n if (!grant || grant.status !== ServiceProviderCapabilityGrantStatus.ACTIVE) return false;\n if (grant.endsAt === undefined || grant.endsAt === null) return false;\n const endsAt = grant.endsAt instanceof Date ? grant.endsAt : new Date(grant.endsAt);\n return Number.isFinite(endsAt.getTime()) && endsAt.getTime() > now.getTime();\n}\n\nconst DAY_MS = 24 * 60 * 60 * 1000;\n\n/**\n * May this capability be lent on this relationship, until `endsAt`, through this verb? (#1631 invariants 3 and 5)\n *\n * The one rule both grant verbs apply. Pure: the caller supplies the relationship's scope and the application's\n * declared cap. Fails closed on anything it cannot prove.\n */\nexport function resolveServiceProviderCapabilityGrantTerms(input: {\n readonly capability: DelegatedAdministrativeCapability;\n readonly verb: ServiceProviderCapabilityGrants_Operations.GRANT | ServiceProviderCapabilityGrants_Operations.GRANT_SECURITY_CRITICAL;\n readonly endsAt: Date;\n readonly now: Date;\n /** The relationship's `organizationUnitIds`: non-empty ⇒ unit-scoped. */\n readonly relationshipOrganizationUnitIds?: readonly string[] | null;\n /** The client organization type's declared `acceptsServiceProviders.securityCriticalCapabilityMaxDays`. */\n readonly declaredSecurityCriticalMaxDays?: number;\n}):\n | { readonly allowed: true }\n | { readonly allowed: false; readonly code: ServiceProviderCapabilityGrantErrorCode } {\n const securityCritical = SECURITY_CRITICAL_DELEGATED_CAPABILITIES.includes(input.capability);\n const expectedVerb = securityCritical\n ? ServiceProviderCapabilityGrants_Operations.GRANT_SECURITY_CRITICAL\n : ServiceProviderCapabilityGrants_Operations.GRANT;\n if (input.verb !== expectedVerb) return { allowed: false, code: ServiceProviderCapabilityGrantErrorCode.SERVICE_PROVIDER_CAPABILITY_WRONG_GRANT_VERB };\n if ((input.relationshipOrganizationUnitIds ?? []).length > 0 && ORGANIZATION_LEVEL_DELEGATED_CAPABILITIES.includes(input.capability)) {\n return { allowed: false, code: ServiceProviderCapabilityGrantErrorCode.SERVICE_PROVIDER_CAPABILITY_REQUIRES_ORGANIZATION_WIDE_RELATIONSHIP };\n }\n const maxDays = securityCritical\n ? Math.min(SECURITY_CRITICAL_CAPABILITY_DEFAULT_MAX_DAYS, input.declaredSecurityCriticalMaxDays ?? SECURITY_CRITICAL_CAPABILITY_DEFAULT_MAX_DAYS)\n : DELEGATED_CAPABILITY_MAX_DAYS;\n const endsAtMs = input.endsAt.getTime();\n if (!Number.isFinite(endsAtMs) || endsAtMs <= input.now.getTime() || endsAtMs > input.now.getTime() + maxDays * DAY_MS) {\n return { allowed: false, code: ServiceProviderCapabilityGrantErrorCode.SERVICE_PROVIDER_CAPABILITY_TERM_NOT_ALLOWED };\n }\n return { allowed: true };\n}\n\n/**\n * One grant, stored in the CLIENT organization. Every field is server-authored: the verbs write them, and there is no\n * generic CREATE or UPDATE.\n */\nexport const ServiceProviderCapabilityGrantSchema = z.object({\n _id: z.string().min(1).isPrimaryKey().isSummaryField(),\n\n /** The CLIENT organization — the party lending the capability, and the scope anchor. */\n organizationId: z.string().min(1).isDBIndexed().isForeignKey().isSummaryField().excludeFromUpdate().isAuditEvidence(),\n\n /** The relationship the capability is lent through — same tenant, a real edge. The live filter reads grants by it. */\n relationshipId: z.string().min(1).isDBIndexed().isForeignKey().isSummaryField().excludeFromCreate().excludeFromUpdate().isAuditEvidence(),\n\n /** The firm, copied from the relationship so a row names both parties. A plain id, never an edge into another tenant. */\n providerOrganizationId: z.string().min(1).isDBIndexed().excludeFromCreate().excludeFromUpdate().isAuditEvidence(),\n\n capability: z.enum(DelegatedAdministrativeCapability)\n .systemEnum('DelegatedAdministrativeCapability')\n .isSummaryField()\n .excludeFromCreate()\n .excludeFromUpdate()\n .isAuditEvidence(),\n\n /** When the capability stops conferring. Required: a delegation always ends. Admission reads this, never the EXPIRED label. */\n endsAt: z.date().isDBIndexed().isSummaryField().excludeFromCreate().excludeFromUpdate().isAuditEvidence(),\n\n status: z.enum(ServiceProviderCapabilityGrantStatus)\n .systemEnum('ServiceProviderCapabilityGrantStatus')\n .default(ServiceProviderCapabilityGrantStatus.ACTIVE)\n .isDBIndexed()\n .isSummaryField()\n .excludeFromCreate()\n .excludeFromUpdate()\n .isAuditEvidence(),\n\n grantedByUserId: z.string().min(1).optional().excludeFromCreate().excludeFromUpdate().isAuditEvidence(),\n grantedAt: z.date().optional().excludeFromCreate().excludeFromUpdate(),\n revokedByUserId: z.string().min(1).optional().excludeFromCreate().excludeFromUpdate().isAuditEvidence(),\n revokedAt: z.date().optional().excludeFromCreate().excludeFromUpdate(),\n /** When the grant stopped — revoked, or relabelled after its term. The retention clock's start point (#1613). */\n endedAt: z.date().optional().isDBIndexed().excludeFromCreate().excludeFromUpdate(),\n\n createdAt: z.date().optional(),\n updatedAt: z.date().optional(),\n});\nexport type ServiceProviderCapabilityGrant = z.infer<typeof ServiceProviderCapabilityGrantSchema>;\n\n/** One capability the firm holds in a client, as its engagement mirror shows it. */\nexport const ServiceEngagementDelegatedCapabilitySchema = z.object({\n capability: z.enum(DelegatedAdministrativeCapability).systemEnum('DelegatedAdministrativeCapability')\n .describe('An administrative capability the client organization currently lends this firm.'),\n endsAt: z.date().describe('When the lending of that capability ends.'),\n});\nexport type ServiceEngagementDelegatedCapability = z.infer<typeof ServiceEngagementDelegatedCapabilitySchema>;\n\n/** Why the organization role table was refused at startup for a delegated capability role (#1631). */\nexport enum DelegatedCapabilityRoleViolationKind {\n /** The capability role is not in the organization role table at all — a grant of it would confer nothing, silently. */\n CAPABILITY_ROLE_UNDECLARED = 'CAPABILITY_ROLE_UNDECLARED',\n /** The role's `inheritFrom` chain reaches an administration anchor (ORG_ADMIN / ORG_OWNER): lending it would make the firm an administrator. */\n CAPABILITY_ROLE_REACHES_ADMINISTRATION = 'CAPABILITY_ROLE_REACHES_ADMINISTRATION',\n /**\n * Another organization role inherits the capability role: every holder of that role would carry the capability\n * standing, with no grant row, no term and no revocation. A capability is conferred only by a live grant.\n */\n CAPABILITY_ROLE_INHERITED_BY_ANOTHER_ROLE = 'CAPABILITY_ROLE_INHERITED_BY_ANOTHER_ROLE',\n}\n\n/**\n * Validate every delegated capability role against the LIVE organization role table (#1631 invariant 2). An application\n * may override the engine's role definitions, so the check runs on the table the authorizer actually uses: a capability\n * role redefined to inherit from `ORG_ADMIN` (or anything that leads there) is refused at boot, exactly as a provider\n * role that reaches `ORG_ADMIN` is.\n */\nexport function collectDelegatedCapabilityRoleViolations(input: {\n /** The role's `inheritFrom` walk in the ORGANIZATIONS table, the role itself included; empty ⇒ undeclared. */\n readonly organizationRoleHierarchy: (role: string) => readonly string[];\n readonly administrationAnchorRoles: readonly string[];\n /** Every key of the LIVE organization role table, so a role that inherits a capability role can be found. */\n readonly organizationRoles?: readonly string[];\n}): { capability: DelegatedAdministrativeCapability; role: string; kind: DelegatedCapabilityRoleViolationKind; inheritedBy?: string }[] {\n const violations: { capability: DelegatedAdministrativeCapability; role: string; kind: DelegatedCapabilityRoleViolationKind; inheritedBy?: string }[] = [];\n for (const capability of Object.values(DelegatedAdministrativeCapability)) {\n const role = DELEGATED_CAPABILITY_ROLE[capability];\n const hierarchy = input.organizationRoleHierarchy(role);\n if (hierarchy.length === 0) {\n violations.push({ capability, role, kind: DelegatedCapabilityRoleViolationKind.CAPABILITY_ROLE_UNDECLARED });\n continue;\n }\n if (hierarchy.some((held) => input.administrationAnchorRoles.includes(held))) {\n violations.push({ capability, role, kind: DelegatedCapabilityRoleViolationKind.CAPABILITY_ROLE_REACHES_ADMINISTRATION });\n }\n for (const other of input.organizationRoles ?? []) {\n if (other !== role && input.organizationRoleHierarchy(other).includes(role)) {\n violations.push({ capability, role, kind: DelegatedCapabilityRoleViolationKind.CAPABILITY_ROLE_INHERITED_BY_ANOTHER_ROLE, inheritedBy: other });\n }\n }\n }\n return violations;\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"service-provider-client-controls.shared.schemas.d.ts","sourceRoot":"","sources":["../../../src/organizations/service-provider-client-controls.shared.schemas.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,0IAA0I;AAC1I;;;;;;;;;;GAUG;AACH,oBAAY,uBAAuB;IACjC,oFAAoF;IACpF,WAAW,gBAAgB;IAC3B;;;;OAIG;IACH,sBAAsB,2BAA2B;CAClD;AAED;;;;;;GAMG;AACH,oBAAY,qCAAqC;IAC/C,iEAAiE;IACjE,IAAI,SAAS;IACb,0HAA0H;IAC1H,mBAAmB,wBAAwB;IAC3C,oEAAoE;IACpE,qBAAqB,0BAA0B;CAChD;AACD,wFAAwF"}
1
+ {"version":3,"file":"service-provider-client-controls.shared.schemas.d.ts","sourceRoot":"","sources":["../../../../src/organizations/service-provider-client-controls.shared.schemas.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,0IAA0I;AAC1I;;;;;;;;;;GAUG;AACH,oBAAY,uBAAuB;IACjC,oFAAoF;IACpF,WAAW,gBAAgB;IAC3B;;;;OAIG;IACH,sBAAsB,2BAA2B;CAClD;AAED;;;;;;GAMG;AACH,oBAAY,qCAAqC;IAC/C,iEAAiE;IACjE,IAAI,SAAS;IACb,0HAA0H;IAC1H,mBAAmB,wBAAwB;IAC3C,oEAAoE;IACpE,qBAAqB,0BAA0B;CAChD;AACD,wFAAwF"}
@@ -1 +1 @@
1
- {"version":3,"file":"service-provider-client-controls.shared.schemas.js","sourceRoot":"","sources":["../../../src/organizations/service-provider-client-controls.shared.schemas.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,0IAA0I;AAC1I;;;;;;;;;;GAUG;AACH,MAAM,CAAN,IAAY,uBASX;AATD,WAAY,uBAAuB;IACjC,oFAAoF;IACpF,sDAA2B,CAAA;IAC3B;;;;OAIG;IACH,4EAAiD,CAAA;AACnD,CAAC,EATW,uBAAuB,KAAvB,uBAAuB,QASlC;AAED;;;;;;GAMG;AACH,MAAM,CAAN,IAAY,qCAOX;AAPD,WAAY,qCAAqC;IAC/C,iEAAiE;IACjE,sDAAa,CAAA;IACb,0HAA0H;IAC1H,oFAA2C,CAAA;IAC3C,oEAAoE;IACpE,wFAA+C,CAAA;AACjD,CAAC,EAPW,qCAAqC,KAArC,qCAAqC,QAOhD;AACD,wFAAwF","sourcesContent":["/**\n * What a CLIENT organization decides, per service-provider relationship, about the firm whose experts work inside it\n * (#1633, #1632).\n *\n * Both settings live on `SERVICE_PROVIDER_RELATIONSHIPS`, the row the client owns, and each is changed only by the\n * client's own verb. The firm has no verb that writes either, and neither widens what the relationship confers: one\n * decides how strongly an expert must have proven who they are before acting here, the other how much the firm may\n * learn afterwards about what its own staff did here.\n */\n\n/** @wildo_source:part:start saas.models.organizations.service-provider-client-controls facet:layer:shared facet:audience:app-developer */\n/**\n * Whether the client accepts the multi-factor proof the FIRM's own identity provider made (#1633).\n *\n * The client organization type's authentication policy governs an expert whenever they act in the client, whatever\n * the firm's policy is. When that policy asks for a second factor, the expert proves it to THIS application for THIS\n * client, and nothing proven elsewhere counts — unless the client trusts the firm's identity provider here.\n *\n * Off by default, as Microsoft Entra's cross-tenant inbound trust is: trusting another organization's MFA is the\n * RESOURCE tenant's decision, made per partner. Even when on, the client's minimum strength still applies, and an\n * operation that demands a fresh step-up still demands one.\n */\nexport enum ServiceProviderMfaTrust {\n /** Only a factor proven to this application for this client counts. The default. */\n NOT_TRUSTED = 'NOT_TRUSTED',\n /**\n * A factor the firm's own enterprise identity provider reported in the expert's sign-in (`amr`) counts too, when\n * the expert signed in through THAT provider and the reported method meets the client's minimum strength. The\n * accepted claim is recorded as coming from the firm's provider; it is never re-emitted as this application's own.\n */\n TRUST_PROVIDER_IDP_MFA = 'TRUST_PROVIDER_IDP_MFA',\n}\n\n/**\n * How much the firm's expert-activity feed may say about work done in THIS client (#1632).\n *\n * The client's side of the feed: the firm decides whether it collects activity metadata about its staff at all\n * (`SERVICE_PROVIDER_ACTIVITY_FEED_SETTINGS`), and the client can switch it off or narrow it for its own tenant. A\n * feed entry is written only when both allow it, and it never carries the client's content at any level.\n */\nexport enum ServiceProviderActivityFeedDisclosure {\n /** Nothing about work in this client reaches the firm's feed. */\n NONE = 'NONE',\n /** The firm learns that an operation of a given type ran on a resource type, when, by whom — not whether it succeeded. */\n OPERATION_TYPE_ONLY = 'OPERATION_TYPE_ONLY',\n /** As above, plus the outcome. Still metadata only. The default. */\n OPERATION_AND_OUTCOME = 'OPERATION_AND_OUTCOME',\n}\n/** @wildo_source:part:end saas.models.organizations.service-provider-client-controls */\n"]}
1
+ {"version":3,"file":"service-provider-client-controls.shared.schemas.js","sourceRoot":"","sources":["../../../../src/organizations/service-provider-client-controls.shared.schemas.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,0IAA0I;AAC1I;;;;;;;;;;GAUG;AACH,MAAM,CAAN,IAAY,uBASX;AATD,WAAY,uBAAuB;IACjC,oFAAoF;IACpF,sDAA2B,CAAA;IAC3B;;;;OAIG;IACH,4EAAiD,CAAA;AACnD,CAAC,EATW,uBAAuB,KAAvB,uBAAuB,QASlC;AAED;;;;;;GAMG;AACH,MAAM,CAAN,IAAY,qCAOX;AAPD,WAAY,qCAAqC;IAC/C,iEAAiE;IACjE,sDAAa,CAAA;IACb,0HAA0H;IAC1H,oFAA2C,CAAA;IAC3C,oEAAoE;IACpE,wFAA+C,CAAA;AACjD,CAAC,EAPW,qCAAqC,KAArC,qCAAqC,QAOhD;AACD,wFAAwF","sourcesContent":["/**\n * What a CLIENT organization decides, per service-provider relationship, about the firm whose experts work inside it\n * (#1633, #1632).\n *\n * Both settings live on `SERVICE_PROVIDER_RELATIONSHIPS`, the row the client owns, and each is changed only by the\n * client's own verb. The firm has no verb that writes either, and neither widens what the relationship confers: one\n * decides how strongly an expert must have proven who they are before acting here, the other how much the firm may\n * learn afterwards about what its own staff did here.\n */\n\n/** @wildo_source:part:start saas.models.organizations.service-provider-client-controls facet:layer:shared facet:audience:app-developer */\n/**\n * Whether the client accepts the multi-factor proof the FIRM's own identity provider made (#1633).\n *\n * The client organization type's authentication policy governs an expert whenever they act in the client, whatever\n * the firm's policy is. When that policy asks for a second factor, the expert proves it to THIS application for THIS\n * client, and nothing proven elsewhere counts — unless the client trusts the firm's identity provider here.\n *\n * Off by default, as Microsoft Entra's cross-tenant inbound trust is: trusting another organization's MFA is the\n * RESOURCE tenant's decision, made per partner. Even when on, the client's minimum strength still applies, and an\n * operation that demands a fresh step-up still demands one.\n */\nexport enum ServiceProviderMfaTrust {\n /** Only a factor proven to this application for this client counts. The default. */\n NOT_TRUSTED = 'NOT_TRUSTED',\n /**\n * A factor the firm's own enterprise identity provider reported in the expert's sign-in (`amr`) counts too, when\n * the expert signed in through THAT provider and the reported method meets the client's minimum strength. The\n * accepted claim is recorded as coming from the firm's provider; it is never re-emitted as this application's own.\n */\n TRUST_PROVIDER_IDP_MFA = 'TRUST_PROVIDER_IDP_MFA',\n}\n\n/**\n * How much the firm's expert-activity feed may say about work done in THIS client (#1632).\n *\n * The client's side of the feed: the firm decides whether it collects activity metadata about its staff at all\n * (`SERVICE_PROVIDER_ACTIVITY_FEED_SETTINGS`), and the client can switch it off or narrow it for its own tenant. A\n * feed entry is written only when both allow it, and it never carries the client's content at any level.\n */\nexport enum ServiceProviderActivityFeedDisclosure {\n /** Nothing about work in this client reaches the firm's feed. */\n NONE = 'NONE',\n /** The firm learns that an operation of a given type ran on a resource type, when, by whom — not whether it succeeded. */\n OPERATION_TYPE_ONLY = 'OPERATION_TYPE_ONLY',\n /** As above, plus the outcome. Still metadata only. The default. */\n OPERATION_AND_OUTCOME = 'OPERATION_AND_OUTCOME',\n}\n/** @wildo_source:part:end saas.models.organizations.service-provider-client-controls */\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"service-provider-relationships.shared.resources-config.schemas.d.ts","sourceRoot":"","sources":["../../../src/organizations/service-provider-relationships.shared.resources-config.schemas.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAGL,iCAAiC,EACjC,oCAAoC,EACpC,uCAAuC,EAEvC,6BAA6B,EAE7B,iCAAiC,EACjC,uCAAuC,EACxC,MAAM,iDAAiD,CAAC;AACzD,OAAO,EAAE,qBAAqB,EAAwD,MAAM,gDAAgD,CAAC;AAC7I,OAAO,EAA4D,KAAK,oBAAoB,EAAE,MAAM,uCAAuC,CAAC;AAO5I,OAAO,EAAE,qCAAqC,EAAE,uBAAuB,EAAE,MAAM,mDAAmD,CAAC;AA+DnI,KAAK,0BAA0B,GAC3B,qBAAqB,CAAC,IAAI,GAC1B,qBAAqB,CAAC,IAAI,GAC1B,qBAAqB,CAAC,KAAK,GAC3B,qBAAqB,CAAC,MAAM,GAC5B,qBAAqB,CAAC,MAAM,GAC5B,qBAAqB,CAAC,WAAW,GACjC,qBAAqB,CAAC,MAAM,CAAC;AA6BjC,eAAO,MAAM,uEAAuE,GAAI,wBAAwB,oBAAoB,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;kBAsRlI,CAAC;AAIL,eAAO,MAAM,6DAA6D,GAAI,wBAAwB,oBAAoB,EAAE;;;;;;;;;;;;;;;;;;;;;kBA0GxH,CAAC;AAIL,eAAO,MAAM,uEAAuE,GAAI,wBAAwB,oBAAoB,EAAE;;;;;;;;;;;;;;;;;;;;;;;;kBAqHlI,CAAC"}
1
+ {"version":3,"file":"service-provider-relationships.shared.resources-config.schemas.d.ts","sourceRoot":"","sources":["../../../../src/organizations/service-provider-relationships.shared.resources-config.schemas.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAGL,iCAAiC,EACjC,oCAAoC,EACpC,uCAAuC,EAEvC,6BAA6B,EAE7B,iCAAiC,EACjC,uCAAuC,EACxC,MAAM,iDAAiD,CAAC;AACzD,OAAO,EAAE,qBAAqB,EAAwD,MAAM,gDAAgD,CAAC;AAC7I,OAAO,EAA4D,KAAK,oBAAoB,EAAE,MAAM,uCAAuC,CAAC;AAO5I,OAAO,EAAE,qCAAqC,EAAE,uBAAuB,EAAE,MAAM,mDAAmD,CAAC;AA+DnI,KAAK,0BAA0B,GAC3B,qBAAqB,CAAC,IAAI,GAC1B,qBAAqB,CAAC,IAAI,GAC1B,qBAAqB,CAAC,KAAK,GAC3B,qBAAqB,CAAC,MAAM,GAC5B,qBAAqB,CAAC,MAAM,GAC5B,qBAAqB,CAAC,WAAW,GACjC,qBAAqB,CAAC,MAAM,CAAC;AA6BjC,eAAO,MAAM,uEAAuE,GAAI,wBAAwB,oBAAoB,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;kBAsRlI,CAAC;AAIL,eAAO,MAAM,6DAA6D,GAAI,wBAAwB,oBAAoB,EAAE;;;;;;;;;;;;;;;;;;;;;kBA0GxH,CAAC;AAIL,eAAO,MAAM,uEAAuE,GAAI,wBAAwB,oBAAoB,EAAE;;;;;;;;;;;;;;;;;;;;;;;;kBAqHlI,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"service-provider-relationships.shared.resources-config.schemas.js","sourceRoot":"","sources":["../../../src/organizations/service-provider-relationships.shared.resources-config.schemas.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EACL,iCAAiC,EACjC,wDAAwD,EACxD,iCAAiC,EACjC,oCAAoC,EACpC,uCAAuC,EACvC,uBAAuB,EACvB,6BAA6B,EAC7B,iCAAiC,EACjC,iCAAiC,EACjC,uCAAuC,GACxC,MAAM,iDAAiD,CAAC;AACzD,OAAO,EAAE,qBAAqB,EAAE,gBAAgB,EAAE,kCAAkC,EAAE,MAAM,gDAAgD,CAAC;AAC7I,OAAO,EAAE,0BAA0B,EAAE,4BAA4B,EAA6B,MAAM,uCAAuC,CAAC;AAC5I,OAAO,EAAE,0CAA0C,EAAE,MAAM,8CAA8C,CAAC;AAC1G,OAAO,EAAE,wBAAwB,EAAE,MAAM,8CAA8C,CAAC;AACxF,OAAO,EAAE,cAAc,EAAE,cAAc,EAAE,MAAM,iDAAiD,CAAC;AACjG,OAAO,EAAE,oBAAoB,EAAE,uBAAuB,EAAE,MAAM,wDAAwD,CAAC;AACvH,OAAO,EAAE,kBAAkB,EAAE,mBAAmB,EAAE,MAAM,yDAAyD,CAAC;AAClH,OAAO,EAAE,oCAAoC,EAAE,wBAAwB,EAAE,MAAM,kDAAkD,CAAC;AAClI,OAAO,EAAE,qCAAqC,EAAE,uBAAuB,EAAE,MAAM,mDAAmD,CAAC;AAEnI,gGAAgG;AAChG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,CAAC,MAAM;oBACnD,UAAU,EAAE,CAAC,CAAC,MAAM,CAAC,EAAE,CAAC;oBACxB,gBAAgB,EAAE,CAAC,EAAE,aAAa,EAAE,EAAE,EAAE,CAAC,aAAa,CAAC,MAAM,KAAK,iCAAiC,CAAC,MAAM;2BACrG,aAAa,CAAC,MAAM,KAAK,iCAAiC,CAAC,uBAAuB;iBACxF,CAAC;SACH;QAED;;;;WAIG;QACH,CAAC,uCAAuC,CAAC,sBAAsB,CAAC,EAAE;YAChE,QAAQ,EAAE,CAAC;oBACT,WAAW,EAAE,4BAA4B,CAAC,aAAa;oBACvD,SAAS,EAAE,IAAI;oBACf,KAAK,EAAE,CAAC,cAAc,CAAC,qBAAqB,CAAC;oBAC7C,SAAS,EAAE,0BAA0B,CAAC,IAAI;oBAC1C,qBAAqB,EAAE,qBAAqB,CAAC,MAAM;oBACnD,UAAU,EAAE,wDAAwD;iBACrE,CAAC;SACH;KACF;CACF,CAAC,CAAC","sourcesContent":["/**\n * Service-provider relationships — resource configurations for the three resources (#1597).\n *\n * The asymmetry is the design: the CLIENT's verbs are on the relationship (client scope), the FIRM's\n * verbs are on its engagement mirror (firm scope), and each side's counterpart row is written by the\n * system inside the same transaction. No verb here declares `admitsCrossTenantPlatformAdministration`:\n * nobody reaches into the other tenant through a request.\n *\n * Every lifecycle verb is HIGH risk, and the two that CONFER — the client accepting a firm's proposal and\n * the client widening a relationship's scope — demand the client ORG_OWNER plus step-up, because they\n * hand people outside the organization a membership inside it.\n *\n * See `service-provider-relationships.shared.schemas.ts` for the model.\n */\n\nimport { z } from 'zod';\nimport {\n ServiceEngagementAssignmentSchema,\n ServiceEngagementAssignmentSettleClientApprovalDtoSchema,\n ServiceEngagementAssignmentStatus,\n ServiceProviderExpertAdmissionPolicy,\n ServiceEngagementAssignments_Operations,\n ServiceEngagementSchema,\n ServiceEngagements_Operations,\n ServiceProviderRelationshipSchema,\n ServiceProviderRelationshipStatus,\n ServiceProviderRelationships_Operations,\n} from './service-provider-relationships.shared.schemas';\nimport { CoreResourceOperation, CoreResourceType, coreResourceShared_FieldIdentifier } from '../resources/resources.shared.core.definitions';\nimport { ResourceOperationRiskLevel, ResourceOperationVariantType, type ResourceRelationship } from '../resources/resources.shared.schemas';\nimport { createResourceConfiguration_Initialization } from '../resources/resources-config.shared.factory';\nimport { ResourceSystemAccessMode } from '../resources/resources-config.shared.schemas';\nimport { CORE_APP_ROLES, CORE_ORG_ROLES } from '../security/authorizations/roles.shared.schemas';\nimport { ErasureRetentionMode, ResourceDataSubjectKind } from '../compliance/privacy/impersonalization.shared.schemas';\nimport { DataRetentionClass, RetentionStartPoint } from '../compliance/privacy/retention-schedule.shared.schemas';\nimport { AUTONOMOUS_AGENT_REFS_PER_CLIENT_MAX, AutonomousAgentRefSchema } from '../flows-actors/autonomous-agents.shared.schemas';\nimport { ServiceProviderActivityFeedDisclosure, ServiceProviderMfaTrust } from './service-provider-client-controls.shared.schemas';\n\n/** A reason one side gives when refusing or ending. Optional everywhere; recorded, erasable. */\nconst decisionReasonDto = z.object({ decisionReason: z.string().max(1000).optional() });\n\n/** The scope a relationship is proposed or amended with. The client decides it; the firm may only propose it. */\nconst relationshipScopeDto = {\n /** One of the provider type's `servesAsProvider.providerRoles`. Absent ⇒ its `defaultProviderRole`. */\n role: z.string().min(1).optional(),\n /** Client organization units. Absent or empty ⇒ organization-wide. */\n organizationUnitIds: z.array(z.string().min(1)).max(100).optional(),\n /**\n * When the relationship stops conferring. `null` means \"no term\" — the framework's merge-patch UPDATE\n * reading — and is what `amendScope` writes when it clears one.\n *\n * `.nullish()`, never `.optional()`: `z.coerce.date().optional()` does not reject `null`, it COERCES it,\n * and `new Date(null)` is 1970-01-01. The operation's own prefix output is parsed by this DTO, so a\n * cleared term was stored as a term that ended in 1970 — which the live filter reads as over, ending\n * the relationship the client meant to make open-ended.\n */\n endsAt: z.coerce.date().nullish(),\n};\n\n/**\n * The client's choice of how the firm's experts are admitted (#1612). Only ever part of a CLIENT verb's contract —\n * the firm's verbs do not declare it, so a firm-supplied value is stripped before any implementation sees it.\n */\nconst expertAdmissionPolicyDto = {\n expertAdmissionPolicy: z.enum(ServiceProviderExpertAdmissionPolicy).optional()\n .describe('Whether each expert the firm assigns must first be approved by your organization\\'s administrators. Absent: your organization type\\'s default, else every assigned expert is admitted.'),\n};\n\nconst LIVE = (status: unknown) =>\n status === ServiceProviderRelationshipStatus.PROPOSED\n || status === ServiceProviderRelationshipStatus.ACTIVE\n || status === ServiceProviderRelationshipStatus.SUSPENDED;\n\n/**\n * Route-less plumbing shared by all three resources.\n *\n * - `UPDATE_MANY` — the retention writer's verb (`retentionPolicy` requires READ + LIST + UPDATE_MANY).\n * - `DELETE` — the organization purge cascade's verb ONLY. No client can delete a relationship: the\n * terminal statuses are how one ends, and erasing the record would rewrite who could reach a tenant.\n * - `CREATE` / `UPDATE` — the system door the verbs write COUNTERPART rows through (`createAsSystem` /\n * `updateAsSystem` resolve the resource's default CREATE / UPDATE). INTERNAL_CALL registers no route.\n */\n/* (inlined into each configuration below — contextual typing needs the literal in place) */\n\n\n/**\n * The counterpart write door is a system door, so the policy says so — and says nothing else.\n *\n * `read`/`list` are ALLOWED because the execution-context builder reads relationships and assignments on\n * a system context to decide a caller's authority (the caller is, by construction, not yet authorized).\n */\nconst systemWrites = {\n read: ResourceSystemAccessMode.ALLOWED,\n list: ResourceSystemAccessMode.ALLOWED,\n create: ResourceSystemAccessMode.ALLOWED,\n update: ResourceSystemAccessMode.ALLOWED,\n updateMany: ResourceSystemAccessMode.ALLOWED,\n};\n\ntype RelationshipCoreOperations =\n | CoreResourceOperation.READ\n | CoreResourceOperation.LIST\n | CoreResourceOperation.COUNT\n | CoreResourceOperation.CREATE\n | CoreResourceOperation.UPDATE\n | CoreResourceOperation.UPDATE_MANY\n | CoreResourceOperation.DELETE;\n\nconst CORE_OPERATIONS: RelationshipCoreOperations[] = [\n CoreResourceOperation.READ,\n CoreResourceOperation.LIST,\n CoreResourceOperation.COUNT,\n CoreResourceOperation.CREATE,\n CoreResourceOperation.UPDATE,\n CoreResourceOperation.UPDATE_MANY,\n CoreResourceOperation.DELETE,\n];\n\n/** Retained on erasure: who could reach which tenant, when and under what scope is the record; the prose is scrubbed. */\nconst RETAIN = { mode: ErasureRetentionMode.RETAIN_AND_IMPERSONALIZE };\n\n/**\n * How long each of the three records lives (#1613): the AUDIT_LOGS class, from the moment the record ENDS.\n *\n * They are the evidence of who from outside could reach a tenant, and when — the question an access\n * review or an incident asks years later — so they are kept for the audit trail's own period rather than\n * the ordinary resource-data one. While a relationship or an assignment is live its `endedAt` is null and\n * the row never expires; the clock starts only when it ends.\n */\nconst KEPT_AS_ACCESS_EVIDENCE = {\n retentionClass: DataRetentionClass.AUDIT_LOGS,\n startPoint: RetentionStartPoint.CLOSURE_EVENT,\n closureFieldName: 'endedAt',\n};\n\nexport const serviceProviderRelationshipsResourceConfiguration_InitializationFactory = (resourcesRelationships: ResourceRelationship[]) =>\n createResourceConfiguration_Initialization<\n typeof ServiceProviderRelationships_Operations,\n RelationshipCoreOperations,\n typeof ServiceProviderRelationshipSchema\n >({\n mainSchema: ServiceProviderRelationshipSchema,\n resourceIdentifier: CoreResourceType.SERVICE_PROVIDER_RELATIONSHIPS,\n resourceFieldIdentifier: coreResourceShared_FieldIdentifier[CoreResourceType.SERVICE_PROVIDER_RELATIONSHIPS],\n resourceRelationships: resourcesRelationships,\n isSystemResource: true,\n systemAccessPolicy: systemWrites,\n retentionPolicy: RETAIN,\n retentionBinding: KEPT_AS_ACCESS_EVIDENCE,\n dataSubjectPolicy: { kind: ResourceDataSubjectKind.NO_PRINCIPAL },\n coreOperations: CORE_OPERATIONS,\n operationsConfiguration: {\n [CoreResourceOperation.UPDATE_MANY]: {\n variants: [{\n variantType: ResourceOperationVariantType.INTERNAL_CALL,\n isDefault: true,\n roles: [CORE_APP_ROLES.APP_ADMIN_SUPER_ADMIN],\n riskLevel: ResourceOperationRiskLevel.CRITICAL,\n }],\n },\n [CoreResourceOperation.DELETE]: {\n variants: [{\n variantType: ResourceOperationVariantType.INTERNAL_CALL,\n isDefault: true,\n roles: [],\n riskLevel: ResourceOperationRiskLevel.CRITICAL,\n }],\n },\n [CoreResourceOperation.CREATE]: {\n variants: [{\n variantType: ResourceOperationVariantType.INTERNAL_CALL,\n isDefault: true,\n roles: [CORE_APP_ROLES.APP_ADMIN_SUPER_ADMIN],\n riskLevel: ResourceOperationRiskLevel.HIGH,\n }],\n },\n [CoreResourceOperation.UPDATE]: {\n variants: [{\n variantType: ResourceOperationVariantType.INTERNAL_CALL,\n isDefault: true,\n roles: [CORE_APP_ROLES.APP_ADMIN_SUPER_ADMIN],\n riskLevel: ResourceOperationRiskLevel.HIGH,\n }],\n },\n [CoreResourceOperation.READ]: {\n variants: [{ variantType: ResourceOperationVariantType.API_CALL, isDefault: true, roles: [CORE_ORG_ROLES.ORG_ADMIN], riskLevel: ResourceOperationRiskLevel.LOW }],\n },\n [CoreResourceOperation.LIST]: {\n variants: [{ variantType: ResourceOperationVariantType.API_CALL, isDefault: true, roles: [CORE_ORG_ROLES.ORG_ADMIN], riskLevel: ResourceOperationRiskLevel.LOW }],\n },\n [CoreResourceOperation.COUNT]: {\n variants: [{ variantType: ResourceOperationVariantType.API_CALL, isDefault: true, roles: [CORE_ORG_ROLES.ORG_ADMIN], riskLevel: ResourceOperationRiskLevel.LOW }],\n },\n\n /**\n * The client proposes a relationship to a firm. The proposal IS the client owner's consent, so the\n * firm's acceptance activates it — ORG_OWNER plus step-up, like the acceptance of a firm's proposal.\n *\n * assurance-control: WILDO.PRIVACY.THIRD_PARTY_PROCESSING — a third party's access to the tenant\n * begins only with the tenant owner's declared consent.\n */\n [ServiceProviderRelationships_Operations.PROPOSE]: {\n variants: [{\n variantType: ResourceOperationVariantType.API_CALL,\n isDefault: true,\n roles: [CORE_ORG_ROLES.ORG_OWNER],\n riskLevel: ResourceOperationRiskLevel.HIGH,\n resourceOperationLike: CoreResourceOperation.CREATE,\n requiresStepUpAuthentication: true,\n requestDto: z.object({\n providerOrganizationId: z.string().min(1),\n purpose: z.string().min(1).max(1000),\n ...relationshipScopeDto,\n ...expertAdmissionPolicyDto,\n }),\n }],\n },\n\n /**\n * The client owner accepts a FIRM's proposal. The implementation refuses a relationship the client itself proposed.\n * The owner may choose here whether each expert must be approved (#1612); absent keeps the proposal's default.\n */\n [ServiceProviderRelationships_Operations.ACCEPT]: {\n variants: [{\n variantType: ResourceOperationVariantType.API_CALL,\n isDefault: true,\n roles: [CORE_ORG_ROLES.ORG_OWNER],\n riskLevel: ResourceOperationRiskLevel.HIGH,\n resourceOperationLike: CoreResourceOperation.UPDATE,\n requiresStepUpAuthentication: true,\n requestDto: decisionReasonDto.extend(expertAdmissionPolicyDto),\n enabledCondition: ({ currentObject }) => currentObject.status === ServiceProviderRelationshipStatus.PROPOSED,\n }],\n },\n\n [ServiceProviderRelationships_Operations.DECLINE]: {\n variants: [{\n variantType: ResourceOperationVariantType.API_CALL,\n isDefault: true,\n roles: [CORE_ORG_ROLES.ORG_ADMIN],\n riskLevel: ResourceOperationRiskLevel.HIGH,\n resourceOperationLike: CoreResourceOperation.UPDATE,\n requestDto: decisionReasonDto,\n enabledCondition: ({ currentObject }) => currentObject.status === ServiceProviderRelationshipStatus.PROPOSED,\n }],\n },\n\n [ServiceProviderRelationships_Operations.SUSPEND]: {\n variants: [{\n variantType: ResourceOperationVariantType.API_CALL,\n isDefault: true,\n roles: [CORE_ORG_ROLES.ORG_ADMIN],\n riskLevel: ResourceOperationRiskLevel.HIGH,\n resourceOperationLike: CoreResourceOperation.UPDATE,\n requestDto: decisionReasonDto,\n enabledCondition: ({ currentObject }) => currentObject.status === ServiceProviderRelationshipStatus.ACTIVE,\n }],\n },\n\n [ServiceProviderRelationships_Operations.RESUME]: {\n variants: [{\n variantType: ResourceOperationVariantType.API_CALL,\n isDefault: true,\n roles: [CORE_ORG_ROLES.ORG_ADMIN],\n riskLevel: ResourceOperationRiskLevel.HIGH,\n resourceOperationLike: CoreResourceOperation.UPDATE,\n requestDto: decisionReasonDto,\n enabledCondition: ({ currentObject }) => currentObject.status === ServiceProviderRelationshipStatus.SUSPENDED,\n }],\n },\n\n /** The client ends a live relationship — its own proposal included. Takes effect on the next request. */\n [ServiceProviderRelationships_Operations.TERMINATE]: {\n variants: [{\n variantType: ResourceOperationVariantType.API_CALL,\n isDefault: true,\n roles: [CORE_ORG_ROLES.ORG_ADMIN],\n riskLevel: ResourceOperationRiskLevel.HIGH,\n resourceOperationLike: CoreResourceOperation.UPDATE,\n requestDto: decisionReasonDto,\n enabledCondition: ({ currentObject }) => LIVE(currentObject.status),\n }],\n },\n\n /** Role, units, term. Only the client, only its owner, with step-up — the firm cannot widen what the client granted. */\n [ServiceProviderRelationships_Operations.AMEND_SCOPE]: {\n variants: [{\n variantType: ResourceOperationVariantType.API_CALL,\n isDefault: true,\n roles: [CORE_ORG_ROLES.ORG_OWNER],\n riskLevel: ResourceOperationRiskLevel.HIGH,\n resourceOperationLike: CoreResourceOperation.UPDATE,\n requiresStepUpAuthentication: true,\n requestDto: z.object({\n ...relationshipScopeDto,\n /** Explicitly clear a term (open-ended) — distinct from \"leave it as it is\". `endsAt: null` means the same. */\n clearEndsAt: z.boolean().optional()\n .describe('`true` removes the end date, so the relationship runs until someone ends it. Sending `endsAt: null` does the same. Omitted or `false`: the end date is set by `endsAt`, or left as it is.'),\n /** Explicitly widen to organization-wide — distinct from \"leave the units as they are\". */\n clearOrganizationUnitIds: z.boolean().optional()\n .describe('`true` removes the unit restriction, so the firm\\'s experts reach the whole organization. Omitted or `false`: the units are set by `organizationUnitIds`, or left as they are.'),\n }),\n enabledCondition: ({ currentObject }) =>\n currentObject.status === ServiceProviderRelationshipStatus.ACTIVE\n || currentObject.status === ServiceProviderRelationshipStatus.SUSPENDED,\n }],\n },\n\n /**\n * Admit a firm's client, or change what an admitted one may do. `autonomousAgentRefs` is the client's\n * choice of the firm's autonomous agents that may run here (#1611) and REPLACES the client's previous\n * choice; omitted means none. Re-admitting an admitted client with a new list is how that choice changes.\n */\n [ServiceProviderRelationships_Operations.ADMIT_MACHINE_CLIENT]: {\n variants: [{\n variantType: ResourceOperationVariantType.API_CALL,\n isDefault: true,\n roles: [CORE_ORG_ROLES.ORG_ADMIN],\n riskLevel: ResourceOperationRiskLevel.HIGH,\n resourceOperationLike: CoreResourceOperation.UPDATE,\n requestDto: z.object({\n oauthClientId: z.string().min(1)\n .describe('The firm\\'s machine client to admit: an active OAuth client owned by the firm\\'s organization. Any other client is refused.'),\n autonomousAgentRefs: z.array(AutonomousAgentRefSchema).max(AUTONOMOUS_AGENT_REFS_PER_CLIENT_MAX).optional()\n .describe(\"The firm's autonomous agents this client may run in your organization, under this relationship's role and on your organization's budget. Replaces any earlier choice; omit it to allow none.\"),\n }),\n enabledCondition: ({ currentObject }) => LIVE(currentObject.status),\n }],\n },\n\n [ServiceProviderRelationships_Operations.REMOVE_MACHINE_CLIENT]: {\n variants: [{\n variantType: ResourceOperationVariantType.API_CALL,\n isDefault: true,\n roles: [CORE_ORG_ROLES.ORG_ADMIN],\n riskLevel: ResourceOperationRiskLevel.HIGH,\n resourceOperationLike: CoreResourceOperation.UPDATE,\n requestDto: z.object({\n oauthClientId: z.string().min(1)\n .describe('The firm\\'s machine client to remove. It can no longer act in your organization, and your choice of its autonomous agents is dropped.'),\n }),\n }],\n },\n\n /**\n * Change whether each assigned expert waits for this organization's approval (#1612). A client administrator's\n * verb, on a live relationship; not retroactive — experts already admitted keep their membership, and pending\n * approvals stay pending. The firm has no counterpart verb.\n */\n [ServiceProviderRelationships_Operations.SET_EXPERT_ADMISSION_POLICY]: {\n variants: [{\n variantType: ResourceOperationVariantType.API_CALL,\n isDefault: true,\n roles: [CORE_ORG_ROLES.ORG_ADMIN],\n riskLevel: ResourceOperationRiskLevel.HIGH,\n resourceOperationLike: CoreResourceOperation.UPDATE,\n requestDto: z.object({ expertAdmissionPolicy: z.enum(ServiceProviderExpertAdmissionPolicy) }),\n enabledCondition: ({ currentObject }) => LIVE(currentObject.status),\n }],\n },\n\n /**\n * Decide whether the firm's own identity provider's MFA counts in this organization (#1633). The owner's verb,\n * with step-up: trusting it lets a proof made elsewhere satisfy this organization's authentication policy for\n * the firm's experts. The organization type's minimum strength still applies either way.\n */\n [ServiceProviderRelationships_Operations.SET_PROVIDER_MFA_TRUST]: {\n variants: [{\n variantType: ResourceOperationVariantType.API_CALL,\n isDefault: true,\n roles: [CORE_ORG_ROLES.ORG_OWNER],\n riskLevel: ResourceOperationRiskLevel.HIGH,\n resourceOperationLike: CoreResourceOperation.UPDATE,\n requiresStepUpAuthentication: true,\n requestDto: z.object({ providerMfaTrust: z.enum(ServiceProviderMfaTrust) }),\n enabledCondition: ({ currentObject }) => LIVE(currentObject.status),\n }],\n },\n\n /**\n * Decide how much the firm's expert-activity feed may say about work done here (#1632). A client administrator's\n * verb; it takes effect on the expert's next action. It can only narrow what the firm learns — at every level the\n * feed carries metadata, never this organization's content.\n */\n [ServiceProviderRelationships_Operations.SET_ACTIVITY_FEED_DISCLOSURE]: {\n variants: [{\n variantType: ResourceOperationVariantType.API_CALL,\n isDefault: true,\n roles: [CORE_ORG_ROLES.ORG_ADMIN],\n riskLevel: ResourceOperationRiskLevel.HIGH,\n resourceOperationLike: CoreResourceOperation.UPDATE,\n requestDto: z.object({ activityFeedDisclosure: z.enum(ServiceProviderActivityFeedDisclosure) }),\n enabledCondition: ({ currentObject }) => LIVE(currentObject.status),\n }],\n },\n\n /**\n * ACTIVE or SUSPENDED → EXPIRED past `endsAt`, dispatched by the credential-expiry sweep only.\n * Bookkeeping: admission already stopped at `endsAt`. Empty request contract by design — the\n * implementation owns the transition, and an operation without a `requestDto` would advertise the\n * resource's whole update contract.\n */\n [ServiceProviderRelationships_Operations.EXPIRE]: {\n variants: [{\n variantType: ResourceOperationVariantType.INTERNAL_CALL,\n isDefault: true,\n roles: [CORE_APP_ROLES.APP_ADMIN_SUPER_ADMIN],\n riskLevel: ResourceOperationRiskLevel.LOW,\n resourceOperationLike: CoreResourceOperation.UPDATE,\n requestDto: z.object({}),\n }],\n },\n },\n });\n\ntype EngagementCoreOperations = RelationshipCoreOperations;\n\nexport const serviceEngagementsResourceConfiguration_InitializationFactory = (resourcesRelationships: ResourceRelationship[]) =>\n createResourceConfiguration_Initialization<\n typeof ServiceEngagements_Operations,\n EngagementCoreOperations,\n typeof ServiceEngagementSchema\n >({\n mainSchema: ServiceEngagementSchema,\n resourceIdentifier: CoreResourceType.SERVICE_ENGAGEMENTS,\n resourceFieldIdentifier: coreResourceShared_FieldIdentifier[CoreResourceType.SERVICE_ENGAGEMENTS],\n resourceRelationships: resourcesRelationships,\n isSystemResource: true,\n systemAccessPolicy: systemWrites,\n retentionPolicy: RETAIN,\n retentionBinding: KEPT_AS_ACCESS_EVIDENCE,\n dataSubjectPolicy: { kind: ResourceDataSubjectKind.NO_PRINCIPAL },\n coreOperations: CORE_OPERATIONS,\n operationsConfiguration: {\n [CoreResourceOperation.UPDATE_MANY]: {\n variants: [{\n variantType: ResourceOperationVariantType.INTERNAL_CALL,\n isDefault: true,\n roles: [CORE_APP_ROLES.APP_ADMIN_SUPER_ADMIN],\n riskLevel: ResourceOperationRiskLevel.CRITICAL,\n }],\n },\n [CoreResourceOperation.DELETE]: {\n variants: [{\n variantType: ResourceOperationVariantType.INTERNAL_CALL,\n isDefault: true,\n roles: [],\n riskLevel: ResourceOperationRiskLevel.CRITICAL,\n }],\n },\n [CoreResourceOperation.CREATE]: {\n variants: [{\n variantType: ResourceOperationVariantType.INTERNAL_CALL,\n isDefault: true,\n roles: [CORE_APP_ROLES.APP_ADMIN_SUPER_ADMIN],\n riskLevel: ResourceOperationRiskLevel.HIGH,\n }],\n },\n [CoreResourceOperation.UPDATE]: {\n variants: [{\n variantType: ResourceOperationVariantType.INTERNAL_CALL,\n isDefault: true,\n roles: [CORE_APP_ROLES.APP_ADMIN_SUPER_ADMIN],\n riskLevel: ResourceOperationRiskLevel.HIGH,\n }],\n },\n [CoreResourceOperation.READ]: {\n variants: [{ variantType: ResourceOperationVariantType.API_CALL, isDefault: true, roles: [CORE_ORG_ROLES.ORG_ADMIN], riskLevel: ResourceOperationRiskLevel.LOW }],\n },\n [CoreResourceOperation.LIST]: {\n variants: [{ variantType: ResourceOperationVariantType.API_CALL, isDefault: true, roles: [CORE_ORG_ROLES.ORG_ADMIN], riskLevel: ResourceOperationRiskLevel.LOW }],\n },\n [CoreResourceOperation.COUNT]: {\n variants: [{ variantType: ResourceOperationVariantType.API_CALL, isDefault: true, roles: [CORE_ORG_ROLES.ORG_ADMIN], riskLevel: ResourceOperationRiskLevel.LOW }],\n },\n\n /** The firm proposes a relationship to a client. Nothing is conferred until the client owner accepts. */\n [ServiceEngagements_Operations.PROPOSE]: {\n variants: [{\n variantType: ResourceOperationVariantType.API_CALL,\n isDefault: true,\n roles: [CORE_ORG_ROLES.ORG_ADMIN],\n riskLevel: ResourceOperationRiskLevel.HIGH,\n resourceOperationLike: CoreResourceOperation.CREATE,\n requestDto: z.object({\n clientOrganizationId: z.string().min(1),\n purpose: z.string().min(1).max(1000),\n ...relationshipScopeDto,\n // Described HERE rather than on `relationshipScopeDto`: the relationship's own verbs take their\n // description from the relationship's field specification, and a `.describe()` on the shared\n // DTO would override it. The engagement has no such field, so its proposal needed its own words.\n organizationUnitIds: relationshipScopeDto.organizationUnitIds\n .describe('The client organization\\'s units your experts would be confined to, by their ids in the client\\'s tenant. Absent or empty: the whole client organization. The client sees this scope when deciding, and may change it later.'),\n }),\n }],\n },\n\n /** The firm accepts a CLIENT's proposal — the client owner's consent is the proposal itself. */\n [ServiceEngagements_Operations.ACCEPT]: {\n variants: [{\n variantType: ResourceOperationVariantType.API_CALL,\n isDefault: true,\n roles: [CORE_ORG_ROLES.ORG_ADMIN],\n riskLevel: ResourceOperationRiskLevel.HIGH,\n resourceOperationLike: CoreResourceOperation.UPDATE,\n requestDto: decisionReasonDto,\n enabledCondition: ({ currentObject }) => currentObject.status === ServiceProviderRelationshipStatus.PROPOSED,\n }],\n },\n\n /** The firm ends a live relationship, or withdraws its own proposal. */\n [ServiceEngagements_Operations.WITHDRAW]: {\n variants: [{\n variantType: ResourceOperationVariantType.API_CALL,\n isDefault: true,\n roles: [CORE_ORG_ROLES.ORG_ADMIN],\n riskLevel: ResourceOperationRiskLevel.HIGH,\n resourceOperationLike: CoreResourceOperation.UPDATE,\n requestDto: decisionReasonDto,\n enabledCondition: ({ currentObject }) => LIVE(currentObject.status),\n }],\n },\n },\n });\n\ntype AssignmentCoreOperations = RelationshipCoreOperations;\n\nexport const serviceEngagementAssignmentsResourceConfiguration_InitializationFactory = (resourcesRelationships: ResourceRelationship[]) =>\n createResourceConfiguration_Initialization<\n typeof ServiceEngagementAssignments_Operations,\n AssignmentCoreOperations,\n typeof ServiceEngagementAssignmentSchema\n >({\n mainSchema: ServiceEngagementAssignmentSchema,\n resourceIdentifier: CoreResourceType.SERVICE_ENGAGEMENT_ASSIGNMENTS,\n resourceFieldIdentifier: coreResourceShared_FieldIdentifier[CoreResourceType.SERVICE_ENGAGEMENT_ASSIGNMENTS],\n resourceRelationships: resourcesRelationships,\n isSystemResource: true,\n systemAccessPolicy: {\n ...systemWrites,\n /**\n * `userId` is a foreign key to USERS, so these rows are on a person's subject-export graph. ALLOWED:\n * which clients a person was assigned to serve is a fact about their own work, not a monitoring\n * record about them, and it names nobody else.\n */\n exportSubject: ResourceSystemAccessMode.ALLOWED,\n },\n /**\n * RETAIN_ONLY: an assignment holds no personal text of its own — ids, a status and timestamps — so\n * there is nothing an erasure could scrub, and claiming RETAIN_AND_IMPERSONALIZE would describe a\n * scrub that never happens. Kept whole as evidence of who served which client, when.\n */\n retentionPolicy: { mode: ErasureRetentionMode.RETAIN_ONLY },\n retentionBinding: KEPT_AS_ACCESS_EVIDENCE,\n dataSubjectPolicy: { kind: ResourceDataSubjectKind.NO_PRINCIPAL },\n coreOperations: CORE_OPERATIONS,\n operationsConfiguration: {\n [CoreResourceOperation.UPDATE_MANY]: {\n variants: [{\n variantType: ResourceOperationVariantType.INTERNAL_CALL,\n isDefault: true,\n roles: [CORE_APP_ROLES.APP_ADMIN_SUPER_ADMIN],\n riskLevel: ResourceOperationRiskLevel.CRITICAL,\n }],\n },\n [CoreResourceOperation.DELETE]: {\n variants: [{\n variantType: ResourceOperationVariantType.INTERNAL_CALL,\n isDefault: true,\n roles: [],\n riskLevel: ResourceOperationRiskLevel.CRITICAL,\n }],\n },\n [CoreResourceOperation.CREATE]: {\n variants: [{\n variantType: ResourceOperationVariantType.INTERNAL_CALL,\n isDefault: true,\n roles: [CORE_APP_ROLES.APP_ADMIN_SUPER_ADMIN],\n riskLevel: ResourceOperationRiskLevel.HIGH,\n }],\n },\n [CoreResourceOperation.UPDATE]: {\n variants: [{\n variantType: ResourceOperationVariantType.INTERNAL_CALL,\n isDefault: true,\n roles: [CORE_APP_ROLES.APP_ADMIN_SUPER_ADMIN],\n riskLevel: ResourceOperationRiskLevel.HIGH,\n }],\n },\n [CoreResourceOperation.READ]: {\n variants: [{ variantType: ResourceOperationVariantType.API_CALL, isDefault: true, roles: [CORE_ORG_ROLES.ORG_ADMIN], riskLevel: ResourceOperationRiskLevel.LOW }],\n },\n [CoreResourceOperation.LIST]: {\n variants: [{ variantType: ResourceOperationVariantType.API_CALL, isDefault: true, roles: [CORE_ORG_ROLES.ORG_ADMIN], riskLevel: ResourceOperationRiskLevel.LOW }],\n },\n [CoreResourceOperation.COUNT]: {\n variants: [{ variantType: ResourceOperationVariantType.API_CALL, isDefault: true, roles: [CORE_ORG_ROLES.ORG_ADMIN], riskLevel: ResourceOperationRiskLevel.LOW }],\n },\n\n /** The firm designates one of its ACTIVE members to serve an ACTIVE engagement. */\n [ServiceEngagementAssignments_Operations.ASSIGN]: {\n variants: [{\n variantType: ResourceOperationVariantType.API_CALL,\n isDefault: true,\n roles: [CORE_ORG_ROLES.ORG_ADMIN],\n riskLevel: ResourceOperationRiskLevel.HIGH,\n resourceOperationLike: CoreResourceOperation.CREATE,\n requestDto: z.object({\n serviceEngagementId: z.string().min(1),\n userId: z.string().min(1),\n }),\n }],\n },\n\n /** Ends an ACTIVE assignment, or withdraws one still waiting for the client's approval (#1612). */\n [ServiceEngagementAssignments_Operations.UNASSIGN]: {\n variants: [{\n variantType: ResourceOperationVariantType.API_CALL,\n isDefault: true,\n roles: [CORE_ORG_ROLES.ORG_ADMIN],\n riskLevel: ResourceOperationRiskLevel.HIGH,\n resourceOperationLike: CoreResourceOperation.UPDATE,\n requestDto: z.object({}),\n enabledCondition: ({ currentObject }) => currentObject.status === ServiceEngagementAssignmentStatus.ACTIVE\n || currentObject.status === ServiceEngagementAssignmentStatus.PENDING_CLIENT_APPROVAL,\n }],\n },\n\n /**\n * Apply the client's answer to a per-expert approval (#1612). INTERNAL_CALL: it registers no route, and is\n * reached only from the human-decision answer path after that path authorized the answerer as one of the\n * client's administrators. The input names the decision it settles; the write matches on it.\n */\n [ServiceEngagementAssignments_Operations.SETTLE_CLIENT_APPROVAL]: {\n variants: [{\n variantType: ResourceOperationVariantType.INTERNAL_CALL,\n isDefault: true,\n roles: [CORE_APP_ROLES.APP_ADMIN_SUPER_ADMIN],\n riskLevel: ResourceOperationRiskLevel.HIGH,\n resourceOperationLike: CoreResourceOperation.UPDATE,\n requestDto: ServiceEngagementAssignmentSettleClientApprovalDtoSchema,\n }],\n },\n },\n });\n"]}
1
+ {"version":3,"file":"service-provider-relationships.shared.resources-config.schemas.js","sourceRoot":"","sources":["../../../../src/organizations/service-provider-relationships.shared.resources-config.schemas.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EACL,iCAAiC,EACjC,wDAAwD,EACxD,iCAAiC,EACjC,oCAAoC,EACpC,uCAAuC,EACvC,uBAAuB,EACvB,6BAA6B,EAC7B,iCAAiC,EACjC,iCAAiC,EACjC,uCAAuC,GACxC,MAAM,iDAAiD,CAAC;AACzD,OAAO,EAAE,qBAAqB,EAAE,gBAAgB,EAAE,kCAA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EAAE,0BAA0B,CAAC,IAAI;oBAC1C,qBAAqB,EAAE,qBAAqB,CAAC,MAAM;oBACnD,UAAU,EAAE,CAAC,CAAC,MAAM,CAAC;wBACnB,mBAAmB,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;wBACtC,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;qBAC1B,CAAC;iBACH,CAAC;SACH;QAED,mGAAmG;QACnG,CAAC,uCAAuC,CAAC,QAAQ,CAAC,EAAE;YAClD,QAAQ,EAAE,CAAC;oBACT,WAAW,EAAE,4BAA4B,CAAC,QAAQ;oBAClD,SAAS,EAAE,IAAI;oBACf,KAAK,EAAE,CAAC,cAAc,CAAC,SAAS,CAAC;oBACjC,SAAS,EAAE,0BAA0B,CAAC,IAAI;oBAC1C,qBAAqB,EAAE,qBAAqB,CAAC,MAAM;oBACnD,UAAU,EAAE,CAAC,CAAC,MAAM,CAAC,EAAE,CAAC;oBACxB,gBAAgB,EAAE,CAAC,EAAE,aAAa,EAAE,EAAE,EAAE,CAAC,aAAa,CAAC,MAAM,KAAK,iCAAiC,CAAC,MAAM;2BACrG,aAAa,CAAC,MAAM,KAAK,iCAAiC,CAAC,uBAAuB;iBACxF,CAAC;SACH;QAED;;;;WAIG;QACH,CAAC,uCAAuC,CAAC,sBAAsB,CAAC,EAAE;YAChE,QAAQ,EAAE,CAAC;oBACT,WAAW,EAAE,4BAA4B,CAAC,aAAa;oBACvD,SAAS,EAAE,IAAI;oBACf,KAAK,EAAE,CAAC,cAAc,CAAC,qBAAqB,CAAC;oBAC7C,SAAS,EAAE,0BAA0B,CAAC,IAAI;oBAC1C,qBAAqB,EAAE,qBAAqB,CAAC,MAAM;oBACnD,UAAU,EAAE,wDAAwD;iBACrE,CAAC;SACH;KACF;CACF,CAAC,CAAC","sourcesContent":["/**\n * Service-provider relationships — resource configurations for the three resources (#1597).\n *\n * The asymmetry is the design: the CLIENT's verbs are on the relationship (client scope), the FIRM's\n * verbs are on its engagement mirror (firm scope), and each side's counterpart row is written by the\n * system inside the same transaction. No verb here declares `admitsCrossTenantPlatformAdministration`:\n * nobody reaches into the other tenant through a request.\n *\n * Every lifecycle verb is HIGH risk, and the two that CONFER — the client accepting a firm's proposal and\n * the client widening a relationship's scope — demand the client ORG_OWNER plus step-up, because they\n * hand people outside the organization a membership inside it.\n *\n * See `service-provider-relationships.shared.schemas.ts` for the model.\n */\n\nimport { z } from 'zod';\nimport {\n ServiceEngagementAssignmentSchema,\n ServiceEngagementAssignmentSettleClientApprovalDtoSchema,\n ServiceEngagementAssignmentStatus,\n ServiceProviderExpertAdmissionPolicy,\n ServiceEngagementAssignments_Operations,\n ServiceEngagementSchema,\n ServiceEngagements_Operations,\n ServiceProviderRelationshipSchema,\n ServiceProviderRelationshipStatus,\n ServiceProviderRelationships_Operations,\n} from './service-provider-relationships.shared.schemas';\nimport { CoreResourceOperation, CoreResourceType, coreResourceShared_FieldIdentifier } from '../resources/resources.shared.core.definitions';\nimport { ResourceOperationRiskLevel, ResourceOperationVariantType, type ResourceRelationship } from '../resources/resources.shared.schemas';\nimport { createResourceConfiguration_Initialization } from '../resources/resources-config.shared.factory';\nimport { ResourceSystemAccessMode } from '../resources/resources-config.shared.schemas';\nimport { CORE_APP_ROLES, CORE_ORG_ROLES } from '../security/authorizations/roles.shared.schemas';\nimport { ErasureRetentionMode, ResourceDataSubjectKind } from '../compliance/privacy/impersonalization.shared.schemas';\nimport { DataRetentionClass, RetentionStartPoint } from '../compliance/privacy/retention-schedule.shared.schemas';\nimport { AUTONOMOUS_AGENT_REFS_PER_CLIENT_MAX, AutonomousAgentRefSchema } from '../flows-actors/autonomous-agents.shared.schemas';\nimport { ServiceProviderActivityFeedDisclosure, ServiceProviderMfaTrust } from './service-provider-client-controls.shared.schemas';\n\n/** A reason one side gives when refusing or ending. Optional everywhere; recorded, erasable. */\nconst decisionReasonDto = z.object({ decisionReason: z.string().max(1000).optional() });\n\n/** The scope a relationship is proposed or amended with. The client decides it; the firm may only propose it. */\nconst relationshipScopeDto = {\n /** One of the provider type's `servesAsProvider.providerRoles`. Absent ⇒ its `defaultProviderRole`. */\n role: z.string().min(1).optional(),\n /** Client organization units. Absent or empty ⇒ organization-wide. */\n organizationUnitIds: z.array(z.string().min(1)).max(100).optional(),\n /**\n * When the relationship stops conferring. `null` means \"no term\" — the framework's merge-patch UPDATE\n * reading — and is what `amendScope` writes when it clears one.\n *\n * `.nullish()`, never `.optional()`: `z.coerce.date().optional()` does not reject `null`, it COERCES it,\n * and `new Date(null)` is 1970-01-01. The operation's own prefix output is parsed by this DTO, so a\n * cleared term was stored as a term that ended in 1970 — which the live filter reads as over, ending\n * the relationship the client meant to make open-ended.\n */\n endsAt: z.coerce.date().nullish(),\n};\n\n/**\n * The client's choice of how the firm's experts are admitted (#1612). Only ever part of a CLIENT verb's contract —\n * the firm's verbs do not declare it, so a firm-supplied value is stripped before any implementation sees it.\n */\nconst expertAdmissionPolicyDto = {\n expertAdmissionPolicy: z.enum(ServiceProviderExpertAdmissionPolicy).optional()\n .describe('Whether each expert the firm assigns must first be approved by your organization\\'s administrators. Absent: your organization type\\'s default, else every assigned expert is admitted.'),\n};\n\nconst LIVE = (status: unknown) =>\n status === ServiceProviderRelationshipStatus.PROPOSED\n || status === ServiceProviderRelationshipStatus.ACTIVE\n || status === ServiceProviderRelationshipStatus.SUSPENDED;\n\n/**\n * Route-less plumbing shared by all three resources.\n *\n * - `UPDATE_MANY` — the retention writer's verb (`retentionPolicy` requires READ + LIST + UPDATE_MANY).\n * - `DELETE` — the organization purge cascade's verb ONLY. No client can delete a relationship: the\n * terminal statuses are how one ends, and erasing the record would rewrite who could reach a tenant.\n * - `CREATE` / `UPDATE` — the system door the verbs write COUNTERPART rows through (`createAsSystem` /\n * `updateAsSystem` resolve the resource's default CREATE / UPDATE). INTERNAL_CALL registers no route.\n */\n/* (inlined into each configuration below — contextual typing needs the literal in place) */\n\n\n/**\n * The counterpart write door is a system door, so the policy says so — and says nothing else.\n *\n * `read`/`list` are ALLOWED because the execution-context builder reads relationships and assignments on\n * a system context to decide a caller's authority (the caller is, by construction, not yet authorized).\n */\nconst systemWrites = {\n read: ResourceSystemAccessMode.ALLOWED,\n list: ResourceSystemAccessMode.ALLOWED,\n create: ResourceSystemAccessMode.ALLOWED,\n update: ResourceSystemAccessMode.ALLOWED,\n updateMany: ResourceSystemAccessMode.ALLOWED,\n};\n\ntype RelationshipCoreOperations =\n | CoreResourceOperation.READ\n | CoreResourceOperation.LIST\n | CoreResourceOperation.COUNT\n | CoreResourceOperation.CREATE\n | CoreResourceOperation.UPDATE\n | CoreResourceOperation.UPDATE_MANY\n | CoreResourceOperation.DELETE;\n\nconst CORE_OPERATIONS: RelationshipCoreOperations[] = [\n CoreResourceOperation.READ,\n CoreResourceOperation.LIST,\n CoreResourceOperation.COUNT,\n CoreResourceOperation.CREATE,\n CoreResourceOperation.UPDATE,\n CoreResourceOperation.UPDATE_MANY,\n CoreResourceOperation.DELETE,\n];\n\n/** Retained on erasure: who could reach which tenant, when and under what scope is the record; the prose is scrubbed. */\nconst RETAIN = { mode: ErasureRetentionMode.RETAIN_AND_IMPERSONALIZE };\n\n/**\n * How long each of the three records lives (#1613): the AUDIT_LOGS class, from the moment the record ENDS.\n *\n * They are the evidence of who from outside could reach a tenant, and when — the question an access\n * review or an incident asks years later — so they are kept for the audit trail's own period rather than\n * the ordinary resource-data one. While a relationship or an assignment is live its `endedAt` is null and\n * the row never expires; the clock starts only when it ends.\n */\nconst KEPT_AS_ACCESS_EVIDENCE = {\n retentionClass: DataRetentionClass.AUDIT_LOGS,\n startPoint: RetentionStartPoint.CLOSURE_EVENT,\n closureFieldName: 'endedAt',\n};\n\nexport const serviceProviderRelationshipsResourceConfiguration_InitializationFactory = (resourcesRelationships: ResourceRelationship[]) =>\n createResourceConfiguration_Initialization<\n typeof ServiceProviderRelationships_Operations,\n RelationshipCoreOperations,\n typeof ServiceProviderRelationshipSchema\n >({\n mainSchema: ServiceProviderRelationshipSchema,\n resourceIdentifier: CoreResourceType.SERVICE_PROVIDER_RELATIONSHIPS,\n resourceFieldIdentifier: coreResourceShared_FieldIdentifier[CoreResourceType.SERVICE_PROVIDER_RELATIONSHIPS],\n resourceRelationships: resourcesRelationships,\n isSystemResource: true,\n systemAccessPolicy: systemWrites,\n retentionPolicy: RETAIN,\n retentionBinding: KEPT_AS_ACCESS_EVIDENCE,\n dataSubjectPolicy: { kind: ResourceDataSubjectKind.NO_PRINCIPAL },\n coreOperations: CORE_OPERATIONS,\n operationsConfiguration: {\n [CoreResourceOperation.UPDATE_MANY]: {\n variants: [{\n variantType: ResourceOperationVariantType.INTERNAL_CALL,\n isDefault: true,\n roles: [CORE_APP_ROLES.APP_ADMIN_SUPER_ADMIN],\n riskLevel: ResourceOperationRiskLevel.CRITICAL,\n }],\n },\n [CoreResourceOperation.DELETE]: {\n variants: [{\n variantType: ResourceOperationVariantType.INTERNAL_CALL,\n isDefault: true,\n roles: [],\n riskLevel: ResourceOperationRiskLevel.CRITICAL,\n }],\n },\n [CoreResourceOperation.CREATE]: {\n variants: [{\n variantType: ResourceOperationVariantType.INTERNAL_CALL,\n isDefault: true,\n roles: [CORE_APP_ROLES.APP_ADMIN_SUPER_ADMIN],\n riskLevel: ResourceOperationRiskLevel.HIGH,\n }],\n },\n [CoreResourceOperation.UPDATE]: {\n variants: [{\n variantType: ResourceOperationVariantType.INTERNAL_CALL,\n isDefault: true,\n roles: [CORE_APP_ROLES.APP_ADMIN_SUPER_ADMIN],\n riskLevel: ResourceOperationRiskLevel.HIGH,\n }],\n },\n [CoreResourceOperation.READ]: {\n variants: [{ variantType: ResourceOperationVariantType.API_CALL, isDefault: true, roles: [CORE_ORG_ROLES.ORG_ADMIN], riskLevel: ResourceOperationRiskLevel.LOW }],\n },\n [CoreResourceOperation.LIST]: {\n variants: [{ variantType: ResourceOperationVariantType.API_CALL, isDefault: true, roles: [CORE_ORG_ROLES.ORG_ADMIN], riskLevel: ResourceOperationRiskLevel.LOW }],\n },\n [CoreResourceOperation.COUNT]: {\n variants: [{ variantType: ResourceOperationVariantType.API_CALL, isDefault: true, roles: [CORE_ORG_ROLES.ORG_ADMIN], riskLevel: ResourceOperationRiskLevel.LOW }],\n },\n\n /**\n * The client proposes a relationship to a firm. The proposal IS the client owner's consent, so the\n * firm's acceptance activates it — ORG_OWNER plus step-up, like the acceptance of a firm's proposal.\n *\n * assurance-control: WILDO.PRIVACY.THIRD_PARTY_PROCESSING — a third party's access to the tenant\n * begins only with the tenant owner's declared consent.\n */\n [ServiceProviderRelationships_Operations.PROPOSE]: {\n variants: [{\n variantType: ResourceOperationVariantType.API_CALL,\n isDefault: true,\n roles: [CORE_ORG_ROLES.ORG_OWNER],\n riskLevel: ResourceOperationRiskLevel.HIGH,\n resourceOperationLike: CoreResourceOperation.CREATE,\n requiresStepUpAuthentication: true,\n requestDto: z.object({\n providerOrganizationId: z.string().min(1),\n purpose: z.string().min(1).max(1000),\n ...relationshipScopeDto,\n ...expertAdmissionPolicyDto,\n }),\n }],\n },\n\n /**\n * The client owner accepts a FIRM's proposal. The implementation refuses a relationship the client itself proposed.\n * The owner may choose here whether each expert must be approved (#1612); absent keeps the proposal's default.\n */\n [ServiceProviderRelationships_Operations.ACCEPT]: {\n variants: [{\n variantType: ResourceOperationVariantType.API_CALL,\n isDefault: true,\n roles: [CORE_ORG_ROLES.ORG_OWNER],\n riskLevel: ResourceOperationRiskLevel.HIGH,\n resourceOperationLike: CoreResourceOperation.UPDATE,\n requiresStepUpAuthentication: true,\n requestDto: decisionReasonDto.extend(expertAdmissionPolicyDto),\n enabledCondition: ({ currentObject }) => currentObject.status === ServiceProviderRelationshipStatus.PROPOSED,\n }],\n },\n\n [ServiceProviderRelationships_Operations.DECLINE]: {\n variants: [{\n variantType: ResourceOperationVariantType.API_CALL,\n isDefault: true,\n roles: [CORE_ORG_ROLES.ORG_ADMIN],\n riskLevel: ResourceOperationRiskLevel.HIGH,\n resourceOperationLike: CoreResourceOperation.UPDATE,\n requestDto: decisionReasonDto,\n enabledCondition: ({ currentObject }) => currentObject.status === ServiceProviderRelationshipStatus.PROPOSED,\n }],\n },\n\n [ServiceProviderRelationships_Operations.SUSPEND]: {\n variants: [{\n variantType: ResourceOperationVariantType.API_CALL,\n isDefault: true,\n roles: [CORE_ORG_ROLES.ORG_ADMIN],\n riskLevel: ResourceOperationRiskLevel.HIGH,\n resourceOperationLike: CoreResourceOperation.UPDATE,\n requestDto: decisionReasonDto,\n enabledCondition: ({ currentObject }) => currentObject.status === ServiceProviderRelationshipStatus.ACTIVE,\n }],\n },\n\n [ServiceProviderRelationships_Operations.RESUME]: {\n variants: [{\n variantType: ResourceOperationVariantType.API_CALL,\n isDefault: true,\n roles: [CORE_ORG_ROLES.ORG_ADMIN],\n riskLevel: ResourceOperationRiskLevel.HIGH,\n resourceOperationLike: CoreResourceOperation.UPDATE,\n requestDto: decisionReasonDto,\n enabledCondition: ({ currentObject }) => currentObject.status === ServiceProviderRelationshipStatus.SUSPENDED,\n }],\n },\n\n /** The client ends a live relationship — its own proposal included. Takes effect on the next request. */\n [ServiceProviderRelationships_Operations.TERMINATE]: {\n variants: [{\n variantType: ResourceOperationVariantType.API_CALL,\n isDefault: true,\n roles: [CORE_ORG_ROLES.ORG_ADMIN],\n riskLevel: ResourceOperationRiskLevel.HIGH,\n resourceOperationLike: CoreResourceOperation.UPDATE,\n requestDto: decisionReasonDto,\n enabledCondition: ({ currentObject }) => LIVE(currentObject.status),\n }],\n },\n\n /** Role, units, term. Only the client, only its owner, with step-up — the firm cannot widen what the client granted. */\n [ServiceProviderRelationships_Operations.AMEND_SCOPE]: {\n variants: [{\n variantType: ResourceOperationVariantType.API_CALL,\n isDefault: true,\n roles: [CORE_ORG_ROLES.ORG_OWNER],\n riskLevel: ResourceOperationRiskLevel.HIGH,\n resourceOperationLike: CoreResourceOperation.UPDATE,\n requiresStepUpAuthentication: true,\n requestDto: z.object({\n ...relationshipScopeDto,\n /** Explicitly clear a term (open-ended) — distinct from \"leave it as it is\". `endsAt: null` means the same. */\n clearEndsAt: z.boolean().optional()\n .describe('`true` removes the end date, so the relationship runs until someone ends it. Sending `endsAt: null` does the same. Omitted or `false`: the end date is set by `endsAt`, or left as it is.'),\n /** Explicitly widen to organization-wide — distinct from \"leave the units as they are\". */\n clearOrganizationUnitIds: z.boolean().optional()\n .describe('`true` removes the unit restriction, so the firm\\'s experts reach the whole organization. Omitted or `false`: the units are set by `organizationUnitIds`, or left as they are.'),\n }),\n enabledCondition: ({ currentObject }) =>\n currentObject.status === ServiceProviderRelationshipStatus.ACTIVE\n || currentObject.status === ServiceProviderRelationshipStatus.SUSPENDED,\n }],\n },\n\n /**\n * Admit a firm's client, or change what an admitted one may do. `autonomousAgentRefs` is the client's\n * choice of the firm's autonomous agents that may run here (#1611) and REPLACES the client's previous\n * choice; omitted means none. Re-admitting an admitted client with a new list is how that choice changes.\n */\n [ServiceProviderRelationships_Operations.ADMIT_MACHINE_CLIENT]: {\n variants: [{\n variantType: ResourceOperationVariantType.API_CALL,\n isDefault: true,\n roles: [CORE_ORG_ROLES.ORG_ADMIN],\n riskLevel: ResourceOperationRiskLevel.HIGH,\n resourceOperationLike: CoreResourceOperation.UPDATE,\n requestDto: z.object({\n oauthClientId: z.string().min(1)\n .describe('The firm\\'s machine client to admit: an active OAuth client owned by the firm\\'s organization. Any other client is refused.'),\n autonomousAgentRefs: z.array(AutonomousAgentRefSchema).max(AUTONOMOUS_AGENT_REFS_PER_CLIENT_MAX).optional()\n .describe(\"The firm's autonomous agents this client may run in your organization, under this relationship's role and on your organization's budget. Replaces any earlier choice; omit it to allow none.\"),\n }),\n enabledCondition: ({ currentObject }) => LIVE(currentObject.status),\n }],\n },\n\n [ServiceProviderRelationships_Operations.REMOVE_MACHINE_CLIENT]: {\n variants: [{\n variantType: ResourceOperationVariantType.API_CALL,\n isDefault: true,\n roles: [CORE_ORG_ROLES.ORG_ADMIN],\n riskLevel: ResourceOperationRiskLevel.HIGH,\n resourceOperationLike: CoreResourceOperation.UPDATE,\n requestDto: z.object({\n oauthClientId: z.string().min(1)\n .describe('The firm\\'s machine client to remove. It can no longer act in your organization, and your choice of its autonomous agents is dropped.'),\n }),\n }],\n },\n\n /**\n * Change whether each assigned expert waits for this organization's approval (#1612). A client administrator's\n * verb, on a live relationship; not retroactive — experts already admitted keep their membership, and pending\n * approvals stay pending. The firm has no counterpart verb.\n */\n [ServiceProviderRelationships_Operations.SET_EXPERT_ADMISSION_POLICY]: {\n variants: [{\n variantType: ResourceOperationVariantType.API_CALL,\n isDefault: true,\n roles: [CORE_ORG_ROLES.ORG_ADMIN],\n riskLevel: ResourceOperationRiskLevel.HIGH,\n resourceOperationLike: CoreResourceOperation.UPDATE,\n requestDto: z.object({ expertAdmissionPolicy: z.enum(ServiceProviderExpertAdmissionPolicy) }),\n enabledCondition: ({ currentObject }) => LIVE(currentObject.status),\n }],\n },\n\n /**\n * Decide whether the firm's own identity provider's MFA counts in this organization (#1633). The owner's verb,\n * with step-up: trusting it lets a proof made elsewhere satisfy this organization's authentication policy for\n * the firm's experts. The organization type's minimum strength still applies either way.\n */\n [ServiceProviderRelationships_Operations.SET_PROVIDER_MFA_TRUST]: {\n variants: [{\n variantType: ResourceOperationVariantType.API_CALL,\n isDefault: true,\n roles: [CORE_ORG_ROLES.ORG_OWNER],\n riskLevel: ResourceOperationRiskLevel.HIGH,\n resourceOperationLike: CoreResourceOperation.UPDATE,\n requiresStepUpAuthentication: true,\n requestDto: z.object({ providerMfaTrust: z.enum(ServiceProviderMfaTrust) }),\n enabledCondition: ({ currentObject }) => LIVE(currentObject.status),\n }],\n },\n\n /**\n * Decide how much the firm's expert-activity feed may say about work done here (#1632). A client administrator's\n * verb; it takes effect on the expert's next action. It can only narrow what the firm learns — at every level the\n * feed carries metadata, never this organization's content.\n */\n [ServiceProviderRelationships_Operations.SET_ACTIVITY_FEED_DISCLOSURE]: {\n variants: [{\n variantType: ResourceOperationVariantType.API_CALL,\n isDefault: true,\n roles: [CORE_ORG_ROLES.ORG_ADMIN],\n riskLevel: ResourceOperationRiskLevel.HIGH,\n resourceOperationLike: CoreResourceOperation.UPDATE,\n requestDto: z.object({ activityFeedDisclosure: z.enum(ServiceProviderActivityFeedDisclosure) }),\n enabledCondition: ({ currentObject }) => LIVE(currentObject.status),\n }],\n },\n\n /**\n * ACTIVE or SUSPENDED → EXPIRED past `endsAt`, dispatched by the credential-expiry sweep only.\n * Bookkeeping: admission already stopped at `endsAt`. Empty request contract by design — the\n * implementation owns the transition, and an operation without a `requestDto` would advertise the\n * resource's whole update contract.\n */\n [ServiceProviderRelationships_Operations.EXPIRE]: {\n variants: [{\n variantType: ResourceOperationVariantType.INTERNAL_CALL,\n isDefault: true,\n roles: [CORE_APP_ROLES.APP_ADMIN_SUPER_ADMIN],\n riskLevel: ResourceOperationRiskLevel.LOW,\n resourceOperationLike: CoreResourceOperation.UPDATE,\n requestDto: z.object({}),\n }],\n },\n },\n });\n\ntype EngagementCoreOperations = RelationshipCoreOperations;\n\nexport const serviceEngagementsResourceConfiguration_InitializationFactory = (resourcesRelationships: ResourceRelationship[]) =>\n createResourceConfiguration_Initialization<\n typeof ServiceEngagements_Operations,\n EngagementCoreOperations,\n typeof ServiceEngagementSchema\n >({\n mainSchema: ServiceEngagementSchema,\n resourceIdentifier: CoreResourceType.SERVICE_ENGAGEMENTS,\n resourceFieldIdentifier: coreResourceShared_FieldIdentifier[CoreResourceType.SERVICE_ENGAGEMENTS],\n resourceRelationships: resourcesRelationships,\n isSystemResource: true,\n systemAccessPolicy: systemWrites,\n retentionPolicy: RETAIN,\n retentionBinding: KEPT_AS_ACCESS_EVIDENCE,\n dataSubjectPolicy: { kind: ResourceDataSubjectKind.NO_PRINCIPAL },\n coreOperations: CORE_OPERATIONS,\n operationsConfiguration: {\n [CoreResourceOperation.UPDATE_MANY]: {\n variants: [{\n variantType: ResourceOperationVariantType.INTERNAL_CALL,\n isDefault: true,\n roles: [CORE_APP_ROLES.APP_ADMIN_SUPER_ADMIN],\n riskLevel: ResourceOperationRiskLevel.CRITICAL,\n }],\n },\n [CoreResourceOperation.DELETE]: {\n variants: [{\n variantType: ResourceOperationVariantType.INTERNAL_CALL,\n isDefault: true,\n roles: [],\n riskLevel: ResourceOperationRiskLevel.CRITICAL,\n }],\n },\n [CoreResourceOperation.CREATE]: {\n variants: [{\n variantType: ResourceOperationVariantType.INTERNAL_CALL,\n isDefault: true,\n roles: [CORE_APP_ROLES.APP_ADMIN_SUPER_ADMIN],\n riskLevel: ResourceOperationRiskLevel.HIGH,\n }],\n },\n [CoreResourceOperation.UPDATE]: {\n variants: [{\n variantType: ResourceOperationVariantType.INTERNAL_CALL,\n isDefault: true,\n roles: [CORE_APP_ROLES.APP_ADMIN_SUPER_ADMIN],\n riskLevel: ResourceOperationRiskLevel.HIGH,\n }],\n },\n [CoreResourceOperation.READ]: {\n variants: [{ variantType: ResourceOperationVariantType.API_CALL, isDefault: true, roles: [CORE_ORG_ROLES.ORG_ADMIN], riskLevel: ResourceOperationRiskLevel.LOW }],\n },\n [CoreResourceOperation.LIST]: {\n variants: [{ variantType: ResourceOperationVariantType.API_CALL, isDefault: true, roles: [CORE_ORG_ROLES.ORG_ADMIN], riskLevel: ResourceOperationRiskLevel.LOW }],\n },\n [CoreResourceOperation.COUNT]: {\n variants: [{ variantType: ResourceOperationVariantType.API_CALL, isDefault: true, roles: [CORE_ORG_ROLES.ORG_ADMIN], riskLevel: ResourceOperationRiskLevel.LOW }],\n },\n\n /** The firm proposes a relationship to a client. Nothing is conferred until the client owner accepts. */\n [ServiceEngagements_Operations.PROPOSE]: {\n variants: [{\n variantType: ResourceOperationVariantType.API_CALL,\n isDefault: true,\n roles: [CORE_ORG_ROLES.ORG_ADMIN],\n riskLevel: ResourceOperationRiskLevel.HIGH,\n resourceOperationLike: CoreResourceOperation.CREATE,\n requestDto: z.object({\n clientOrganizationId: z.string().min(1),\n purpose: z.string().min(1).max(1000),\n ...relationshipScopeDto,\n // Described HERE rather than on `relationshipScopeDto`: the relationship's own verbs take their\n // description from the relationship's field specification, and a `.describe()` on the shared\n // DTO would override it. The engagement has no such field, so its proposal needed its own words.\n organizationUnitIds: relationshipScopeDto.organizationUnitIds\n .describe('The client organization\\'s units your experts would be confined to, by their ids in the client\\'s tenant. Absent or empty: the whole client organization. The client sees this scope when deciding, and may change it later.'),\n }),\n }],\n },\n\n /** The firm accepts a CLIENT's proposal — the client owner's consent is the proposal itself. */\n [ServiceEngagements_Operations.ACCEPT]: {\n variants: [{\n variantType: ResourceOperationVariantType.API_CALL,\n isDefault: true,\n roles: [CORE_ORG_ROLES.ORG_ADMIN],\n riskLevel: ResourceOperationRiskLevel.HIGH,\n resourceOperationLike: CoreResourceOperation.UPDATE,\n requestDto: decisionReasonDto,\n enabledCondition: ({ currentObject }) => currentObject.status === ServiceProviderRelationshipStatus.PROPOSED,\n }],\n },\n\n /** The firm ends a live relationship, or withdraws its own proposal. */\n [ServiceEngagements_Operations.WITHDRAW]: {\n variants: [{\n variantType: ResourceOperationVariantType.API_CALL,\n isDefault: true,\n roles: [CORE_ORG_ROLES.ORG_ADMIN],\n riskLevel: ResourceOperationRiskLevel.HIGH,\n resourceOperationLike: CoreResourceOperation.UPDATE,\n requestDto: decisionReasonDto,\n enabledCondition: ({ currentObject }) => LIVE(currentObject.status),\n }],\n },\n },\n });\n\ntype AssignmentCoreOperations = RelationshipCoreOperations;\n\nexport const serviceEngagementAssignmentsResourceConfiguration_InitializationFactory = (resourcesRelationships: ResourceRelationship[]) =>\n createResourceConfiguration_Initialization<\n typeof ServiceEngagementAssignments_Operations,\n AssignmentCoreOperations,\n typeof ServiceEngagementAssignmentSchema\n >({\n mainSchema: ServiceEngagementAssignmentSchema,\n resourceIdentifier: CoreResourceType.SERVICE_ENGAGEMENT_ASSIGNMENTS,\n resourceFieldIdentifier: coreResourceShared_FieldIdentifier[CoreResourceType.SERVICE_ENGAGEMENT_ASSIGNMENTS],\n resourceRelationships: resourcesRelationships,\n isSystemResource: true,\n systemAccessPolicy: {\n ...systemWrites,\n /**\n * `userId` is a foreign key to USERS, so these rows are on a person's subject-export graph. ALLOWED:\n * which clients a person was assigned to serve is a fact about their own work, not a monitoring\n * record about them, and it names nobody else.\n */\n exportSubject: ResourceSystemAccessMode.ALLOWED,\n },\n /**\n * RETAIN_ONLY: an assignment holds no personal text of its own — ids, a status and timestamps — so\n * there is nothing an erasure could scrub, and claiming RETAIN_AND_IMPERSONALIZE would describe a\n * scrub that never happens. Kept whole as evidence of who served which client, when.\n */\n retentionPolicy: { mode: ErasureRetentionMode.RETAIN_ONLY },\n retentionBinding: KEPT_AS_ACCESS_EVIDENCE,\n dataSubjectPolicy: { kind: ResourceDataSubjectKind.NO_PRINCIPAL },\n coreOperations: CORE_OPERATIONS,\n operationsConfiguration: {\n [CoreResourceOperation.UPDATE_MANY]: {\n variants: [{\n variantType: ResourceOperationVariantType.INTERNAL_CALL,\n isDefault: true,\n roles: [CORE_APP_ROLES.APP_ADMIN_SUPER_ADMIN],\n riskLevel: ResourceOperationRiskLevel.CRITICAL,\n }],\n },\n [CoreResourceOperation.DELETE]: {\n variants: [{\n variantType: ResourceOperationVariantType.INTERNAL_CALL,\n isDefault: true,\n roles: [],\n riskLevel: ResourceOperationRiskLevel.CRITICAL,\n }],\n },\n [CoreResourceOperation.CREATE]: {\n variants: [{\n variantType: ResourceOperationVariantType.INTERNAL_CALL,\n isDefault: true,\n roles: [CORE_APP_ROLES.APP_ADMIN_SUPER_ADMIN],\n riskLevel: ResourceOperationRiskLevel.HIGH,\n }],\n },\n [CoreResourceOperation.UPDATE]: {\n variants: [{\n variantType: ResourceOperationVariantType.INTERNAL_CALL,\n isDefault: true,\n roles: [CORE_APP_ROLES.APP_ADMIN_SUPER_ADMIN],\n riskLevel: ResourceOperationRiskLevel.HIGH,\n }],\n },\n [CoreResourceOperation.READ]: {\n variants: [{ variantType: ResourceOperationVariantType.API_CALL, isDefault: true, roles: [CORE_ORG_ROLES.ORG_ADMIN], riskLevel: ResourceOperationRiskLevel.LOW }],\n },\n [CoreResourceOperation.LIST]: {\n variants: [{ variantType: ResourceOperationVariantType.API_CALL, isDefault: true, roles: [CORE_ORG_ROLES.ORG_ADMIN], riskLevel: ResourceOperationRiskLevel.LOW }],\n },\n [CoreResourceOperation.COUNT]: {\n variants: [{ variantType: ResourceOperationVariantType.API_CALL, isDefault: true, roles: [CORE_ORG_ROLES.ORG_ADMIN], riskLevel: ResourceOperationRiskLevel.LOW }],\n },\n\n /** The firm designates one of its ACTIVE members to serve an ACTIVE engagement. */\n [ServiceEngagementAssignments_Operations.ASSIGN]: {\n variants: [{\n variantType: ResourceOperationVariantType.API_CALL,\n isDefault: true,\n roles: [CORE_ORG_ROLES.ORG_ADMIN],\n riskLevel: ResourceOperationRiskLevel.HIGH,\n resourceOperationLike: CoreResourceOperation.CREATE,\n requestDto: z.object({\n serviceEngagementId: z.string().min(1),\n userId: z.string().min(1),\n }),\n }],\n },\n\n /** Ends an ACTIVE assignment, or withdraws one still waiting for the client's approval (#1612). */\n [ServiceEngagementAssignments_Operations.UNASSIGN]: {\n variants: [{\n variantType: ResourceOperationVariantType.API_CALL,\n isDefault: true,\n roles: [CORE_ORG_ROLES.ORG_ADMIN],\n riskLevel: ResourceOperationRiskLevel.HIGH,\n resourceOperationLike: CoreResourceOperation.UPDATE,\n requestDto: z.object({}),\n enabledCondition: ({ currentObject }) => currentObject.status === ServiceEngagementAssignmentStatus.ACTIVE\n || currentObject.status === ServiceEngagementAssignmentStatus.PENDING_CLIENT_APPROVAL,\n }],\n },\n\n /**\n * Apply the client's answer to a per-expert approval (#1612). INTERNAL_CALL: it registers no route, and is\n * reached only from the human-decision answer path after that path authorized the answerer as one of the\n * client's administrators. The input names the decision it settles; the write matches on it.\n */\n [ServiceEngagementAssignments_Operations.SETTLE_CLIENT_APPROVAL]: {\n variants: [{\n variantType: ResourceOperationVariantType.INTERNAL_CALL,\n isDefault: true,\n roles: [CORE_APP_ROLES.APP_ADMIN_SUPER_ADMIN],\n riskLevel: ResourceOperationRiskLevel.HIGH,\n resourceOperationLike: CoreResourceOperation.UPDATE,\n requestDto: ServiceEngagementAssignmentSettleClientApprovalDtoSchema,\n }],\n },\n },\n });\n"]}