@wildo-ai/saas-models 1.1.6 → 1.1.7

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 (869) 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 +22 -22
  190. package/dist/esm/config/frontend/chart-definition.shared.schemas.d.ts.map +1 -1
  191. package/dist/esm/config/frontend/chart-definition.shared.schemas.js.map +1 -1
  192. package/dist/esm/config/frontend/chart-registration-alignment.shared.d.ts.map +1 -1
  193. package/dist/esm/config/frontend/chart-registration-alignment.shared.js.map +1 -1
  194. package/dist/esm/config/frontend/navigation.shared.schemas.d.ts.map +1 -1
  195. package/dist/esm/config/frontend/navigation.shared.schemas.js.map +1 -1
  196. package/dist/esm/config/frontend/onboarding.shared.schemas.d.ts.map +1 -1
  197. package/dist/esm/config/frontend/onboarding.shared.schemas.js.map +1 -1
  198. package/dist/esm/config/postgresql.shared.schemas.d.ts.map +1 -1
  199. package/dist/esm/config/postgresql.shared.schemas.js.map +1 -1
  200. package/dist/esm/config/registration-acquisition-policy.shared.utils.d.ts.map +1 -1
  201. package/dist/esm/config/registration-acquisition-policy.shared.utils.js.map +1 -1
  202. package/dist/esm/config-authoring.entry.d.ts.map +1 -1
  203. package/dist/esm/config-authoring.entry.js.map +1 -1
  204. package/dist/esm/crdt/crdt-merge.shared.utils.d.ts.map +1 -1
  205. package/dist/esm/crdt/crdt-merge.shared.utils.js.map +1 -1
  206. package/dist/esm/data-seeding/data-seeding-config.shared.schemas.d.ts.map +1 -1
  207. package/dist/esm/data-seeding/data-seeding-config.shared.schemas.js.map +1 -1
  208. package/dist/esm/errors/caught-error-description.shared.utils.d.ts.map +1 -1
  209. package/dist/esm/errors/caught-error-description.shared.utils.js.map +1 -1
  210. package/dist/esm/errors/errors.custom-message-ref.shared.definitions.d.ts.map +1 -1
  211. package/dist/esm/errors/errors.custom-message-ref.shared.definitions.js.map +1 -1
  212. package/dist/esm/errors/errors.shared.definitions.d.ts.map +1 -1
  213. package/dist/esm/errors/errors.shared.definitions.js.map +1 -1
  214. package/dist/esm/errors/errors.shared.schemas.d.ts.map +1 -1
  215. package/dist/esm/errors/errors.shared.schemas.js.map +1 -1
  216. package/dist/esm/errors/errors.shared.utils.d.ts.map +1 -1
  217. package/dist/esm/errors/errors.shared.utils.js.map +1 -1
  218. package/dist/esm/errors/resource-access-forbidden.shared.error.d.ts.map +1 -1
  219. package/dist/esm/errors/resource-access-forbidden.shared.error.js.map +1 -1
  220. package/dist/esm/errors/thrown-value-description.shared.utils.d.ts.map +1 -1
  221. package/dist/esm/errors/thrown-value-description.shared.utils.js.map +1 -1
  222. package/dist/esm/errors/zod-issue-formatting.shared.utils.d.ts.map +1 -1
  223. package/dist/esm/errors/zod-issue-formatting.shared.utils.js.map +1 -1
  224. package/dist/esm/exports/tabular-csv.shared.utils.d.ts.map +1 -1
  225. package/dist/esm/exports/tabular-csv.shared.utils.js.map +1 -1
  226. package/dist/esm/external-data/external-data-pipeline-description.shared.d.ts.map +1 -1
  227. package/dist/esm/external-data/external-data-pipeline-description.shared.js.map +1 -1
  228. package/dist/esm/external-data/external-data-pipeline-pass-mode.shared.d.ts.map +1 -1
  229. package/dist/esm/external-data/external-data-pipeline-pass-mode.shared.js.map +1 -1
  230. package/dist/esm/external-data/external-data-pipeline.shared.schemas.d.ts.map +1 -1
  231. package/dist/esm/external-data/external-data-pipeline.shared.schemas.js.map +1 -1
  232. package/dist/esm/external-data/external-data-provenance.shared.d.ts.map +1 -1
  233. package/dist/esm/external-data/external-data-provenance.shared.js.map +1 -1
  234. package/dist/esm/external-data.exports.d.ts.map +1 -1
  235. package/dist/esm/external-data.exports.js.map +1 -1
  236. package/dist/esm/external-providers/compose-provider-registry.shared.d.ts.map +1 -1
  237. package/dist/esm/external-providers/compose-provider-registry.shared.js.map +1 -1
  238. package/dist/esm/external-providers/engine-capabilities.shared.schemas.d.ts.map +1 -1
  239. package/dist/esm/external-providers/engine-capabilities.shared.schemas.js.map +1 -1
  240. package/dist/esm/external-providers/engine-capability-resolution-mode.shared.d.ts.map +1 -1
  241. package/dist/esm/external-providers/engine-capability-resolution-mode.shared.js.map +1 -1
  242. package/dist/esm/external-providers/engine-capability-surface.shared.d.ts.map +1 -1
  243. package/dist/esm/external-providers/engine-capability-surface.shared.js.map +1 -1
  244. package/dist/esm/external-providers/external-providers.shared.schemas.d.ts.map +1 -1
  245. package/dist/esm/external-providers/external-providers.shared.schemas.js.map +1 -1
  246. package/dist/esm/external-providers/frontend-bootstrap.shared.schemas.d.ts.map +1 -1
  247. package/dist/esm/external-providers/frontend-bootstrap.shared.schemas.js.map +1 -1
  248. package/dist/esm/external-providers/frontend-capability-public-config.shared.schemas.d.ts.map +1 -1
  249. package/dist/esm/external-providers/frontend-capability-public-config.shared.schemas.js.map +1 -1
  250. package/dist/esm/external-providers/frontend-capability-runtime.shared.types.d.ts.map +1 -1
  251. package/dist/esm/external-providers/frontend-capability-runtime.shared.types.js.map +1 -1
  252. package/dist/esm/external-providers/frontend-provider-entry.shared.schemas.d.ts.map +1 -1
  253. package/dist/esm/external-providers/frontend-provider-entry.shared.schemas.js.map +1 -1
  254. package/dist/esm/external-providers/frontend-provider-public-config.shared.d.ts.map +1 -1
  255. package/dist/esm/external-providers/frontend-provider-public-config.shared.js.map +1 -1
  256. package/dist/esm/external-providers/model-cost-accounting-config.shared.schemas.d.ts.map +1 -1
  257. package/dist/esm/external-providers/model-cost-accounting-config.shared.schemas.js.map +1 -1
  258. package/dist/esm/external-providers/provider-address-lookup-contract.shared.types.d.ts.map +1 -1
  259. package/dist/esm/external-providers/provider-address-lookup-contract.shared.types.js.map +1 -1
  260. package/dist/esm/external-providers/provider-augmentation-opt-ins.shared.schemas.d.ts.map +1 -1
  261. package/dist/esm/external-providers/provider-augmentation-opt-ins.shared.schemas.js.map +1 -1
  262. package/dist/esm/external-providers/provider-authentication-assurance.shared.schemas.d.ts.map +1 -1
  263. package/dist/esm/external-providers/provider-authentication-assurance.shared.schemas.js.map +1 -1
  264. package/dist/esm/external-providers/provider-browser-operations.shared.schemas.d.ts.map +1 -1
  265. package/dist/esm/external-providers/provider-browser-operations.shared.schemas.js.map +1 -1
  266. package/dist/esm/external-providers/provider-capability.shared.schemas.d.ts.map +1 -1
  267. package/dist/esm/external-providers/provider-capability.shared.schemas.js.map +1 -1
  268. package/dist/esm/external-providers/provider-compliance-profile.shared.schemas.d.ts.map +1 -1
  269. package/dist/esm/external-providers/provider-compliance-profile.shared.schemas.js.map +1 -1
  270. package/dist/esm/external-providers/provider-frontend-component-contract.shared.types.d.ts.map +1 -1
  271. package/dist/esm/external-providers/provider-frontend-component-contract.shared.types.js.map +1 -1
  272. package/dist/esm/external-providers/provider-frontend-surface.shared.schemas.d.ts.map +1 -1
  273. package/dist/esm/external-providers/provider-frontend-surface.shared.schemas.js.map +1 -1
  274. package/dist/esm/external-providers/provider-metadata.shared.schemas.d.ts.map +1 -1
  275. package/dist/esm/external-providers/provider-metadata.shared.schemas.js.map +1 -1
  276. package/dist/esm/external-providers/provider-package-allow-list.shared.schemas.d.ts.map +1 -1
  277. package/dist/esm/external-providers/provider-package-allow-list.shared.schemas.js.map +1 -1
  278. package/dist/esm/external-providers/provider-protocol.shared.schemas.d.ts.map +1 -1
  279. package/dist/esm/external-providers/provider-protocol.shared.schemas.js.map +1 -1
  280. package/dist/esm/external-providers/provider-scope-reauthorization.shared.schemas.d.ts.map +1 -1
  281. package/dist/esm/external-providers/provider-scope-reauthorization.shared.schemas.js.map +1 -1
  282. package/dist/esm/external-providers/provider-shared-connections.shared.schemas.d.ts.map +1 -1
  283. package/dist/esm/external-providers/provider-shared-connections.shared.schemas.js.map +1 -1
  284. package/dist/esm/external-providers/provider-tier-rule.shared.utils.d.ts.map +1 -1
  285. package/dist/esm/external-providers/provider-tier-rule.shared.utils.js.map +1 -1
  286. package/dist/esm/external-providers/provider-usage-cost.shared.d.ts.map +1 -1
  287. package/dist/esm/external-providers/provider-usage-cost.shared.js.map +1 -1
  288. package/dist/esm/external-providers/provider-usage-pricing.example.d.ts.map +1 -1
  289. package/dist/esm/external-providers/provider-usage-pricing.example.js.map +1 -1
  290. package/dist/esm/external-providers/provider-usage-pricing.shared.schemas.d.ts.map +1 -1
  291. package/dist/esm/external-providers/provider-usage-pricing.shared.schemas.js.map +1 -1
  292. package/dist/esm/features/application-features.shared.resources-config.schemas.d.ts.map +1 -1
  293. package/dist/esm/features/application-features.shared.resources-config.schemas.js.map +1 -1
  294. package/dist/esm/features/connected-feature.example.d.ts.map +1 -1
  295. package/dist/esm/features/connected-feature.example.js.map +1 -1
  296. package/dist/esm/features/core-feature-definitions.shared.d.ts.map +1 -1
  297. package/dist/esm/features/core-feature-definitions.shared.js.map +1 -1
  298. package/dist/esm/features/feature-builders.shared.d.ts.map +1 -1
  299. package/dist/esm/features/feature-builders.shared.js.map +1 -1
  300. package/dist/esm/features/feature-definition.shared.schemas.d.ts.map +1 -1
  301. package/dist/esm/features/feature-definition.shared.schemas.js.map +1 -1
  302. package/dist/esm/features/feature-registry.shared.d.ts.map +1 -1
  303. package/dist/esm/features/feature-registry.shared.js.map +1 -1
  304. package/dist/esm/features/feature-resolution.shared.schemas.d.ts.map +1 -1
  305. package/dist/esm/features/feature-resolution.shared.schemas.js.map +1 -1
  306. package/dist/esm/features/scope-features.shared.schemas.d.ts.map +1 -1
  307. package/dist/esm/features/scope-features.shared.schemas.js.map +1 -1
  308. package/dist/esm/features/user-features.shared.resources-config.schemas.d.ts.map +1 -1
  309. package/dist/esm/features/user-features.shared.resources-config.schemas.js.map +1 -1
  310. package/dist/esm/files/file-remote-reference-link.shared.schemas.d.ts.map +1 -1
  311. package/dist/esm/files/file-remote-reference-link.shared.schemas.js.map +1 -1
  312. package/dist/esm/files/file-upload-grant.shared.schemas.d.ts.map +1 -1
  313. package/dist/esm/files/file-upload-grant.shared.schemas.js.map +1 -1
  314. package/dist/esm/files/files.shared.resources-config.schemas.d.ts.map +1 -1
  315. package/dist/esm/files/files.shared.resources-config.schemas.js.map +1 -1
  316. package/dist/esm/files/files.shared.schemas.d.ts.map +1 -1
  317. package/dist/esm/files/files.shared.schemas.js.map +1 -1
  318. package/dist/esm/files/files.shared.utils.d.ts.map +1 -1
  319. package/dist/esm/files/files.shared.utils.js.map +1 -1
  320. package/dist/esm/flows-actors/a2a-push-delivery-log.shared.resources-config.schemas.d.ts.map +1 -1
  321. package/dist/esm/flows-actors/a2a-push-delivery-log.shared.resources-config.schemas.js.map +1 -1
  322. package/dist/esm/flows-actors/a2a-push-delivery-log.shared.schemas.d.ts.map +1 -1
  323. package/dist/esm/flows-actors/a2a-push-delivery-log.shared.schemas.js.map +1 -1
  324. package/dist/esm/flows-actors/a2a-token-budget-state.shared.resources-config.schemas.d.ts.map +1 -1
  325. package/dist/esm/flows-actors/a2a-token-budget-state.shared.resources-config.schemas.js.map +1 -1
  326. package/dist/esm/flows-actors/a2a-token-budget-state.shared.schemas.d.ts.map +1 -1
  327. package/dist/esm/flows-actors/a2a-token-budget-state.shared.schemas.js.map +1 -1
  328. package/dist/esm/flows-actors/actors.shared.schemas.d.ts.map +1 -1
  329. package/dist/esm/flows-actors/actors.shared.schemas.js.map +1 -1
  330. package/dist/esm/flows-actors/agent-traceability.shared.schemas.d.ts.map +1 -1
  331. package/dist/esm/flows-actors/agent-traceability.shared.schemas.js.map +1 -1
  332. package/dist/esm/flows-actors/agent-work-decisions.shared.resources-config.schemas.d.ts.map +1 -1
  333. package/dist/esm/flows-actors/agent-work-decisions.shared.resources-config.schemas.js.map +1 -1
  334. package/dist/esm/flows-actors/agent-work-decisions.shared.schemas.d.ts.map +1 -1
  335. package/dist/esm/flows-actors/agent-work-decisions.shared.schemas.js.map +1 -1
  336. package/dist/esm/flows-actors/agents.shared.schemas.d.ts +2 -2
  337. package/dist/esm/flows-actors/agents.shared.schemas.d.ts.map +1 -1
  338. package/dist/esm/flows-actors/agents.shared.schemas.js.map +1 -1
  339. package/dist/esm/flows-actors/autonomous-agents.shared.schemas.d.ts.map +1 -1
  340. package/dist/esm/flows-actors/autonomous-agents.shared.schemas.js.map +1 -1
  341. package/dist/esm/flows-actors/deliberation.shared.schemas.d.ts.map +1 -1
  342. package/dist/esm/flows-actors/deliberation.shared.schemas.js.map +1 -1
  343. package/dist/esm/flows-actors/execution-plan-readiness.shared.utils.d.ts.map +1 -1
  344. package/dist/esm/flows-actors/execution-plan-readiness.shared.utils.js.map +1 -1
  345. package/dist/esm/flows-actors/flows-actors-execution.shared.resources-config.schemas.d.ts.map +1 -1
  346. package/dist/esm/flows-actors/flows-actors-execution.shared.resources-config.schemas.js.map +1 -1
  347. package/dist/esm/flows-actors/flows-actors-execution.shared.schemas.d.ts.map +1 -1
  348. package/dist/esm/flows-actors/flows-actors-execution.shared.schemas.js.map +1 -1
  349. package/dist/esm/flows-actors/flows-actors-task.shared.resources-config.schemas.d.ts.map +1 -1
  350. package/dist/esm/flows-actors/flows-actors-task.shared.resources-config.schemas.js.map +1 -1
  351. package/dist/esm/flows-actors/flows-actors-task.shared.schemas.d.ts.map +1 -1
  352. package/dist/esm/flows-actors/flows-actors-task.shared.schemas.js.map +1 -1
  353. package/dist/esm/flows-actors/flows-actors.commons.shared.schemas.d.ts.map +1 -1
  354. package/dist/esm/flows-actors/flows-actors.commons.shared.schemas.js.map +1 -1
  355. package/dist/esm/flows-actors/flows-actors.configuration.shared.schemas.d.ts.map +1 -1
  356. package/dist/esm/flows-actors/flows-actors.configuration.shared.schemas.js.map +1 -1
  357. package/dist/esm/flows-actors/flows-actors.frontend.shared.schemas.d.ts.map +1 -1
  358. package/dist/esm/flows-actors/flows-actors.frontend.shared.schemas.js.map +1 -1
  359. package/dist/esm/flows-actors/flows-actors.io.shared.schemas.d.ts.map +1 -1
  360. package/dist/esm/flows-actors/flows-actors.io.shared.schemas.js.map +1 -1
  361. package/dist/esm/flows-actors/flows-actors.system.shared.definitions.d.ts.map +1 -1
  362. package/dist/esm/flows-actors/flows-actors.system.shared.definitions.js.map +1 -1
  363. package/dist/esm/flows-actors/flows-actors.system.shared.schemas.d.ts.map +1 -1
  364. package/dist/esm/flows-actors/flows-actors.system.shared.schemas.js.map +1 -1
  365. package/dist/esm/flows-actors/flows.shared.schemas.d.ts.map +1 -1
  366. package/dist/esm/flows-actors/flows.shared.schemas.js.map +1 -1
  367. package/dist/esm/flows-actors/human-decision.shared.schemas.d.ts.map +1 -1
  368. package/dist/esm/flows-actors/human-decision.shared.schemas.js.map +1 -1
  369. package/dist/esm/flows-actors/mcp-servers.shared.schemas.d.ts.map +1 -1
  370. package/dist/esm/flows-actors/mcp-servers.shared.schemas.js.map +1 -1
  371. package/dist/esm/flows-actors/model-call-attributions.shared.resources-config.schemas.d.ts.map +1 -1
  372. package/dist/esm/flows-actors/model-call-attributions.shared.resources-config.schemas.js.map +1 -1
  373. package/dist/esm/flows-actors/model-call-attributions.shared.schemas.d.ts.map +1 -1
  374. package/dist/esm/flows-actors/model-call-attributions.shared.schemas.js.map +1 -1
  375. package/dist/esm/flows-actors/model-cost-period-aggregates.shared.resources-config.schemas.d.ts.map +1 -1
  376. package/dist/esm/flows-actors/model-cost-period-aggregates.shared.resources-config.schemas.js.map +1 -1
  377. package/dist/esm/flows-actors/model-cost-period-aggregates.shared.schemas.d.ts.map +1 -1
  378. package/dist/esm/flows-actors/model-cost-period-aggregates.shared.schemas.js.map +1 -1
  379. package/dist/esm/flows-actors/model-cost-summary.shared.schemas.d.ts.map +1 -1
  380. package/dist/esm/flows-actors/model-cost-summary.shared.schemas.js.map +1 -1
  381. package/dist/esm/flows-actors/prompt-ir.shared.schemas.d.ts.map +1 -1
  382. package/dist/esm/flows-actors/prompt-ir.shared.schemas.js.map +1 -1
  383. package/dist/esm/flows-actors/provider-call-records.shared.resources-config.schemas.d.ts.map +1 -1
  384. package/dist/esm/flows-actors/provider-call-records.shared.resources-config.schemas.js.map +1 -1
  385. package/dist/esm/flows-actors/provider-call-records.shared.schemas.d.ts.map +1 -1
  386. package/dist/esm/flows-actors/provider-call-records.shared.schemas.js.map +1 -1
  387. package/dist/esm/flows-actors/review-deadlines.shared.schemas.d.ts.map +1 -1
  388. package/dist/esm/flows-actors/review-deadlines.shared.schemas.js.map +1 -1
  389. package/dist/esm/flows-actors/tasks.actors.shared.schemas.d.ts.map +1 -1
  390. package/dist/esm/flows-actors/tasks.actors.shared.schemas.js.map +1 -1
  391. package/dist/esm/flows-actors/work-attribution.shared.schemas.d.ts.map +1 -1
  392. package/dist/esm/flows-actors/work-attribution.shared.schemas.js.map +1 -1
  393. package/dist/esm/frontend-definitions/frontend-notification-custom-message-ref.definitions.d.ts.map +1 -1
  394. package/dist/esm/frontend-definitions/frontend-notification-custom-message-ref.definitions.js.map +1 -1
  395. package/dist/esm/frontend-definitions/settings-destination-ref.definitions.d.ts.map +1 -1
  396. package/dist/esm/frontend-definitions/settings-destination-ref.definitions.js.map +1 -1
  397. package/dist/esm/guidance/guidance-flow.shared.schemas.d.ts.map +1 -1
  398. package/dist/esm/guidance/guidance-flow.shared.schemas.js.map +1 -1
  399. package/dist/esm/guidance/guidance-state.shared.resources-config.schemas.d.ts.map +1 -1
  400. package/dist/esm/guidance/guidance-state.shared.resources-config.schemas.js.map +1 -1
  401. package/dist/esm/guidance/guidance-state.shared.schemas.d.ts.map +1 -1
  402. package/dist/esm/guidance/guidance-state.shared.schemas.js.map +1 -1
  403. package/dist/esm/guidance/guidance-state.shared.utils.d.ts.map +1 -1
  404. package/dist/esm/guidance/guidance-state.shared.utils.js.map +1 -1
  405. package/dist/esm/guidance/lifecycle-config.shared.schemas.d.ts.map +1 -1
  406. package/dist/esm/guidance/lifecycle-config.shared.schemas.js.map +1 -1
  407. package/dist/esm/guidance/lifecycle-state.shared.resources-config.schemas.d.ts.map +1 -1
  408. package/dist/esm/guidance/lifecycle-state.shared.resources-config.schemas.js.map +1 -1
  409. package/dist/esm/guidance/lifecycle-state.shared.schemas.d.ts.map +1 -1
  410. package/dist/esm/guidance/lifecycle-state.shared.schemas.js.map +1 -1
  411. package/dist/esm/guidance/milestone-builders.shared.d.ts.map +1 -1
  412. package/dist/esm/guidance/milestone-builders.shared.js.map +1 -1
  413. package/dist/esm/guidance/milestone-definition.shared.schemas.d.ts.map +1 -1
  414. package/dist/esm/guidance/milestone-definition.shared.schemas.js.map +1 -1
  415. package/dist/esm/guidance/progression-presentation.shared.schemas.d.ts.map +1 -1
  416. package/dist/esm/guidance/progression-presentation.shared.schemas.js.map +1 -1
  417. package/dist/esm/guidance/progression-state.shared.resources-config.schemas.d.ts.map +1 -1
  418. package/dist/esm/guidance/progression-state.shared.resources-config.schemas.js.map +1 -1
  419. package/dist/esm/guidance/progression-state.shared.schemas.d.ts.map +1 -1
  420. package/dist/esm/guidance/progression-state.shared.schemas.js.map +1 -1
  421. package/dist/esm/http-api-binding/http-api-binding-id.shared.utils.d.ts.map +1 -1
  422. package/dist/esm/http-api-binding/http-api-binding-id.shared.utils.js.map +1 -1
  423. package/dist/esm/http-api-binding/http-api-binding.shared.schemas.d.ts.map +1 -1
  424. package/dist/esm/http-api-binding/http-api-binding.shared.schemas.js.map +1 -1
  425. package/dist/esm/http-api-binding/http-api-erasure-stance.shared.d.ts.map +1 -1
  426. package/dist/esm/http-api-binding/http-api-erasure-stance.shared.js.map +1 -1
  427. package/dist/esm/http-api-binding/http-api-rest-write-operations.shared.schemas.d.ts.map +1 -1
  428. package/dist/esm/http-api-binding/http-api-rest-write-operations.shared.schemas.js.map +1 -1
  429. package/dist/esm/http-api-binding/http-api-transport-dialect.shared.d.ts.map +1 -1
  430. package/dist/esm/http-api-binding/http-api-transport-dialect.shared.js.map +1 -1
  431. package/dist/esm/http-api-binding/read-through-engine-anchors.shared.d.ts.map +1 -1
  432. package/dist/esm/http-api-binding/read-through-engine-anchors.shared.js.map +1 -1
  433. package/dist/esm/i18n/application-config-vocabulary.shared.d.ts.map +1 -1
  434. package/dist/esm/i18n/application-config-vocabulary.shared.js.map +1 -1
  435. package/dist/esm/i18n/engine-open-vocabulary-values.shared.d.ts.map +1 -1
  436. package/dist/esm/i18n/engine-open-vocabulary-values.shared.js.map +1 -1
  437. package/dist/esm/i18n/engine-open-vocabulary.shared.d.ts.map +1 -1
  438. package/dist/esm/i18n/engine-open-vocabulary.shared.js.map +1 -1
  439. package/dist/esm/i18n/interpolate-label-params.shared.utils.d.ts.map +1 -1
  440. package/dist/esm/i18n/interpolate-label-params.shared.utils.js.map +1 -1
  441. package/dist/esm/i18n/labelling.dto.shared.schemas.d.ts.map +1 -1
  442. package/dist/esm/i18n/labelling.dto.shared.schemas.js.map +1 -1
  443. package/dist/esm/inbound/conversation-threads.shared.resources-config.schemas.d.ts.map +1 -1
  444. package/dist/esm/inbound/conversation-threads.shared.resources-config.schemas.js.map +1 -1
  445. package/dist/esm/inbound/conversation-threads.shared.schemas.d.ts.map +1 -1
  446. package/dist/esm/inbound/conversation-threads.shared.schemas.js.map +1 -1
  447. package/dist/esm/inbound/inbound-channels.shared.schemas.d.ts.map +1 -1
  448. package/dist/esm/inbound/inbound-channels.shared.schemas.js.map +1 -1
  449. package/dist/esm/inbound/inbound-delivery.shared.resources-config.schemas.d.ts.map +1 -1
  450. package/dist/esm/inbound/inbound-delivery.shared.resources-config.schemas.js.map +1 -1
  451. package/dist/esm/inbound/inbound-delivery.shared.schemas.d.ts.map +1 -1
  452. package/dist/esm/inbound/inbound-delivery.shared.schemas.js.map +1 -1
  453. package/dist/esm/inbound/inbound-endpoint-env.shared.d.ts.map +1 -1
  454. package/dist/esm/inbound/inbound-endpoint-env.shared.js.map +1 -1
  455. package/dist/esm/index.d.ts.map +1 -1
  456. package/dist/esm/index.js.map +1 -1
  457. package/dist/esm/meta-workflows/actions.meta-workflows.shared.schemas.d.ts.map +1 -1
  458. package/dist/esm/meta-workflows/actions.meta-workflows.shared.schemas.js.map +1 -1
  459. package/dist/esm/meta-workflows/catalog.meta-workflows.shared.schemas.d.ts.map +1 -1
  460. package/dist/esm/meta-workflows/catalog.meta-workflows.shared.schemas.js.map +1 -1
  461. package/dist/esm/meta-workflows/coding-tasks.meta-workflows.shared.schemas.d.ts.map +1 -1
  462. package/dist/esm/meta-workflows/coding-tasks.meta-workflows.shared.schemas.js.map +1 -1
  463. package/dist/esm/meta-workflows/context-selection.meta-workflows.shared.schemas.d.ts.map +1 -1
  464. package/dist/esm/meta-workflows/context-selection.meta-workflows.shared.schemas.js.map +1 -1
  465. package/dist/esm/meta-workflows/decisions.meta-workflows.shared.schemas.d.ts.map +1 -1
  466. package/dist/esm/meta-workflows/decisions.meta-workflows.shared.schemas.js.map +1 -1
  467. package/dist/esm/meta-workflows/orchestration.meta-workflows.shared.schemas.d.ts.map +1 -1
  468. package/dist/esm/meta-workflows/orchestration.meta-workflows.shared.schemas.js.map +1 -1
  469. package/dist/esm/meta-workflows/portable-primitives.meta-workflows.shared.schemas.d.ts.map +1 -1
  470. package/dist/esm/meta-workflows/portable-primitives.meta-workflows.shared.schemas.js.map +1 -1
  471. package/dist/esm/meta-workflows.exports.d.ts.map +1 -1
  472. package/dist/esm/meta-workflows.exports.js.map +1 -1
  473. package/dist/esm/monitoring/monitoring.shared.schemas.d.ts.map +1 -1
  474. package/dist/esm/monitoring/monitoring.shared.schemas.js.map +1 -1
  475. package/dist/esm/notifications/email/email-context.shared.schemas.d.ts.map +1 -1
  476. package/dist/esm/notifications/email/email-context.shared.schemas.js.map +1 -1
  477. package/dist/esm/notifications/email/email-submission.shared.enums.d.ts.map +1 -1
  478. package/dist/esm/notifications/email/email-submission.shared.enums.js.map +1 -1
  479. package/dist/esm/notifications/email/email-template-registry.shared.schemas.d.ts.map +1 -1
  480. package/dist/esm/notifications/email/email-template-registry.shared.schemas.js.map +1 -1
  481. package/dist/esm/notifications/email/email-template.shared.enums.d.ts.map +1 -1
  482. package/dist/esm/notifications/email/email-template.shared.enums.js.map +1 -1
  483. package/dist/esm/notifications/inbound-email/inbound-email.shared.resources-config.schemas.d.ts.map +1 -1
  484. package/dist/esm/notifications/inbound-email/inbound-email.shared.resources-config.schemas.js.map +1 -1
  485. package/dist/esm/notifications/inbound-email/inbound-email.shared.schemas.d.ts.map +1 -1
  486. package/dist/esm/notifications/inbound-email/inbound-email.shared.schemas.js.map +1 -1
  487. package/dist/esm/notifications/m2m/m2m-webhook-delivery-contract.shared.d.ts.map +1 -1
  488. package/dist/esm/notifications/m2m/m2m-webhook-delivery-contract.shared.js.map +1 -1
  489. package/dist/esm/notifications/m2m/m2m-webhook-delivery-log.shared.resources-config.schemas.d.ts.map +1 -1
  490. package/dist/esm/notifications/m2m/m2m-webhook-delivery-log.shared.resources-config.schemas.js.map +1 -1
  491. package/dist/esm/notifications/m2m/m2m-webhook-delivery-log.shared.schemas.d.ts.map +1 -1
  492. package/dist/esm/notifications/m2m/m2m-webhook-delivery-log.shared.schemas.js.map +1 -1
  493. package/dist/esm/notifications/m2m/webhook-config.shared.resources-config.schemas.d.ts.map +1 -1
  494. package/dist/esm/notifications/m2m/webhook-config.shared.resources-config.schemas.js.map +1 -1
  495. package/dist/esm/notifications/m2m/webhook-config.shared.schemas.d.ts.map +1 -1
  496. package/dist/esm/notifications/m2m/webhook-config.shared.schemas.js.map +1 -1
  497. package/dist/esm/notifications/notification-badges.core.definitions.d.ts.map +1 -1
  498. package/dist/esm/notifications/notification-badges.core.definitions.js.map +1 -1
  499. package/dist/esm/notifications/notification-badges.schemas.d.ts.map +1 -1
  500. package/dist/esm/notifications/notification-badges.schemas.js.map +1 -1
  501. package/dist/esm/notifications/notification-badges.shared.resources-config.schemas.d.ts.map +1 -1
  502. package/dist/esm/notifications/notification-badges.shared.resources-config.schemas.js.map +1 -1
  503. package/dist/esm/notifications/notifications.shared.schemas.d.ts.map +1 -1
  504. package/dist/esm/notifications/notifications.shared.schemas.js.map +1 -1
  505. package/dist/esm/organizations/application-owner-organization.shared.schemas.d.ts.map +1 -1
  506. package/dist/esm/organizations/application-owner-organization.shared.schemas.js.map +1 -1
  507. package/dist/esm/organizations/organization-features.shared.resources-config.schemas.d.ts.map +1 -1
  508. package/dist/esm/organizations/organization-features.shared.resources-config.schemas.js.map +1 -1
  509. package/dist/esm/organizations/organization-features.shared.schemas.d.ts.map +1 -1
  510. package/dist/esm/organizations/organization-features.shared.schemas.js.map +1 -1
  511. package/dist/esm/organizations/organization-members.shared.resources-config.schemas.d.ts.map +1 -1
  512. package/dist/esm/organizations/organization-members.shared.resources-config.schemas.js.map +1 -1
  513. package/dist/esm/organizations/organization-members.shared.schemas.d.ts.map +1 -1
  514. package/dist/esm/organizations/organization-members.shared.schemas.js.map +1 -1
  515. package/dist/esm/organizations/organization-notifications.shared.resources-config.schemas.d.ts.map +1 -1
  516. package/dist/esm/organizations/organization-notifications.shared.resources-config.schemas.js.map +1 -1
  517. package/dist/esm/organizations/organization-notifications.shared.schemas.d.ts.map +1 -1
  518. package/dist/esm/organizations/organization-notifications.shared.schemas.js.map +1 -1
  519. package/dist/esm/organizations/organization-preferences.shared.resources-config.schemas.d.ts.map +1 -1
  520. package/dist/esm/organizations/organization-preferences.shared.resources-config.schemas.js.map +1 -1
  521. package/dist/esm/organizations/organization-preferences.shared.schemas.d.ts.map +1 -1
  522. package/dist/esm/organizations/organization-preferences.shared.schemas.js.map +1 -1
  523. package/dist/esm/organizations/organization-profile.shared.resources-config.schemas.d.ts.map +1 -1
  524. package/dist/esm/organizations/organization-profile.shared.resources-config.schemas.js.map +1 -1
  525. package/dist/esm/organizations/organization-profile.shared.schemas.d.ts.map +1 -1
  526. package/dist/esm/organizations/organization-profile.shared.schemas.js.map +1 -1
  527. package/dist/esm/organizations/organization-unit-inheritance.shared.d.ts.map +1 -1
  528. package/dist/esm/organizations/organization-unit-inheritance.shared.js.map +1 -1
  529. package/dist/esm/organizations/organization-unit-members.shared.resources-config.schemas.d.ts.map +1 -1
  530. package/dist/esm/organizations/organization-unit-members.shared.resources-config.schemas.js.map +1 -1
  531. package/dist/esm/organizations/organization-unit-members.shared.schemas.d.ts.map +1 -1
  532. package/dist/esm/organizations/organization-unit-members.shared.schemas.js.map +1 -1
  533. package/dist/esm/organizations/organization-unit-narrowing-decision.shared.d.ts.map +1 -1
  534. package/dist/esm/organizations/organization-unit-narrowing-decision.shared.js.map +1 -1
  535. package/dist/esm/organizations/organization-unit-narrowing.example.d.ts.map +1 -1
  536. package/dist/esm/organizations/organization-unit-narrowing.example.js.map +1 -1
  537. package/dist/esm/organizations/organization-unit-narrowing.shared.d.ts.map +1 -1
  538. package/dist/esm/organizations/organization-unit-narrowing.shared.js.map +1 -1
  539. package/dist/esm/organizations/organization-units.shared.path.d.ts.map +1 -1
  540. package/dist/esm/organizations/organization-units.shared.path.js.map +1 -1
  541. package/dist/esm/organizations/organization-units.shared.resources-config.schemas.d.ts.map +1 -1
  542. package/dist/esm/organizations/organization-units.shared.resources-config.schemas.js.map +1 -1
  543. package/dist/esm/organizations/organization-units.shared.schemas.d.ts.map +1 -1
  544. package/dist/esm/organizations/organization-units.shared.schemas.js.map +1 -1
  545. package/dist/esm/organizations/organizations.shared.resources-config.schemas.d.ts.map +1 -1
  546. package/dist/esm/organizations/organizations.shared.resources-config.schemas.js.map +1 -1
  547. package/dist/esm/organizations/organizations.shared.schemas.d.ts.map +1 -1
  548. package/dist/esm/organizations/organizations.shared.schemas.js.map +1 -1
  549. package/dist/esm/organizations/service-provider-activity-feed.shared.resources-config.schemas.d.ts.map +1 -1
  550. package/dist/esm/organizations/service-provider-activity-feed.shared.resources-config.schemas.js.map +1 -1
  551. package/dist/esm/organizations/service-provider-activity-feed.shared.schemas.d.ts.map +1 -1
  552. package/dist/esm/organizations/service-provider-activity-feed.shared.schemas.js.map +1 -1
  553. package/dist/esm/organizations/service-provider-capability-grants.shared.resources-config.schemas.d.ts.map +1 -1
  554. package/dist/esm/organizations/service-provider-capability-grants.shared.resources-config.schemas.js.map +1 -1
  555. package/dist/esm/organizations/service-provider-capability-grants.shared.schemas.d.ts.map +1 -1
  556. package/dist/esm/organizations/service-provider-capability-grants.shared.schemas.js.map +1 -1
  557. package/dist/esm/organizations/service-provider-client-controls.shared.schemas.d.ts.map +1 -1
  558. package/dist/esm/organizations/service-provider-client-controls.shared.schemas.js.map +1 -1
  559. package/dist/esm/organizations/service-provider-relationships.shared.resources-config.schemas.d.ts.map +1 -1
  560. package/dist/esm/organizations/service-provider-relationships.shared.resources-config.schemas.js.map +1 -1
  561. package/dist/esm/organizations/service-provider-relationships.shared.schemas.d.ts.map +1 -1
  562. package/dist/esm/organizations/service-provider-relationships.shared.schemas.js.map +1 -1
  563. package/dist/esm/organizations/tenant-teardown-config.shared.schemas.d.ts.map +1 -1
  564. package/dist/esm/organizations/tenant-teardown-config.shared.schemas.js.map +1 -1
  565. package/dist/esm/provider-registration-runtime.exports.d.ts.map +1 -1
  566. package/dist/esm/provider-registration-runtime.exports.js.map +1 -1
  567. package/dist/esm/public-runtime/index.d.ts.map +1 -1
  568. package/dist/esm/public-runtime/index.js.map +1 -1
  569. package/dist/esm/queue/jobs.shared.resources-config.schemas.d.ts.map +1 -1
  570. package/dist/esm/queue/jobs.shared.resources-config.schemas.js.map +1 -1
  571. package/dist/esm/queue/jobs.shared.schemas.d.ts +8 -8
  572. package/dist/esm/queue/jobs.shared.schemas.d.ts.map +1 -1
  573. package/dist/esm/queue/jobs.shared.schemas.js.map +1 -1
  574. package/dist/esm/queue/jobs.shared.utils.d.ts.map +1 -1
  575. package/dist/esm/queue/jobs.shared.utils.js.map +1 -1
  576. package/dist/esm/queue/queues.shared.schemas.d.ts.map +1 -1
  577. package/dist/esm/queue/queues.shared.schemas.js.map +1 -1
  578. package/dist/esm/queue/queues.shared.utils.d.ts.map +1 -1
  579. package/dist/esm/queue/queues.shared.utils.js.map +1 -1
  580. package/dist/esm/queue/rabbitmq-queue-args.shared.d.ts.map +1 -1
  581. package/dist/esm/queue/rabbitmq-queue-args.shared.js.map +1 -1
  582. package/dist/esm/rag/rag-retrieval-health.shared.d.ts.map +1 -1
  583. package/dist/esm/rag/rag-retrieval-health.shared.js.map +1 -1
  584. package/dist/esm/requests/header-keys.shared.d.ts.map +1 -1
  585. package/dist/esm/requests/header-keys.shared.js.map +1 -1
  586. package/dist/esm/requests/http-requests.shared.d.ts.map +1 -1
  587. package/dist/esm/requests/http-requests.shared.js.map +1 -1
  588. package/dist/esm/requests/idempotency-key.shared.d.ts.map +1 -1
  589. package/dist/esm/requests/idempotency-key.shared.js.map +1 -1
  590. package/dist/esm/requests/manual-controllers-routes-documentation.d.ts.map +1 -1
  591. package/dist/esm/requests/manual-controllers-routes-documentation.js.map +1 -1
  592. package/dist/esm/requests/manual-controllers-routes-urls.d.ts.map +1 -1
  593. package/dist/esm/requests/manual-controllers-routes-urls.js.map +1 -1
  594. package/dist/esm/requests/rate-limits.shared.schemas.d.ts.map +1 -1
  595. package/dist/esm/requests/rate-limits.shared.schemas.js.map +1 -1
  596. package/dist/esm/requests/websocket.shared.schemas.d.ts.map +1 -1
  597. package/dist/esm/requests/websocket.shared.schemas.js.map +1 -1
  598. package/dist/esm/resources/child-operations.shared.schemas.d.ts.map +1 -1
  599. package/dist/esm/resources/child-operations.shared.schemas.js.map +1 -1
  600. package/dist/esm/resources/collection-query-parameters.shared.d.ts.map +1 -1
  601. package/dist/esm/resources/collection-query-parameters.shared.js.map +1 -1
  602. package/dist/esm/resources/context-policy.shared.schemas.d.ts.map +1 -1
  603. package/dist/esm/resources/context-policy.shared.schemas.js.map +1 -1
  604. package/dist/esm/resources/embedded-resource-mark.shared.utils.d.ts.map +1 -1
  605. package/dist/esm/resources/embedded-resource-mark.shared.utils.js.map +1 -1
  606. package/dist/esm/resources/relationship-display.shared.schemas.d.ts.map +1 -1
  607. package/dist/esm/resources/relationship-display.shared.schemas.js.map +1 -1
  608. package/dist/esm/resources/resources-config.shared.factory.d.ts.map +1 -1
  609. package/dist/esm/resources/resources-config.shared.factory.js.map +1 -1
  610. package/dist/esm/resources/resources-config.shared.schemas.d.ts.map +1 -1
  611. package/dist/esm/resources/resources-config.shared.schemas.js.map +1 -1
  612. package/dist/esm/resources/resources-registry.shared.core.definitions.d.ts.map +1 -1
  613. package/dist/esm/resources/resources-registry.shared.core.definitions.js +18 -2
  614. package/dist/esm/resources/resources-registry.shared.core.definitions.js.map +1 -1
  615. package/dist/esm/resources/resources-relationships.shared.factory.d.ts.map +1 -1
  616. package/dist/esm/resources/resources-relationships.shared.factory.js.map +1 -1
  617. package/dist/esm/resources/resources-serialization.shared.schemas.d.ts.map +1 -1
  618. package/dist/esm/resources/resources-serialization.shared.schemas.js.map +1 -1
  619. package/dist/esm/resources/resources.shared.core.definitions.d.ts.map +1 -1
  620. package/dist/esm/resources/resources.shared.core.definitions.js.map +1 -1
  621. package/dist/esm/resources/resources.shared.schemas.d.ts.map +1 -1
  622. package/dist/esm/resources/resources.shared.schemas.js.map +1 -1
  623. package/dist/esm/resources/resources.shared.utils.d.ts.map +1 -1
  624. package/dist/esm/resources/resources.shared.utils.js.map +1 -1
  625. package/dist/esm/resources/utils/collection-export.shared.utils.d.ts.map +1 -1
  626. package/dist/esm/resources/utils/collection-export.shared.utils.js.map +1 -1
  627. package/dist/esm/resources/utils/composition-cascade-deletability.validation.d.ts.map +1 -1
  628. package/dist/esm/resources/utils/composition-cascade-deletability.validation.js.map +1 -1
  629. package/dist/esm/resources/utils/composition-seedability.validation.d.ts.map +1 -1
  630. package/dist/esm/resources/utils/composition-seedability.validation.js.map +1 -1
  631. package/dist/esm/resources/utils/context-addressed-composition-singleton.shared.utils.d.ts.map +1 -1
  632. package/dist/esm/resources/utils/context-addressed-composition-singleton.shared.utils.js.map +1 -1
  633. package/dist/esm/resources/utils/dependent-lifecycle-classification.validation.d.ts.map +1 -1
  634. package/dist/esm/resources/utils/dependent-lifecycle-classification.validation.js.map +1 -1
  635. package/dist/esm/resources/utils/duplicate-relationship-registration.validation.d.ts.map +1 -1
  636. package/dist/esm/resources/utils/duplicate-relationship-registration.validation.js.map +1 -1
  637. package/dist/esm/resources/utils/field-value-disclosure.utils.d.ts.map +1 -1
  638. package/dist/esm/resources/utils/field-value-disclosure.utils.js.map +1 -1
  639. package/dist/esm/resources/utils/http-api-write-declaration.shared.utils.d.ts.map +1 -1
  640. package/dist/esm/resources/utils/http-api-write-declaration.shared.utils.js.map +1 -1
  641. package/dist/esm/resources/utils/initiator-stamped-field-satisfiability.validation.d.ts.map +1 -1
  642. package/dist/esm/resources/utils/initiator-stamped-field-satisfiability.validation.js.map +1 -1
  643. package/dist/esm/resources/utils/no-subject-data-stance-coherence.shared.utils.d.ts.map +1 -1
  644. package/dist/esm/resources/utils/no-subject-data-stance-coherence.shared.utils.js.map +1 -1
  645. package/dist/esm/resources/utils/persistence-adapter-discrimination.shared.utils.d.ts.map +1 -1
  646. package/dist/esm/resources/utils/persistence-adapter-discrimination.shared.utils.js.map +1 -1
  647. package/dist/esm/resources/utils/populated-file-fields.shared.utils.d.ts.map +1 -1
  648. package/dist/esm/resources/utils/populated-file-fields.shared.utils.js.map +1 -1
  649. package/dist/esm/resources/utils/repository-dto-builder.utils.d.ts.map +1 -1
  650. package/dist/esm/resources/utils/repository-dto-builder.utils.js.map +1 -1
  651. package/dist/esm/resources/utils/request-schema-field-carriage.shared.utils.d.ts.map +1 -1
  652. package/dist/esm/resources/utils/request-schema-field-carriage.shared.utils.js.map +1 -1
  653. package/dist/esm/resources/utils/required-fk-fillability.validation.d.ts.map +1 -1
  654. package/dist/esm/resources/utils/required-fk-fillability.validation.js.map +1 -1
  655. package/dist/esm/resources/utils/resource-operation-type-guards.utils.d.ts.map +1 -1
  656. package/dist/esm/resources/utils/resource-operation-type-guards.utils.js.map +1 -1
  657. package/dist/esm/resources/utils/resource-polymorphism.factory.d.ts.map +1 -1
  658. package/dist/esm/resources/utils/resource-polymorphism.factory.js.map +1 -1
  659. package/dist/esm/resources/utils/resource-polymorphism.relationships.d.ts.map +1 -1
  660. package/dist/esm/resources/utils/resource-polymorphism.relationships.js.map +1 -1
  661. package/dist/esm/resources/utils/resource-polymorphism.schemas.d.ts.map +1 -1
  662. package/dist/esm/resources/utils/resource-polymorphism.schemas.js.map +1 -1
  663. package/dist/esm/resources/utils/resource-polymorphism.utils.d.ts.map +1 -1
  664. package/dist/esm/resources/utils/resource-polymorphism.utils.js.map +1 -1
  665. package/dist/esm/resources/utils/resource-subtree.utils.d.ts.map +1 -1
  666. package/dist/esm/resources/utils/resource-subtree.utils.js.map +1 -1
  667. package/dist/esm/resources/utils/resources-config-context-needs.utils.d.ts.map +1 -1
  668. package/dist/esm/resources/utils/resources-config-context-needs.utils.js.map +1 -1
  669. package/dist/esm/resources/utils/resources-config-naming.utils.d.ts.map +1 -1
  670. package/dist/esm/resources/utils/resources-config-naming.utils.js.map +1 -1
  671. package/dist/esm/resources/utils/resources-config-operations.dtos-builder.utils.d.ts.map +1 -1
  672. package/dist/esm/resources/utils/resources-config-operations.dtos-builder.utils.js.map +1 -1
  673. package/dist/esm/resources/utils/resources-config-operations.path.utils.d.ts.map +1 -1
  674. package/dist/esm/resources/utils/resources-config-operations.path.utils.js.map +1 -1
  675. package/dist/esm/resources/utils/resources-config-operations.urls-builder.utils.d.ts.map +1 -1
  676. package/dist/esm/resources/utils/resources-config-operations.urls-builder.utils.js.map +1 -1
  677. package/dist/esm/resources/utils/resources-config-operations.utils.d.ts.map +1 -1
  678. package/dist/esm/resources/utils/resources-config-operations.utils.js.map +1 -1
  679. package/dist/esm/resources/utils/resources-serialization.utils.d.ts.map +1 -1
  680. package/dist/esm/resources/utils/resources-serialization.utils.js.map +1 -1
  681. package/dist/esm/resources/utils/resources-summary.utils.d.ts.map +1 -1
  682. package/dist/esm/resources/utils/resources-summary.utils.js.map +1 -1
  683. package/dist/esm/resources/utils/schema-family-builder.utils.d.ts.map +1 -1
  684. package/dist/esm/resources/utils/schema-family-builder.utils.js.map +1 -1
  685. package/dist/esm/resources/utils/schema-type-inference.utils.d.ts.map +1 -1
  686. package/dist/esm/resources/utils/schema-type-inference.utils.js.map +1 -1
  687. package/dist/esm/resources/utils/schema-type-utils.d.ts.map +1 -1
  688. package/dist/esm/resources/utils/schema-type-utils.js.map +1 -1
  689. package/dist/esm/resources/utils/schema-variant-resolver.utils.d.ts.map +1 -1
  690. package/dist/esm/resources/utils/schema-variant-resolver.utils.js.map +1 -1
  691. package/dist/esm/resources/utils/shared-persistence-collection.utils.d.ts.map +1 -1
  692. package/dist/esm/resources/utils/shared-persistence-collection.utils.js.map +1 -1
  693. package/dist/esm/resources/utils/templatable-file-fields.shared.utils.d.ts.map +1 -1
  694. package/dist/esm/resources/utils/templatable-file-fields.shared.utils.js.map +1 -1
  695. package/dist/esm/resources/work-unit.shared.schemas.d.ts.map +1 -1
  696. package/dist/esm/resources/work-unit.shared.schemas.js.map +1 -1
  697. package/dist/esm/runtime/domain-module.shared.definitions.d.ts.map +1 -1
  698. package/dist/esm/runtime/domain-module.shared.definitions.js.map +1 -1
  699. package/dist/esm/runtime/execution-context.shared.schemas.d.ts.map +1 -1
  700. package/dist/esm/runtime/execution-context.shared.schemas.js.map +1 -1
  701. package/dist/esm/runtime/runtime.shared.schemas.d.ts.map +1 -1
  702. package/dist/esm/runtime/runtime.shared.schemas.js.map +1 -1
  703. package/dist/esm/security/api-keys/api-keys-application.shared.resources-config.schemas.d.ts.map +1 -1
  704. package/dist/esm/security/api-keys/api-keys-application.shared.resources-config.schemas.js.map +1 -1
  705. package/dist/esm/security/api-keys/api-keys-organization.shared.resources-config.schemas.d.ts.map +1 -1
  706. package/dist/esm/security/api-keys/api-keys-organization.shared.resources-config.schemas.js.map +1 -1
  707. package/dist/esm/security/api-keys/api-keys.shared.schemas.d.ts.map +1 -1
  708. package/dist/esm/security/api-keys/api-keys.shared.schemas.js.map +1 -1
  709. package/dist/esm/security/authentications/anonymous-session/anonymous-session.shared.contract.d.ts.map +1 -1
  710. package/dist/esm/security/authentications/anonymous-session/anonymous-session.shared.contract.js.map +1 -1
  711. package/dist/esm/security/authentications/authentication.shared.dto.schemas.d.ts.map +1 -1
  712. package/dist/esm/security/authentications/authentication.shared.dto.schemas.js.map +1 -1
  713. package/dist/esm/security/authentications/authentication.shared.schemas.d.ts.map +1 -1
  714. package/dist/esm/security/authentications/authentication.shared.schemas.js.map +1 -1
  715. package/dist/esm/security/authentications/authentication.shared.utils.d.ts.map +1 -1
  716. package/dist/esm/security/authentications/authentication.shared.utils.js.map +1 -1
  717. package/dist/esm/security/authentications/consumable-token.shared.schemas.d.ts.map +1 -1
  718. package/dist/esm/security/authentications/consumable-token.shared.schemas.js.map +1 -1
  719. package/dist/esm/security/authentications/cross-frontend-handoff.shared.dto.schemas.d.ts.map +1 -1
  720. package/dist/esm/security/authentications/cross-frontend-handoff.shared.dto.schemas.js.map +1 -1
  721. package/dist/esm/security/authentications/mfa-backup-code-contract.shared.d.ts.map +1 -1
  722. package/dist/esm/security/authentications/mfa-backup-code-contract.shared.js.map +1 -1
  723. package/dist/esm/security/authentications/password-blocklist.shared.utils.d.ts.map +1 -1
  724. package/dist/esm/security/authentications/password-blocklist.shared.utils.js.map +1 -1
  725. package/dist/esm/security/authentications/password-reset.shared.dto.schemas.d.ts.map +1 -1
  726. package/dist/esm/security/authentications/password-reset.shared.dto.schemas.js.map +1 -1
  727. package/dist/esm/security/authentications/registration.shared.dto.schemas.d.ts.map +1 -1
  728. package/dist/esm/security/authentications/registration.shared.dto.schemas.js.map +1 -1
  729. package/dist/esm/security/authentications/same-origin-redirect-path.shared.d.ts.map +1 -1
  730. package/dist/esm/security/authentications/same-origin-redirect-path.shared.js.map +1 -1
  731. package/dist/esm/security/authentications/scim/scim-organization-unit-mapping.shared.d.ts.map +1 -1
  732. package/dist/esm/security/authentications/scim/scim-organization-unit-mapping.shared.js.map +1 -1
  733. package/dist/esm/security/authentications/scim/scim-provisioning-config.shared.resources-config.schemas.d.ts.map +1 -1
  734. package/dist/esm/security/authentications/scim/scim-provisioning-config.shared.resources-config.schemas.js.map +1 -1
  735. package/dist/esm/security/authentications/scim/scim-provisioning-config.shared.schemas.d.ts.map +1 -1
  736. package/dist/esm/security/authentications/scim/scim-provisioning-config.shared.schemas.js.map +1 -1
  737. package/dist/esm/security/authentications/scim/scim-tokens.shared.resources-config.schemas.d.ts.map +1 -1
  738. package/dist/esm/security/authentications/scim/scim-tokens.shared.resources-config.schemas.js.map +1 -1
  739. package/dist/esm/security/authentications/scim/scim-tokens.shared.schemas.d.ts.map +1 -1
  740. package/dist/esm/security/authentications/scim/scim-tokens.shared.schemas.js.map +1 -1
  741. package/dist/esm/security/authentications/service-provider-client-authentication.shared.schemas.d.ts.map +1 -1
  742. package/dist/esm/security/authentications/service-provider-client-authentication.shared.schemas.js.map +1 -1
  743. package/dist/esm/security/authentications/siem/siem-delivery-dlq.shared.resources-config.schemas.d.ts.map +1 -1
  744. package/dist/esm/security/authentications/siem/siem-delivery-dlq.shared.resources-config.schemas.js.map +1 -1
  745. package/dist/esm/security/authentications/siem/siem-delivery-dlq.shared.schemas.d.ts.map +1 -1
  746. package/dist/esm/security/authentications/siem/siem-delivery-dlq.shared.schemas.js.map +1 -1
  747. package/dist/esm/security/authentications/siem/siem-delivery-outbox.shared.resources-config.schemas.d.ts.map +1 -1
  748. package/dist/esm/security/authentications/siem/siem-delivery-outbox.shared.resources-config.schemas.js.map +1 -1
  749. package/dist/esm/security/authentications/siem/siem-delivery-outbox.shared.schemas.d.ts.map +1 -1
  750. package/dist/esm/security/authentications/siem/siem-delivery-outbox.shared.schemas.js.map +1 -1
  751. package/dist/esm/security/authentications/siem/siem-delivery-reliability-contract.shared.d.ts.map +1 -1
  752. package/dist/esm/security/authentications/siem/siem-delivery-reliability-contract.shared.js.map +1 -1
  753. package/dist/esm/security/authentications/siem/siem-export-config.shared.resources-config.schemas.d.ts.map +1 -1
  754. package/dist/esm/security/authentications/siem/siem-export-config.shared.resources-config.schemas.js.map +1 -1
  755. package/dist/esm/security/authentications/siem/siem-export-config.shared.schemas.d.ts.map +1 -1
  756. package/dist/esm/security/authentications/siem/siem-export-config.shared.schemas.js.map +1 -1
  757. package/dist/esm/security/authentications/sso/sso-config.shared.resources-config.schemas.d.ts.map +1 -1
  758. package/dist/esm/security/authentications/sso/sso-config.shared.resources-config.schemas.js.map +1 -1
  759. package/dist/esm/security/authentications/sso/sso-config.shared.schemas.d.ts.map +1 -1
  760. package/dist/esm/security/authentications/sso/sso-config.shared.schemas.js.map +1 -1
  761. package/dist/esm/security/authentications/sso/sso-connection.shared.resources-config.schemas.d.ts.map +1 -1
  762. package/dist/esm/security/authentications/sso/sso-connection.shared.resources-config.schemas.js.map +1 -1
  763. package/dist/esm/security/authentications/sso/sso-connection.shared.schemas.d.ts.map +1 -1
  764. package/dist/esm/security/authentications/sso/sso-connection.shared.schemas.js.map +1 -1
  765. package/dist/esm/security/authorizations/administrative-continuity.shared.schemas.d.ts.map +1 -1
  766. package/dist/esm/security/authorizations/administrative-continuity.shared.schemas.js.map +1 -1
  767. package/dist/esm/security/authorizations/application-access-grants.shared.resources-config.schemas.d.ts.map +1 -1
  768. package/dist/esm/security/authorizations/application-access-grants.shared.resources-config.schemas.js.map +1 -1
  769. package/dist/esm/security/authorizations/application-access-grants.shared.schemas.d.ts.map +1 -1
  770. package/dist/esm/security/authorizations/application-access-grants.shared.schemas.js.map +1 -1
  771. package/dist/esm/security/authorizations/platform-access-grants.shared.resources-config.schemas.d.ts.map +1 -1
  772. package/dist/esm/security/authorizations/platform-access-grants.shared.resources-config.schemas.js.map +1 -1
  773. package/dist/esm/security/authorizations/platform-access-grants.shared.schemas.d.ts.map +1 -1
  774. package/dist/esm/security/authorizations/platform-access-grants.shared.schemas.js.map +1 -1
  775. package/dist/esm/security/authorizations/roles.shared.defaults.d.ts.map +1 -1
  776. package/dist/esm/security/authorizations/roles.shared.defaults.js.map +1 -1
  777. package/dist/esm/security/authorizations/roles.shared.schemas.d.ts.map +1 -1
  778. package/dist/esm/security/authorizations/roles.shared.schemas.js.map +1 -1
  779. package/dist/esm/security/authorizations/roles.shared.utils.d.ts.map +1 -1
  780. package/dist/esm/security/authorizations/roles.shared.utils.js.map +1 -1
  781. package/dist/esm/security/connected-accounts/provider-connection-listing.shared.schemas.d.ts.map +1 -1
  782. package/dist/esm/security/connected-accounts/provider-connection-listing.shared.schemas.js.map +1 -1
  783. package/dist/esm/security/connected-accounts/provider-credentials-organization.shared.resources-config.schemas.d.ts.map +1 -1
  784. package/dist/esm/security/connected-accounts/provider-credentials-organization.shared.resources-config.schemas.js.map +1 -1
  785. package/dist/esm/security/connected-accounts/provider-credentials-user.shared.resources-config.schemas.d.ts.map +1 -1
  786. package/dist/esm/security/connected-accounts/provider-credentials-user.shared.resources-config.schemas.js.map +1 -1
  787. package/dist/esm/security/connected-accounts/provider-credentials.shared.schemas.d.ts.map +1 -1
  788. package/dist/esm/security/connected-accounts/provider-credentials.shared.schemas.js.map +1 -1
  789. package/dist/esm/security/credential-rotation-grace.shared.utils.d.ts.map +1 -1
  790. package/dist/esm/security/credential-rotation-grace.shared.utils.js.map +1 -1
  791. package/dist/esm/security/crypto-keys/crypto-keys.shared.schemas.d.ts.map +1 -1
  792. package/dist/esm/security/crypto-keys/crypto-keys.shared.schemas.js.map +1 -1
  793. package/dist/esm/security/oauth-clients/oauth-clients-application.shared.resources-config.schemas.d.ts.map +1 -1
  794. package/dist/esm/security/oauth-clients/oauth-clients-application.shared.resources-config.schemas.js.map +1 -1
  795. package/dist/esm/security/oauth-clients/oauth-clients-organization.shared.resources-config.schemas.d.ts.map +1 -1
  796. package/dist/esm/security/oauth-clients/oauth-clients-organization.shared.resources-config.schemas.js.map +1 -1
  797. package/dist/esm/security/oauth-clients/oauth-clients.shared.schemas.d.ts.map +1 -1
  798. package/dist/esm/security/oauth-clients/oauth-clients.shared.schemas.js.map +1 -1
  799. package/dist/esm/security/oauth-clients/oauth-consent-grants.shared.resources-config.schemas.d.ts.map +1 -1
  800. package/dist/esm/security/oauth-clients/oauth-consent-grants.shared.resources-config.schemas.js.map +1 -1
  801. package/dist/esm/security/oauth-clients/oauth-consent-grants.shared.schemas.d.ts.map +1 -1
  802. package/dist/esm/security/oauth-clients/oauth-consent-grants.shared.schemas.js.map +1 -1
  803. package/dist/esm/security/oauth-clients/oauth-resource-server.shared.schemas.d.ts.map +1 -1
  804. package/dist/esm/security/oauth-clients/oauth-resource-server.shared.schemas.js.map +1 -1
  805. package/dist/esm/security/outbound-target-control.shared.schemas.d.ts.map +1 -1
  806. package/dist/esm/security/outbound-target-control.shared.schemas.js.map +1 -1
  807. package/dist/esm/security/submission-challenge/submission-challenge.shared.d.ts.map +1 -1
  808. package/dist/esm/security/submission-challenge/submission-challenge.shared.js.map +1 -1
  809. package/dist/esm/systems-of-record/system-of-record-actions.shared.schemas.d.ts.map +1 -1
  810. package/dist/esm/systems-of-record/system-of-record-actions.shared.schemas.js.map +1 -1
  811. package/dist/esm/systems-of-record/system-of-record-credential-kind.shared.d.ts.map +1 -1
  812. package/dist/esm/systems-of-record/system-of-record-credential-kind.shared.js.map +1 -1
  813. package/dist/esm/systems-of-record/system-of-record-declaration.shared.schemas.d.ts.map +1 -1
  814. package/dist/esm/systems-of-record/system-of-record-declaration.shared.schemas.js.map +1 -1
  815. package/dist/esm/systems-of-record/system-of-record-env.shared.d.ts.map +1 -1
  816. package/dist/esm/systems-of-record/system-of-record-env.shared.js.map +1 -1
  817. package/dist/esm/systems-of-record/system-of-record-error-codes.shared.d.ts.map +1 -1
  818. package/dist/esm/systems-of-record/system-of-record-error-codes.shared.js.map +1 -1
  819. package/dist/esm/systems-of-record/system-of-record-facet.shared.schemas.d.ts.map +1 -1
  820. package/dist/esm/systems-of-record/system-of-record-facet.shared.schemas.js.map +1 -1
  821. package/dist/esm/systems-of-record/system-of-record-partition-assignments.shared.resources-config.schemas.d.ts.map +1 -1
  822. package/dist/esm/systems-of-record/system-of-record-partition-assignments.shared.resources-config.schemas.js.map +1 -1
  823. package/dist/esm/systems-of-record/system-of-record-partition-assignments.shared.schemas.d.ts.map +1 -1
  824. package/dist/esm/systems-of-record/system-of-record-partition-assignments.shared.schemas.js.map +1 -1
  825. package/dist/esm/testing/resource-config-builders.d.ts.map +1 -1
  826. package/dist/esm/testing/resource-config-builders.js.map +1 -1
  827. package/dist/esm/testing.d.ts.map +1 -1
  828. package/dist/esm/testing.js.map +1 -1
  829. package/dist/esm/users/anonymous-user-marketing-metadata.shared.schemas.d.ts.map +1 -1
  830. package/dist/esm/users/anonymous-user-marketing-metadata.shared.schemas.js.map +1 -1
  831. package/dist/esm/users/anonymous-users.shared.resources-config.schemas.d.ts.map +1 -1
  832. package/dist/esm/users/anonymous-users.shared.resources-config.schemas.js.map +1 -1
  833. package/dist/esm/users/anonymous-users.shared.schema.d.ts.map +1 -1
  834. package/dist/esm/users/anonymous-users.shared.schema.js.map +1 -1
  835. package/dist/esm/users/inbound-contacts.shared.resources-config.schemas.d.ts.map +1 -1
  836. package/dist/esm/users/inbound-contacts.shared.resources-config.schemas.js.map +1 -1
  837. package/dist/esm/users/inbound-contacts.shared.schemas.d.ts.map +1 -1
  838. package/dist/esm/users/inbound-contacts.shared.schemas.js.map +1 -1
  839. package/dist/esm/users/user-consent-decision.shared.utils.d.ts.map +1 -1
  840. package/dist/esm/users/user-consent-decision.shared.utils.js.map +1 -1
  841. package/dist/esm/users/user-credentials.shared.resources-config.schemas.d.ts.map +1 -1
  842. package/dist/esm/users/user-credentials.shared.resources-config.schemas.js.map +1 -1
  843. package/dist/esm/users/user-credentials.shared.schemas.d.ts.map +1 -1
  844. package/dist/esm/users/user-credentials.shared.schemas.js.map +1 -1
  845. package/dist/esm/users/user-identity-links.shared.resources-config.schemas.d.ts.map +1 -1
  846. package/dist/esm/users/user-identity-links.shared.resources-config.schemas.js.map +1 -1
  847. package/dist/esm/users/user-identity-links.shared.schemas.d.ts.map +1 -1
  848. package/dist/esm/users/user-identity-links.shared.schemas.js.map +1 -1
  849. package/dist/esm/users/user-preferences-reset.shared.utils.d.ts.map +1 -1
  850. package/dist/esm/users/user-preferences-reset.shared.utils.js.map +1 -1
  851. package/dist/esm/users/user-preferences.shared.resources-config.schemas.d.ts.map +1 -1
  852. package/dist/esm/users/user-preferences.shared.resources-config.schemas.js.map +1 -1
  853. package/dist/esm/users/user-profiles.shared.resources-config.schemas.d.ts.map +1 -1
  854. package/dist/esm/users/user-profiles.shared.resources-config.schemas.js.map +1 -1
  855. package/dist/esm/users/user-self-preferences.shared.resources-config.schemas.d.ts.map +1 -1
  856. package/dist/esm/users/user-self-preferences.shared.resources-config.schemas.js.map +1 -1
  857. package/dist/esm/users/user-self-profiles.shared.resources-config.schemas.d.ts.map +1 -1
  858. package/dist/esm/users/user-self-profiles.shared.resources-config.schemas.js.map +1 -1
  859. package/dist/esm/users/user-self.shared.resources-config.schemas.d.ts.map +1 -1
  860. package/dist/esm/users/user-self.shared.resources-config.schemas.js.map +1 -1
  861. package/dist/esm/users/users.shared.resources-config.schemas.d.ts.map +1 -1
  862. package/dist/esm/users/users.shared.resources-config.schemas.js.map +1 -1
  863. package/dist/esm/users/users.shared.schemas.d.ts.map +1 -1
  864. package/dist/esm/users/users.shared.schemas.js.map +1 -1
  865. package/dist/tsconfig.build.tsbuildinfo +1 -0
  866. package/package.json +4 -4
  867. package/dist/esm/compliance/privacy/data-retention.shared.schemas.d.ts +0 -0
  868. package/dist/esm/compliance/privacy/data-retention.shared.schemas.d.ts.map +0 -0
  869. package/dist/esm/compliance/privacy/data-retention.shared.schemas.js.map +0 -0
@@ -1 +1 @@
1
- {"version":3,"file":"platform-access-grants.shared.schemas.js","sourceRoot":"","sources":["../../../../../src/security/authorizations/platform-access-grants.shared.schemas.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6CG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,oBAAoB,EAAE,MAAM,gEAAgE,CAAC;AACtG,OAAO,EAAE,aAAa,EAAE,MAAM,mDAAmD,CAAC;AAClF,OAAO,EAAE,oBAAoB,EAAE,MAAM,0BAA0B,CAAC;AAEhE;;;;;;;;;;;;;GAaG;AACH,MAAM,CAAN,IAAY,wBAQX;AARD,WAAY,wBAAwB;IAClC,yGAAyG;IACzG,6CAAiB,CAAA;IACjB;;;OAGG;IACH,iEAAqC,CAAA;AACvC,CAAC,EARW,wBAAwB,KAAxB,wBAAwB,QAQnC;AAED;;;;;GAKG;AACH,MAAM,CAAN,IAAY,yBAoBX;AApBD,WAAY,yBAAyB;IACnC,wFAAwF;IACxF,kEAAqC,CAAA;IACrC,yFAAyF;IACzF,8CAAiB,CAAA;IACjB,gGAAgG;IAChG,8CAAiB,CAAA;IACjB;;;;;;;;;OASG;IACH,gDAAmB,CAAA;IACnB,2EAA2E;IAC3E,gDAAmB,CAAA;AACrB,CAAC,EApBW,yBAAyB,KAAzB,yBAAyB,QAoBpC;AAED;;;;;;;GAOG;AACH,MAAM,CAAN,IAAY,sCAgBX;AAhBD,WAAY,sCAAsC;IAChD,iEAAuB,CAAA;IACvB,+DAAqB,CAAA;IACrB,2DAAiB,CAAA;IACjB,6DAAmB,CAAA;IACnB;;;;;;;;;OASG;IACH,6DAAmB,CAAA;AACrB,CAAC,EAhBW,sC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AAA;IACb,oDAAiB,CAAA;IACjB;;;;OAIG;IACH,oDAAiB,CAAA;AACnB,CAAC,EAXW,+BAA+B,KAA/B,+BAA+B,QAW1C","sourcesContent":["/**\n * Platform Access Grants — time-bound, justified, optionally tenant-approved elevation that lets a\n * platform operator cross the tenant boundary.\n *\n * ## Where this sits\n *\n * Wildo's answer to \"may a platform super-administrator administer any tenant?\" is YES, as at most\n * B2B platforms. The question this resource answers is the narrower one that follows: *on what\n * terms?* The progression, recorded in `.claude/rules/administrative-continuity-floors.md`:\n *\n * ambient+unaudited → ambient+audited → declared, deny-by-default → **JIT/time-bound (here)**\n * → customer-approved (here, when the tenant opts in)\n *\n * Declaring a crossing per operation variant (`admitsCrossTenantPlatformAdministration`) removed\n * AMBIENT authority: a crossing must now be asked for in code, reviewed, and specified. It did not\n * remove STANDING authority — every platform administrator still held every declared crossing,\n * permanently, over every tenant. That is the shape zero-standing-privilege programmes exist to\n * eliminate, and what NIST SP 800-53 AC-2 / AC-6(1) mean by least privilege: privileged access is\n * requested, scoped, time-boxed, and expires on its own.\n *\n * A grant is therefore required IN ADDITION to the variant's declaration. The declaration says\n * \"this verb MAY cross\"; the grant says \"this operator MAY cross into THIS tenant, until THIS time,\n * for THIS reason\". Neither is sufficient alone.\n *\n * ## The tenant-approval half (Lockbox)\n *\n * Microsoft Customer Lockbox and Google Access Approval let the CUSTOMER approve provider access\n * before it happens. Wildo models that as {@link PlatformAccessGrantStatus.PENDING_APPROVAL}, gated\n * per tenant so it is an opt-in posture rather than a deployment-wide one — the same shape those\n * products ship, and for the same reason: a tenant that has not staffed an approver must not be\n * unable to receive support.\n *\n * ## ⚠️ The interaction that is easy to get wrong\n *\n * Tenant approval and the administrative-continuity floors are in direct tension. Approval requires\n * an administrator; the floors exist precisely because a tenant can end up WITHOUT one. Requiring a\n * stranded tenant to approve its own repair is circular — the tenant cannot approve, so the repair\n * cannot happen, so the tenant stays stranded.\n *\n * This is resolved by measurement, not by exception: when the target tenant has no administratively\n * usable owner, the grant is auto-approved with\n * {@link PlatformAccessGrantAutoApprovalReason.TENANT_CANNOT_APPROVE} and recorded loudly. The\n * condition is evaluated with the SAME predicate the owner floor uses to refuse writes, so the two\n * can never disagree about whether a tenant can administer itself. An operator cannot manufacture\n * the condition either: stranding a tenant is exactly what the floors refuse.\n */\n\nimport { z } from 'zod';\nimport { PersonalDataCategory } from '../../compliance/privacy/personal-data-category.shared.schemas';\nimport { RedactionType } from '../../compliance/privacy/redaction.shared.schemas';\nimport { addImpersonalizeWith } from '@wildo-ai/zod-decorators';\n\n/**\n * WHAT an elevation reaches, and therefore WHO can approve it.\n *\n * A closed two-member vocabulary with one named runtime source, because the two members answer a\n * question no boolean can carry: approval AUTHORITY follows scope. A `TENANT` grant names one\n * organization and is approved by that organization (the Lockbox posture); an `APPLICATION_WIDE`\n * grant names none, so there is no customer to ask and approval falls to a SECOND platform\n * administrator under the two-person rule.\n *\n * It exists as a vocabulary rather than being inferred from which resource a row came from because\n * the AUDIT TRAIL needs it: `authorizingGrantId` on a crossing names a row id, and a reviewer given\n * only an id cannot tell which of the two collections to look in. Carrying the scope beside the id\n * is what makes the join mechanical instead of a guess.\n */\nexport enum PlatformAccessGrantScope {\n /** Scoped to ONE named organization. Approved by that organization, or auto-approved per its posture. */\n TENANT = 'tenant',\n /**\n * Application-wide: an unconfined directory read or a declared cross-tenant read that names no\n * single tenant. Approved by a SECOND platform administrator — never the requester.\n */\n APPLICATION_WIDE = 'application_wide',\n}\n\n/**\n * Lifecycle of one elevation request.\n *\n * A closed vocabulary with one named runtime source: schemas, guards, fixtures and comparisons all\n * derive from this enum rather than repeating literals.\n */\nexport enum PlatformAccessGrantStatus {\n /** Awaiting a decision from an administrator of the TARGET tenant (Lockbox posture). */\n PENDING_APPROVAL = 'pending_approval',\n /** Usable now. The admission predicate accepts this status, and only while unexpired. */\n ACTIVE = 'active',\n /** The tenant refused. Terminal — a new request must be raised rather than this one retried. */\n DENIED = 'denied',\n /**\n * The window elapsed. Terminal, and written by the credential-expiry sweep since 2026-09-08\n * (#413) — before that it was reached by NO writer at all, so an elapsed grant read as ACTIVE\n * forever in the customer-facing listing of its own resource.\n *\n * The label is still bookkeeping for humans and reporting, NEVER the control: the admission\n * predicate compares `expiresAt` against now, so an expired grant stops working whether or not\n * the sweep has run. That separation is deliberate and must survive — if admission ever starts\n * reading this label, a lagging sweep becomes an authorization hole rather than a stale display.\n */\n EXPIRED = 'expired',\n /** Withdrawn before expiry, by the tenant or by the platform. Terminal. */\n REVOKED = 'revoked',\n}\n\n/**\n * Which step of a grant's life an audit row records.\n *\n * Distinct from {@link PlatformAccessGrantStatus}: a status is where the grant IS, a transition is\n * what just happened to it. They differ where it matters — an auto-approved grant lands in `ACTIVE`\n * through `REQUESTED`, never through `APPROVED`, and collapsing the two would erase exactly the\n * distinction a customer audit asks about.\n */\nexport enum PlatformAccessGrantLifecycleTransition {\n REQUESTED = 'requested',\n APPROVED = 'approved',\n DENIED = 'denied',\n REVOKED = 'revoked',\n /**\n * The window elapsed and the sweep relabelled the grant (#413). The ONE transition with no human\n * actor — every other member records a decision somebody made, so an audit row for this one\n * carries no `decidedByUserId`, and that absence is the fact rather than a gap.\n *\n * It is recorded even though the label is bookkeeping and never the control: a customer reading\n * the history of an operator's access to their tenant should see the access END, and a grant that\n * simply stops appearing as ACTIVE with no corresponding row is the version of that history that\n * raises questions.\n */\n EXPIRED = 'expired',\n}\n\n/** Why a grant became {@link PlatformAccessGrantStatus.ACTIVE} without a tenant administrator acting. */\nexport enum PlatformAccessGrantAutoApprovalReason {\n /** The tenant has not opted into approval. The default posture, matching Lockbox being opt-in. */\n TENANT_APPROVAL_NOT_REQUIRED = 'tenant_approval_not_required',\n /**\n * The tenant has NO administratively usable owner, so no principal exists who could approve.\n * Evaluated with the owner floor's own predicate — see this file's header for why the alternative\n * (refusing) is circular. Recorded at high severity: this is the one path where operator access\n * proceeds against a tenant that never consented and never could.\n */\n TENANT_CANNOT_APPROVE = 'tenant_cannot_approve',\n}\n\n/** Fixed replacement for grant free-text that cannot be cleared (a `.min(1)` field). */\nconst ERASED_GRANT_TEXT = '[erased]';\n\n/**\n * The default life of a grant whose request names no duration.\n *\n * ONE HOUR, and deliberately far below the ceiling. A request that states no duration is the\n * unconsidered case, and the unconsidered case should get the narrowest window that still works —\n * not the widest the system allows. Until 2026-09-08 this was 240, equal to the maximum, so every\n * grant that did not ask was issued a four-hour elevation; that is the opposite of what a\n * just-in-time mechanism is for.\n *\n * Sixty rather than thirty, and the reasoning is the part worth keeping: the failure mode of a\n * too-short default is not a security one, it is that an operator re-requesting mid-incident learns\n * to ask for the maximum every time — which would restore the old behaviour through the front door\n * and make the ceiling the effective default. An hour covers an ordinary support interaction\n * without teaching that habit. An operator who genuinely needs longer asks, and that ask is the\n * record we want.\n */\nexport const PLATFORM_ACCESS_GRANT_DEFAULT_DURATION_MINUTES = 60;\n\n/**\n * The maximum life of a grant, whatever a request asks for.\n *\n * Four hours is a working session, not a working week: long enough that an operator is not\n * re-requesting mid-incident, short enough that a forgotten grant is not a standing privilege by\n * another name. Callers may request LESS; the ceiling is enforced server-side so a client cannot\n * mint a long-lived elevation by asking for one.\n */\nexport const PLATFORM_ACCESS_GRANT_MAXIMUM_DURATION_MINUTES = 240;\n\n/** Statuses from which a grant can still be withdrawn. */\nexport const PLATFORM_ACCESS_GRANT_REVOCABLE_STATUSES: readonly PlatformAccessGrantStatus[] = [\n PlatformAccessGrantStatus.PENDING_APPROVAL,\n PlatformAccessGrantStatus.ACTIVE,\n];\n\nexport const PlatformAccessGrantSchema = z.object({\n _id: z.string().min(1).isPrimaryKey().isSummaryField(),\n\n /**\n * The TARGET tenant — the one being reached into, never the operator's own.\n *\n * This is the scope anchor: the grant is an organization-scoped row so the tenant can see, approve\n * and revoke elevations raised against it. A grant the tenant cannot see would defeat the point of\n * modelling consent at all.\n */\n organizationId: z.string().min(1).isDBIndexed().isForeignKey().isSummaryField().excludeFromUpdate().isAuditEvidence(),\n\n /** The operator who requested the elevation. Server-authored from the session, never client-supplied. */\n operatorUserId: z.string().min(1).isDBIndexed().isForeignKey().isSummaryField().excludeFromCreate().excludeFromUpdate().isAuditEvidence(),\n\n /**\n * Why the operator needs access. REQUIRED, and deliberately not optional anywhere in the flow.\n *\n * An elevation record without a reason answers \"who and when\" but not \"why\", which is the only\n * question a reviewer or a customer actually asks. `AC-2(7)` wants privileged assignment monitored;\n * an unexplained monitored assignment is a log line, not a control.\n */\n // USER_CONTENT — free prose an OPERATOR typed, about why they need to reach a customer tenant.\n // The data subject here is the operator, not the tenant's users; a notice covering staff must\n // enumerate it, and it is exactly the free-text surface that can name a third party in passing.\n // MASK on erasure, not REMOVE: `.min(1)` makes this non-clearable, so a null would be rejected by the\n // strict update-DTO parse the impersonalize writer runs. A fixed non-empty string is accepted.\n // It must be scrubbed at all because it is free text an operator wrote about why they needed\n // access — exactly the surface that names a third party in passing.\n justification: addImpersonalizeWith(\n z.string().min(1).max(1000).isSummaryField()\n .dataCategories(PersonalDataCategory.USER_CONTENT),\n RedactionType.MASK,\n { maskValue: ERASED_GRANT_TEXT },\n ),\n\n status: z.enum(PlatformAccessGrantStatus)\n .systemEnum('PlatformAccessGrantStatus')\n .default(PlatformAccessGrantStatus.PENDING_APPROVAL)\n .isDBIndexed()\n .isSummaryField()\n .excludeFromCreate()\n .excludeFromUpdate()\n .isAuditEvidence(),\n\n /**\n * When the elevation stops working.\n *\n * Server-authored from the requested duration, clamped to\n * {@link PLATFORM_ACCESS_GRANT_MAXIMUM_DURATION_MINUTES}. The admission predicate reads THIS field\n * rather than trusting `status`, so expiry needs no sweeper to take effect.\n */\n expiresAt: z.date().isDBIndexed().isSummaryField().excludeFromCreate().excludeFromUpdate().isAuditEvidence(),\n\n /** Set when a tenant administrator approved. Absent on an auto-approved grant — see {@link autoApprovalReason}. */\n approvedByUserId: z.string().min(1).optional().isForeignKey().excludeFromCreate().excludeFromUpdate().isAuditEvidence(),\n approvedAt: z.date().optional().excludeFromCreate().excludeFromUpdate(),\n\n /**\n * Present exactly when the grant became ACTIVE with no tenant administrator acting.\n *\n * Its absence on an ACTIVE grant is therefore meaningful: a human in the tenant approved it. That\n * distinction is what a customer audit needs and what a single `approved: true` boolean would erase.\n */\n autoApprovalReason: z.enum(PlatformAccessGrantAutoApprovalReason)\n .systemEnum('PlatformAccessGrantAutoApprovalReason')\n .optional()\n .excludeFromCreate()\n .excludeFromUpdate()\n .isAuditEvidence(),\n\n /** The tenant's reason for refusing, or the revoker's reason for withdrawing. */\n // REMOVE — free text again, and clearable (`.optional()`).\n decisionReason: addImpersonalizeWith(\n z.string().max(1000).optional().excludeFromCreate().excludeFromUpdate()\n .dataCategories(PersonalDataCategory.USER_CONTENT),\n RedactionType.REMOVE,\n ),\n\n createdAt: z.date().optional(),\n updatedAt: z.date().optional(),\n});\n\nexport type PlatformAccessGrant = z.infer<typeof PlatformAccessGrantSchema>;\n\n/**\n * Is this grant usable RIGHT NOW?\n *\n * The single predicate every consumer must use — the admission check, the tenant's UI, and any\n * report. Two independent conditions, and the expiry half is why this is a function rather than a\n * status comparison: a grant whose window elapsed is unusable the moment it elapses, with no writer\n * involved. Reading `status === ACTIVE` alone would honour a stale row for as long as no sweeper had\n * run, turning a time-bound elevation back into a standing one.\n *\n * `now` is injected so callers can evaluate a grant at a decision time they already fixed, and so\n * this stays testable without clock control.\n */\nexport function isPlatformAccessGrantUsable(\n grant: Pick<PlatformAccessGrant, 'status' | 'expiresAt'> | undefined,\n now: Date,\n): boolean {\n if (!grant) return false;\n if (grant.status !== PlatformAccessGrantStatus.ACTIVE) return false;\n return grant.expiresAt instanceof Date\n ? grant.expiresAt.getTime() > now.getTime()\n : new Date(grant.expiresAt).getTime() > now.getTime();\n}\n\n/**\n * Clamp a requested duration to the server-side ceiling.\n *\n * Applied to every request path, including trusted ones. A caller asking for a longer window is not\n * refused — being told \"no, ask again with a smaller number\" during an incident is friction with no\n * security benefit, since the ceiling is what actually binds. They simply get the ceiling.\n */\nexport function resolvePlatformAccessGrantExpiry(requestedDurationMinutes: number | undefined, now: Date): Date {\n const requested = requestedDurationMinutes && requestedDurationMinutes > 0\n ? requestedDurationMinutes\n : PLATFORM_ACCESS_GRANT_DEFAULT_DURATION_MINUTES;\n const minutes = Math.min(requested, PLATFORM_ACCESS_GRANT_MAXIMUM_DURATION_MINUTES);\n return new Date(now.getTime() + minutes * 60_000);\n}\n\n/**\n * NOTE ON PLACEMENT — this enum lives with the VOCABULARY, not with the resource configuration,\n * and moving it back would reintroduce a real defect.\n *\n * The authorization layer needs `REQUEST_ACCESS` by name (it is the bootstrap verb, exempt from the\n * grant requirement it bootstraps). Importing that value from the resources-config module dragged\n * resource-configuration evaluation into the authorizer's module graph, and schema construction that\n * runs before the Zod decorators are initialised loses decorator metadata — which surfaced, far from\n * here, as the ephemeral-disclosure catalogue losing an operation-level declaration. A vocabulary has\n * no such side effects.\n */\n/**\n * Custom verbs. Ordinary CREATE/UPDATE/DELETE are deliberately NOT exposed:\n *\n * - CREATE would let a caller author `status`, `expiresAt` and `operatorUserId` directly, which are\n * precisely the fields whose server authorship IS the control.\n * - UPDATE would be a second, ungated path to the status transitions `approve`/`deny`/`revoke` own.\n * - DELETE exists but has NO client door — see its configuration below. An elevation either side could\n * erase is not evidence; the terminal statuses (DENIED / EXPIRED / REVOKED) are how a grant ends.\n */\nexport enum PlatformAccessGrants_Operations {\n REQUEST_ACCESS = 'requestAccess',\n APPROVE = 'approve',\n DENY = 'deny',\n REVOKE = 'revoke',\n /**\n * ACTIVE → EXPIRED once the window has elapsed, dispatched by the credential-expiry sweep and by\n * nothing else (#413). Not an operator verb: an operator who wants access to end early uses\n * REVOKE, and nobody needs a button that declares a date has passed.\n */\n EXPIRE = 'expire',\n}\n"]}
1
+ {"version":3,"file":"platform-access-grants.shared.schemas.js","sourceRoot":"","sources":["../../../../src/security/authorizations/platform-access-grants.shared.schemas.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6CG;AAEH,O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AS;IAET,IAAI,CAAC,KAAK;QAAE,OAAO,KAAK,CAAC;IACzB,IAAI,KAAK,CAAC,MAAM,KAAK,yBAAyB,CAAC,MAAM;QAAE,OAAO,KAAK,CAAC;IACpE,OAAO,KAAK,CAAC,SAAS,YAAY,IAAI;QACpC,CAAC,CAAC,KAAK,CAAC,SAAS,CAAC,OAAO,EAAE,GAAG,GAAG,CAAC,OAAO,EAAE;QAC3C,CAAC,CAAC,IAAI,IAAI,CAAC,KAAK,CAAC,SAAS,CAAC,CAAC,OAAO,EAAE,GAAG,GAAG,CAAC,OAAO,EAAE,CAAC;AAC1D,CAAC;AAED;;;;;;GAMG;AACH,MAAM,UAAU,gCAAgC,CAAC,wBAA4C,EAAE,GAAS;IACtG,MAAM,SAAS,GAAG,wBAAwB,IAAI,wBAAwB,GAAG,CAAC;QACxE,CAAC,CAAC,wBAAwB;QAC1B,CAAC,CAAC,8CAA8C,CAAC;IACnD,MAAM,OAAO,GAAG,IAAI,CAAC,GAAG,CAAC,SAAS,EAAE,8CAA8C,CAAC,CAAC;IACpF,OAAO,IAAI,IAAI,CAAC,GAAG,CAAC,OAAO,EAAE,GAAG,OAAO,GAAG,MAAM,CAAC,CAAC;AACpD,CAAC;AAED;;;;;;;;;;GAUG;AACH;;;;;;;;GAQG;AACH,MAAM,CAAN,IAAY,+BAWX;AAXD,WAAY,+BAA+B;IACzC,mEAAgC,CAAA;IAChC,sDAAmB,CAAA;IACnB,gDAAa,CAAA;IACb,oDAAiB,CAAA;IACjB;;;;OAIG;IACH,oDAAiB,CAAA;AACnB,CAAC,EAXW,+BAA+B,KAA/B,+BAA+B,QAW1C","sourcesContent":["/**\n * Platform Access Grants — time-bound, justified, optionally tenant-approved elevation that lets a\n * platform operator cross the tenant boundary.\n *\n * ## Where this sits\n *\n * Wildo's answer to \"may a platform super-administrator administer any tenant?\" is YES, as at most\n * B2B platforms. The question this resource answers is the narrower one that follows: *on what\n * terms?* The progression, recorded in `.claude/rules/administrative-continuity-floors.md`:\n *\n * ambient+unaudited → ambient+audited → declared, deny-by-default → **JIT/time-bound (here)**\n * → customer-approved (here, when the tenant opts in)\n *\n * Declaring a crossing per operation variant (`admitsCrossTenantPlatformAdministration`) removed\n * AMBIENT authority: a crossing must now be asked for in code, reviewed, and specified. It did not\n * remove STANDING authority — every platform administrator still held every declared crossing,\n * permanently, over every tenant. That is the shape zero-standing-privilege programmes exist to\n * eliminate, and what NIST SP 800-53 AC-2 / AC-6(1) mean by least privilege: privileged access is\n * requested, scoped, time-boxed, and expires on its own.\n *\n * A grant is therefore required IN ADDITION to the variant's declaration. The declaration says\n * \"this verb MAY cross\"; the grant says \"this operator MAY cross into THIS tenant, until THIS time,\n * for THIS reason\". Neither is sufficient alone.\n *\n * ## The tenant-approval half (Lockbox)\n *\n * Microsoft Customer Lockbox and Google Access Approval let the CUSTOMER approve provider access\n * before it happens. Wildo models that as {@link PlatformAccessGrantStatus.PENDING_APPROVAL}, gated\n * per tenant so it is an opt-in posture rather than a deployment-wide one — the same shape those\n * products ship, and for the same reason: a tenant that has not staffed an approver must not be\n * unable to receive support.\n *\n * ## ⚠️ The interaction that is easy to get wrong\n *\n * Tenant approval and the administrative-continuity floors are in direct tension. Approval requires\n * an administrator; the floors exist precisely because a tenant can end up WITHOUT one. Requiring a\n * stranded tenant to approve its own repair is circular — the tenant cannot approve, so the repair\n * cannot happen, so the tenant stays stranded.\n *\n * This is resolved by measurement, not by exception: when the target tenant has no administratively\n * usable owner, the grant is auto-approved with\n * {@link PlatformAccessGrantAutoApprovalReason.TENANT_CANNOT_APPROVE} and recorded loudly. The\n * condition is evaluated with the SAME predicate the owner floor uses to refuse writes, so the two\n * can never disagree about whether a tenant can administer itself. An operator cannot manufacture\n * the condition either: stranding a tenant is exactly what the floors refuse.\n */\n\nimport { z } from 'zod';\nimport { PersonalDataCategory } from '../../compliance/privacy/personal-data-category.shared.schemas';\nimport { RedactionType } from '../../compliance/privacy/redaction.shared.schemas';\nimport { addImpersonalizeWith } from '@wildo-ai/zod-decorators';\n\n/**\n * WHAT an elevation reaches, and therefore WHO can approve it.\n *\n * A closed two-member vocabulary with one named runtime source, because the two members answer a\n * question no boolean can carry: approval AUTHORITY follows scope. A `TENANT` grant names one\n * organization and is approved by that organization (the Lockbox posture); an `APPLICATION_WIDE`\n * grant names none, so there is no customer to ask and approval falls to a SECOND platform\n * administrator under the two-person rule.\n *\n * It exists as a vocabulary rather than being inferred from which resource a row came from because\n * the AUDIT TRAIL needs it: `authorizingGrantId` on a crossing names a row id, and a reviewer given\n * only an id cannot tell which of the two collections to look in. Carrying the scope beside the id\n * is what makes the join mechanical instead of a guess.\n */\nexport enum PlatformAccessGrantScope {\n /** Scoped to ONE named organization. Approved by that organization, or auto-approved per its posture. */\n TENANT = 'tenant',\n /**\n * Application-wide: an unconfined directory read or a declared cross-tenant read that names no\n * single tenant. Approved by a SECOND platform administrator — never the requester.\n */\n APPLICATION_WIDE = 'application_wide',\n}\n\n/**\n * Lifecycle of one elevation request.\n *\n * A closed vocabulary with one named runtime source: schemas, guards, fixtures and comparisons all\n * derive from this enum rather than repeating literals.\n */\nexport enum PlatformAccessGrantStatus {\n /** Awaiting a decision from an administrator of the TARGET tenant (Lockbox posture). */\n PENDING_APPROVAL = 'pending_approval',\n /** Usable now. The admission predicate accepts this status, and only while unexpired. */\n ACTIVE = 'active',\n /** The tenant refused. Terminal — a new request must be raised rather than this one retried. */\n DENIED = 'denied',\n /**\n * The window elapsed. Terminal, and written by the credential-expiry sweep since 2026-09-08\n * (#413) — before that it was reached by NO writer at all, so an elapsed grant read as ACTIVE\n * forever in the customer-facing listing of its own resource.\n *\n * The label is still bookkeeping for humans and reporting, NEVER the control: the admission\n * predicate compares `expiresAt` against now, so an expired grant stops working whether or not\n * the sweep has run. That separation is deliberate and must survive — if admission ever starts\n * reading this label, a lagging sweep becomes an authorization hole rather than a stale display.\n */\n EXPIRED = 'expired',\n /** Withdrawn before expiry, by the tenant or by the platform. Terminal. */\n REVOKED = 'revoked',\n}\n\n/**\n * Which step of a grant's life an audit row records.\n *\n * Distinct from {@link PlatformAccessGrantStatus}: a status is where the grant IS, a transition is\n * what just happened to it. They differ where it matters — an auto-approved grant lands in `ACTIVE`\n * through `REQUESTED`, never through `APPROVED`, and collapsing the two would erase exactly the\n * distinction a customer audit asks about.\n */\nexport enum PlatformAccessGrantLifecycleTransition {\n REQUESTED = 'requested',\n APPROVED = 'approved',\n DENIED = 'denied',\n REVOKED = 'revoked',\n /**\n * The window elapsed and the sweep relabelled the grant (#413). The ONE transition with no human\n * actor — every other member records a decision somebody made, so an audit row for this one\n * carries no `decidedByUserId`, and that absence is the fact rather than a gap.\n *\n * It is recorded even though the label is bookkeeping and never the control: a customer reading\n * the history of an operator's access to their tenant should see the access END, and a grant that\n * simply stops appearing as ACTIVE with no corresponding row is the version of that history that\n * raises questions.\n */\n EXPIRED = 'expired',\n}\n\n/** Why a grant became {@link PlatformAccessGrantStatus.ACTIVE} without a tenant administrator acting. */\nexport enum PlatformAccessGrantAutoApprovalReason {\n /** The tenant has not opted into approval. The default posture, matching Lockbox being opt-in. */\n TENANT_APPROVAL_NOT_REQUIRED = 'tenant_approval_not_required',\n /**\n * The tenant has NO administratively usable owner, so no principal exists who could approve.\n * Evaluated with the owner floor's own predicate — see this file's header for why the alternative\n * (refusing) is circular. Recorded at high severity: this is the one path where operator access\n * proceeds against a tenant that never consented and never could.\n */\n TENANT_CANNOT_APPROVE = 'tenant_cannot_approve',\n}\n\n/** Fixed replacement for grant free-text that cannot be cleared (a `.min(1)` field). */\nconst ERASED_GRANT_TEXT = '[erased]';\n\n/**\n * The default life of a grant whose request names no duration.\n *\n * ONE HOUR, and deliberately far below the ceiling. A request that states no duration is the\n * unconsidered case, and the unconsidered case should get the narrowest window that still works —\n * not the widest the system allows. Until 2026-09-08 this was 240, equal to the maximum, so every\n * grant that did not ask was issued a four-hour elevation; that is the opposite of what a\n * just-in-time mechanism is for.\n *\n * Sixty rather than thirty, and the reasoning is the part worth keeping: the failure mode of a\n * too-short default is not a security one, it is that an operator re-requesting mid-incident learns\n * to ask for the maximum every time — which would restore the old behaviour through the front door\n * and make the ceiling the effective default. An hour covers an ordinary support interaction\n * without teaching that habit. An operator who genuinely needs longer asks, and that ask is the\n * record we want.\n */\nexport const PLATFORM_ACCESS_GRANT_DEFAULT_DURATION_MINUTES = 60;\n\n/**\n * The maximum life of a grant, whatever a request asks for.\n *\n * Four hours is a working session, not a working week: long enough that an operator is not\n * re-requesting mid-incident, short enough that a forgotten grant is not a standing privilege by\n * another name. Callers may request LESS; the ceiling is enforced server-side so a client cannot\n * mint a long-lived elevation by asking for one.\n */\nexport const PLATFORM_ACCESS_GRANT_MAXIMUM_DURATION_MINUTES = 240;\n\n/** Statuses from which a grant can still be withdrawn. */\nexport const PLATFORM_ACCESS_GRANT_REVOCABLE_STATUSES: readonly PlatformAccessGrantStatus[] = [\n PlatformAccessGrantStatus.PENDING_APPROVAL,\n PlatformAccessGrantStatus.ACTIVE,\n];\n\nexport const PlatformAccessGrantSchema = z.object({\n _id: z.string().min(1).isPrimaryKey().isSummaryField(),\n\n /**\n * The TARGET tenant — the one being reached into, never the operator's own.\n *\n * This is the scope anchor: the grant is an organization-scoped row so the tenant can see, approve\n * and revoke elevations raised against it. A grant the tenant cannot see would defeat the point of\n * modelling consent at all.\n */\n organizationId: z.string().min(1).isDBIndexed().isForeignKey().isSummaryField().excludeFromUpdate().isAuditEvidence(),\n\n /** The operator who requested the elevation. Server-authored from the session, never client-supplied. */\n operatorUserId: z.string().min(1).isDBIndexed().isForeignKey().isSummaryField().excludeFromCreate().excludeFromUpdate().isAuditEvidence(),\n\n /**\n * Why the operator needs access. REQUIRED, and deliberately not optional anywhere in the flow.\n *\n * An elevation record without a reason answers \"who and when\" but not \"why\", which is the only\n * question a reviewer or a customer actually asks. `AC-2(7)` wants privileged assignment monitored;\n * an unexplained monitored assignment is a log line, not a control.\n */\n // USER_CONTENT — free prose an OPERATOR typed, about why they need to reach a customer tenant.\n // The data subject here is the operator, not the tenant's users; a notice covering staff must\n // enumerate it, and it is exactly the free-text surface that can name a third party in passing.\n // MASK on erasure, not REMOVE: `.min(1)` makes this non-clearable, so a null would be rejected by the\n // strict update-DTO parse the impersonalize writer runs. A fixed non-empty string is accepted.\n // It must be scrubbed at all because it is free text an operator wrote about why they needed\n // access — exactly the surface that names a third party in passing.\n justification: addImpersonalizeWith(\n z.string().min(1).max(1000).isSummaryField()\n .dataCategories(PersonalDataCategory.USER_CONTENT),\n RedactionType.MASK,\n { maskValue: ERASED_GRANT_TEXT },\n ),\n\n status: z.enum(PlatformAccessGrantStatus)\n .systemEnum('PlatformAccessGrantStatus')\n .default(PlatformAccessGrantStatus.PENDING_APPROVAL)\n .isDBIndexed()\n .isSummaryField()\n .excludeFromCreate()\n .excludeFromUpdate()\n .isAuditEvidence(),\n\n /**\n * When the elevation stops working.\n *\n * Server-authored from the requested duration, clamped to\n * {@link PLATFORM_ACCESS_GRANT_MAXIMUM_DURATION_MINUTES}. The admission predicate reads THIS field\n * rather than trusting `status`, so expiry needs no sweeper to take effect.\n */\n expiresAt: z.date().isDBIndexed().isSummaryField().excludeFromCreate().excludeFromUpdate().isAuditEvidence(),\n\n /** Set when a tenant administrator approved. Absent on an auto-approved grant — see {@link autoApprovalReason}. */\n approvedByUserId: z.string().min(1).optional().isForeignKey().excludeFromCreate().excludeFromUpdate().isAuditEvidence(),\n approvedAt: z.date().optional().excludeFromCreate().excludeFromUpdate(),\n\n /**\n * Present exactly when the grant became ACTIVE with no tenant administrator acting.\n *\n * Its absence on an ACTIVE grant is therefore meaningful: a human in the tenant approved it. That\n * distinction is what a customer audit needs and what a single `approved: true` boolean would erase.\n */\n autoApprovalReason: z.enum(PlatformAccessGrantAutoApprovalReason)\n .systemEnum('PlatformAccessGrantAutoApprovalReason')\n .optional()\n .excludeFromCreate()\n .excludeFromUpdate()\n .isAuditEvidence(),\n\n /** The tenant's reason for refusing, or the revoker's reason for withdrawing. */\n // REMOVE — free text again, and clearable (`.optional()`).\n decisionReason: addImpersonalizeWith(\n z.string().max(1000).optional().excludeFromCreate().excludeFromUpdate()\n .dataCategories(PersonalDataCategory.USER_CONTENT),\n RedactionType.REMOVE,\n ),\n\n createdAt: z.date().optional(),\n updatedAt: z.date().optional(),\n});\n\nexport type PlatformAccessGrant = z.infer<typeof PlatformAccessGrantSchema>;\n\n/**\n * Is this grant usable RIGHT NOW?\n *\n * The single predicate every consumer must use — the admission check, the tenant's UI, and any\n * report. Two independent conditions, and the expiry half is why this is a function rather than a\n * status comparison: a grant whose window elapsed is unusable the moment it elapses, with no writer\n * involved. Reading `status === ACTIVE` alone would honour a stale row for as long as no sweeper had\n * run, turning a time-bound elevation back into a standing one.\n *\n * `now` is injected so callers can evaluate a grant at a decision time they already fixed, and so\n * this stays testable without clock control.\n */\nexport function isPlatformAccessGrantUsable(\n grant: Pick<PlatformAccessGrant, 'status' | 'expiresAt'> | undefined,\n now: Date,\n): boolean {\n if (!grant) return false;\n if (grant.status !== PlatformAccessGrantStatus.ACTIVE) return false;\n return grant.expiresAt instanceof Date\n ? grant.expiresAt.getTime() > now.getTime()\n : new Date(grant.expiresAt).getTime() > now.getTime();\n}\n\n/**\n * Clamp a requested duration to the server-side ceiling.\n *\n * Applied to every request path, including trusted ones. A caller asking for a longer window is not\n * refused — being told \"no, ask again with a smaller number\" during an incident is friction with no\n * security benefit, since the ceiling is what actually binds. They simply get the ceiling.\n */\nexport function resolvePlatformAccessGrantExpiry(requestedDurationMinutes: number | undefined, now: Date): Date {\n const requested = requestedDurationMinutes && requestedDurationMinutes > 0\n ? requestedDurationMinutes\n : PLATFORM_ACCESS_GRANT_DEFAULT_DURATION_MINUTES;\n const minutes = Math.min(requested, PLATFORM_ACCESS_GRANT_MAXIMUM_DURATION_MINUTES);\n return new Date(now.getTime() + minutes * 60_000);\n}\n\n/**\n * NOTE ON PLACEMENT — this enum lives with the VOCABULARY, not with the resource configuration,\n * and moving it back would reintroduce a real defect.\n *\n * The authorization layer needs `REQUEST_ACCESS` by name (it is the bootstrap verb, exempt from the\n * grant requirement it bootstraps). Importing that value from the resources-config module dragged\n * resource-configuration evaluation into the authorizer's module graph, and schema construction that\n * runs before the Zod decorators are initialised loses decorator metadata — which surfaced, far from\n * here, as the ephemeral-disclosure catalogue losing an operation-level declaration. A vocabulary has\n * no such side effects.\n */\n/**\n * Custom verbs. Ordinary CREATE/UPDATE/DELETE are deliberately NOT exposed:\n *\n * - CREATE would let a caller author `status`, `expiresAt` and `operatorUserId` directly, which are\n * precisely the fields whose server authorship IS the control.\n * - UPDATE would be a second, ungated path to the status transitions `approve`/`deny`/`revoke` own.\n * - DELETE exists but has NO client door — see its configuration below. An elevation either side could\n * erase is not evidence; the terminal statuses (DENIED / EXPIRED / REVOKED) are how a grant ends.\n */\nexport enum PlatformAccessGrants_Operations {\n REQUEST_ACCESS = 'requestAccess',\n APPROVE = 'approve',\n DENY = 'deny',\n REVOKE = 'revoke',\n /**\n * ACTIVE → EXPIRED once the window has elapsed, dispatched by the credential-expiry sweep and by\n * nothing else (#413). Not an operator verb: an operator who wants access to end early uses\n * REVOKE, and nobody needs a button that declares a date has passed.\n */\n EXPIRE = 'expire',\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"roles.shared.defaults.d.ts","sourceRoot":"","sources":["../../../../../src/security/authorizations/roles.shared.defaults.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAGH,OAAO,EAAkC,kBAAkB,EAAE,MAAM,wBAAwB,CAAC;AAE5F,eAAO,MAAM,8BAA8B,EAAE,kBA0D5C,CAAC;AAEF,eAAO,MAAM,0BAA0B,EAAE,kBA0ExC,CAAC"}
1
+ {"version":3,"file":"roles.shared.defaults.d.ts","sourceRoot":"","sources":["../../../../src/security/authorizations/roles.shared.defaults.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAGH,OAAO,EAAkC,kBAAkB,EAAE,MAAM,wBAAwB,CAAC;AAE5F,eAAO,MAAM,8BAA8B,EAAE,kBA0D5C,CAAC;AAEF,eAAO,MAAM,0BAA0B,EAAE,kBA0ExC,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"roles.shared.defaults.js","sourceRoot":"","sources":["../../../../../src/security/authorizations/roles.shared.defaults.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,oBAAoB,EAAE,MAAM,0CAA0C,CAAC;AAChF,OAAO,EAAE,cAAc,EAAE,cAAc,EAAsB,MAAM,wBAAwB,CAAC;AAE5F,MAAM,CAAC,MAAM,8BAA8B,GAAuB;IAChE,CAAC,cAAc,CAAC,UAAU,CAAC,EAAE;QAC3B,IAAI,EAAE,cAAc,CAAC,UAAU;QAC/B,YAAY,EAAE,IAAI;QAClB,mBAAmB,EAAE,oBAAoB,CAAC,WAAW;KACtD;IACD,CAAC,cAAc,CAAC,QAAQ,CAAC,EAAE;QACzB,IAAI,EAAE,cAAc,CAAC,QAAQ;QAC7B,YAAY,EAAE,IAAI;QAClB,mBAAmB,EAAE,oBAAoB,CAAC,WAAW;KACtD;IACD,CAAC,cAAc,CAAC,gBAAgB,CAAC,EAAE;QACjC,IAAI,EAAE,cAAc,CAAC,gBAAgB;QACrC,WAAW,EAAE,cAAc,CAAC,QAAQ;QACpC,YAAY,EAAE,IAAI;QAClB,mBAAmB,EAAE,oBAAoB,CAAC,WAAW;KACtD;IACD,CAAC,cAAc,CAAC,0BAA0B,CAAC,EAAE;QAC3C,IAAI,EAAE,cAAc,CAAC,0BAA0B;QAC/C,WAAW,EAAE,cAAc,CAAC,gBAAgB;QAC5C,YAAY,EAAE,IAAI;QAClB,mBAAmB,EAAE,oBAAoB,CAAC,WAAW;KACtD;IACD,CAAC,cAAc,CAAC,yBAAyB,CAAC,EAAE;QAC1C,IAAI,EAAE,cAAc,CAAC,yBAAyB;QAC9C,WAAW,EAAE,cAAc,CAAC,gBAAgB;QAC5C,YAAY,EAAE,IAAI;QAClB,mBAAmB,EAAE,oBAAoB,CAAC,WAAW;KACtD;IACD,CAAC,cAAc,CAAC,qB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a;KACxD;IACD,CAAC,cAAc,CAAC,8BAA8B,CAAC,EAAE;QAC/C,IAAI,EAAE,cAAc,CAAC,8BAA8B;QACnD,YAAY,EAAE,IAAI;QAClB,mBAAmB,EAAE,oBAAoB,CAAC,aAAa;KACxD;IACD,CAAC,cAAc,CAAC,6BAA6B,CAAC,EAAE;QAC9C,IAAI,EAAE,cAAc,CAAC,6BAA6B;QAClD,YAAY,EAAE,IAAI;QAClB,mBAAmB,EAAE,oBAAoB,CAAC,aAAa;KACxD;IACD,CAAC,cAAc,CAAC,6BAA6B,CAAC,EAAE;QAC9C,IAAI,EAAE,cAAc,CAAC,6BAA6B;QAClD,YAAY,EAAE,IAAI;QAClB,mBAAmB,EAAE,oBAAoB,CAAC,aAAa;KACxD;IACD,CAAC,cAAc,CAAC,mCAAmC,CAAC,EAAE;QACpD,IAAI,EAAE,cAAc,CAAC,mCAAmC;QACxD,YAAY,EAAE,IAAI;QAClB,mBAAmB,EAAE,oBAAoB,CAAC,aAAa;KACxD;CACF,CAAC","sourcesContent":["/**\n * App Roles Shared Schemas\n *\n * Application-level roles directly linked to users (not organization-specific)\n * Similar behavior to OrganizationRole but for app-wide permissions\n */\n\nimport { ResourcePrimaryScope } from '../../resources/resources.shared.schemas';\nimport { CORE_APP_ROLES, CORE_ORG_ROLES, RolesConfiguration } from './roles.shared.schemas';\n\nexport const DEFAULT_APP_ROLE_CONFIGURATION: RolesConfiguration = {\n [CORE_APP_ROLES.APP_PUBLIC]: {\n role: CORE_APP_ROLES.APP_PUBLIC,\n isSystemRole: true,\n relatedPrimaryScope: ResourcePrimaryScope.APPLICATION\n },\n [CORE_APP_ROLES.APP_USER]: {\n role: CORE_APP_ROLES.APP_USER,\n isSystemRole: true,\n relatedPrimaryScope: ResourcePrimaryScope.APPLICATION\n },\n [CORE_APP_ROLES.APP_ADMIN_VIEWER]: {\n role: CORE_APP_ROLES.APP_ADMIN_VIEWER,\n inheritFrom: CORE_APP_ROLES.APP_USER,\n isSystemRole: true,\n relatedPrimaryScope: ResourcePrimaryScope.APPLICATION\n },\n [CORE_APP_ROLES.APP_ADMIN_MARKETING_EDITOR]: {\n role: CORE_APP_ROLES.APP_ADMIN_MARKETING_EDITOR,\n inheritFrom: CORE_APP_ROLES.APP_ADMIN_VIEWER,\n isSystemRole: true,\n relatedPrimaryScope: ResourcePrimaryScope.APPLICATION\n },\n [CORE_APP_ROLES.APP_ADMIN_BILLING_MANAGER]: {\n role: CORE_APP_ROLES.APP_ADMIN_BILLING_MANAGER,\n inheritFrom: CORE_APP_ROLES.APP_ADMIN_VIEWER,\n isSystemRole: true,\n relatedPrimaryScope: ResourcePrimaryScope.APPLICATION\n },\n [CORE_APP_ROLES.APP_ADMIN_SUPER_ADMIN]: {\n role: CORE_APP_ROLES.APP_ADMIN_SUPER_ADMIN,\n inheritFrom: CORE_APP_ROLES.APP_ADMIN_BILLING_MANAGER,\n isSystemRole: true,\n relatedPrimaryScope: ResourcePrimaryScope.APPLICATION\n },\n // No `inheritFrom`: the reader confers exactly the operations that name it. See the enum member.\n [CORE_APP_ROLES.APP_AUDIT_EVIDENCE_READER]: {\n role: CORE_APP_ROLES.APP_AUDIT_EVIDENCE_READER,\n isSystemRole: true,\n relatedPrimaryScope: ResourcePrimaryScope.APPLICATION\n },\n // No `inheritFrom`: handler-only, confers exactly the billing operations that name it (#1629).\n [CORE_APP_ROLES.APP_BILLING_PROVIDER_EVENTS]: {\n role: CORE_APP_ROLES.APP_BILLING_PROVIDER_EVENTS,\n isSystemRole: true,\n relatedPrimaryScope: ResourcePrimaryScope.APPLICATION\n },\n // No `inheritFrom`: handler-only, and no operation names it — the email intake writes as the engine (#1600).\n [CORE_APP_ROLES.APP_EMAIL_INBOUND_INTAKE]: {\n role: CORE_APP_ROLES.APP_EMAIL_INBOUND_INTAKE,\n isSystemRole: true,\n relatedPrimaryScope: ResourcePrimaryScope.APPLICATION\n },\n [CORE_APP_ROLES.APP_ANONYMOUS]: {\n role: CORE_APP_ROLES.APP_ANONYMOUS,\n isSystemRole: true,\n relatedPrimaryScope: ResourcePrimaryScope.APPLICATION\n },\n};\n\nexport const DEFAULT_ORGANIZATION_ROLES: RolesConfiguration = {\n [CORE_ORG_ROLES.ORG_GUEST]: {\n role: CORE_ORG_ROLES.ORG_GUEST,\n isSystemRole: true,\n relatedPrimaryScope: ResourcePrimaryScope.ORGANIZATIONS\n },\n [CORE_ORG_ROLES.ORG_MEMBER]: {\n role: CORE_ORG_ROLES.ORG_MEMBER,\n inheritFrom: CORE_ORG_ROLES.ORG_GUEST,\n isSystemRole: true,\n relatedPrimaryScope: ResourcePrimaryScope.ORGANIZATIONS\n },\n [CORE_ORG_ROLES.ORG_SERVICE_PROVIDER]: {\n role: CORE_ORG_ROLES.ORG_SERVICE_PROVIDER,\n inheritFrom: CORE_ORG_ROLES.ORG_MEMBER,\n isSystemRole: true,\n relatedPrimaryScope: ResourcePrimaryScope.ORGANIZATIONS\n },\n [CORE_ORG_ROLES.ORG_MANAGER]: {\n role: CORE_ORG_ROLES.ORG_MANAGER,\n inheritFrom: CORE_ORG_ROLES.ORG_MEMBER,\n isSystemRole: true,\n relatedPrimaryScope: ResourcePrimaryScope.ORGANIZATIONS\n },\n [CORE_ORG_ROLES.ORG_ADMIN]: {\n role: CORE_ORG_ROLES.ORG_ADMIN,\n inheritFrom: CORE_ORG_ROLES.ORG_MANAGER,\n isSystemRole: true,\n relatedPrimaryScope: ResourcePrimaryScope.ORGANIZATIONS\n },\n [CORE_ORG_ROLES.ORG_OWNER]: {\n role: CORE_ORG_ROLES.ORG_OWNER,\n inheritFrom: CORE_ORG_ROLES.ORG_ADMIN,\n isSystemRole: true,\n relatedPrimaryScope: ResourcePrimaryScope.ORGANIZATIONS\n },\n // No `inheritFrom`: handler-only, confers exactly the billing operations that name it (#1629).\n [CORE_ORG_ROLES.ORG_BILLING_PROVIDER_EVENTS]: {\n role: CORE_ORG_ROLES.ORG_BILLING_PROVIDER_EVENTS,\n isSystemRole: true,\n relatedPrimaryScope: ResourcePrimaryScope.ORGANIZATIONS\n },\n // No `inheritFrom` on any delegated capability (#1631): each confers exactly the operations that name it, and\n // inheriting anything would make a lent capability's reach a function of what that role grows into later.\n [CORE_ORG_ROLES.ORG_DELEGATED_INVITE_MEMBERS]: {\n role: CORE_ORG_ROLES.ORG_DELEGATED_INVITE_MEMBERS,\n isSystemRole: true,\n relatedPrimaryScope: ResourcePrimaryScope.ORGANIZATIONS\n },\n [CORE_ORG_ROLES.ORG_DELEGATED_MANAGE_RELATIONSHIP_EXPERTS]: {\n role: CORE_ORG_ROLES.ORG_DELEGATED_MANAGE_RELATIONSHIP_EXPERTS,\n isSystemRole: true,\n relatedPrimaryScope: ResourcePrimaryScope.ORGANIZATIONS\n },\n [CORE_ORG_ROLES.ORG_DELEGATED_READ_AUDIT_TRAIL]: {\n role: CORE_ORG_ROLES.ORG_DELEGATED_READ_AUDIT_TRAIL,\n isSystemRole: true,\n relatedPrimaryScope: ResourcePrimaryScope.ORGANIZATIONS\n },\n [CORE_ORG_ROLES.ORG_DELEGATED_MANAGE_SSO_SCIM]: {\n role: CORE_ORG_ROLES.ORG_DELEGATED_MANAGE_SSO_SCIM,\n isSystemRole: true,\n relatedPrimaryScope: ResourcePrimaryScope.ORGANIZATIONS\n },\n [CORE_ORG_ROLES.ORG_DELEGATED_MANAGE_API_KEYS]: {\n role: CORE_ORG_ROLES.ORG_DELEGATED_MANAGE_API_KEYS,\n isSystemRole: true,\n relatedPrimaryScope: ResourcePrimaryScope.ORGANIZATIONS\n },\n [CORE_ORG_ROLES.ORG_DELEGATED_APPROVE_ACCESS_GRANTS]: {\n role: CORE_ORG_ROLES.ORG_DELEGATED_APPROVE_ACCESS_GRANTS,\n isSystemRole: true,\n relatedPrimaryScope: ResourcePrimaryScope.ORGANIZATIONS\n }\n};\n\n"]}
1
+ {"version":3,"file":"roles.shared.defaults.js","sourceRoot":"","sources":["../../../../src/security/authorizations/roles.shared.defaults.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH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C,cAAc,CAAC,6BAA6B,CAAC,EAAE;QAC9C,IAAI,EAAE,cAAc,CAAC,6BAA6B;QAClD,YAAY,EAAE,IAAI;QAClB,mBAAmB,EAAE,oBAAoB,CAAC,aAAa;KACxD;IACD,CAAC,cAAc,CAAC,6BAA6B,CAAC,EAAE;QAC9C,IAAI,EAAE,cAAc,CAAC,6BAA6B;QAClD,YAAY,EAAE,IAAI;QAClB,mBAAmB,EAAE,oBAAoB,CAAC,aAAa;KACxD;IACD,CAAC,cAAc,CAAC,mCAAmC,CAAC,EAAE;QACpD,IAAI,EAAE,cAAc,CAAC,mCAAmC;QACxD,YAAY,EAAE,IAAI;QAClB,mBAAmB,EAAE,oBAAoB,CAAC,aAAa;KACxD;CACF,CAAC","sourcesContent":["/**\n * App Roles Shared Schemas\n *\n * Application-level roles directly linked to users (not organization-specific)\n * Similar behavior to OrganizationRole but for app-wide permissions\n */\n\nimport { ResourcePrimaryScope } from '../../resources/resources.shared.schemas';\nimport { CORE_APP_ROLES, CORE_ORG_ROLES, RolesConfiguration } from './roles.shared.schemas';\n\nexport const DEFAULT_APP_ROLE_CONFIGURATION: RolesConfiguration = {\n [CORE_APP_ROLES.APP_PUBLIC]: {\n role: CORE_APP_ROLES.APP_PUBLIC,\n isSystemRole: true,\n relatedPrimaryScope: ResourcePrimaryScope.APPLICATION\n },\n [CORE_APP_ROLES.APP_USER]: {\n role: CORE_APP_ROLES.APP_USER,\n isSystemRole: true,\n relatedPrimaryScope: ResourcePrimaryScope.APPLICATION\n },\n [CORE_APP_ROLES.APP_ADMIN_VIEWER]: {\n role: CORE_APP_ROLES.APP_ADMIN_VIEWER,\n inheritFrom: CORE_APP_ROLES.APP_USER,\n isSystemRole: true,\n relatedPrimaryScope: ResourcePrimaryScope.APPLICATION\n },\n [CORE_APP_ROLES.APP_ADMIN_MARKETING_EDITOR]: {\n role: CORE_APP_ROLES.APP_ADMIN_MARKETING_EDITOR,\n inheritFrom: CORE_APP_ROLES.APP_ADMIN_VIEWER,\n isSystemRole: true,\n relatedPrimaryScope: ResourcePrimaryScope.APPLICATION\n },\n [CORE_APP_ROLES.APP_ADMIN_BILLING_MANAGER]: {\n role: CORE_APP_ROLES.APP_ADMIN_BILLING_MANAGER,\n inheritFrom: CORE_APP_ROLES.APP_ADMIN_VIEWER,\n isSystemRole: true,\n relatedPrimaryScope: ResourcePrimaryScope.APPLICATION\n },\n [CORE_APP_ROLES.APP_ADMIN_SUPER_ADMIN]: {\n role: CORE_APP_ROLES.APP_ADMIN_SUPER_ADMIN,\n inheritFrom: CORE_APP_ROLES.APP_ADMIN_BILLING_MANAGER,\n isSystemRole: true,\n relatedPrimaryScope: ResourcePrimaryScope.APPLICATION\n },\n // No `inheritFrom`: the reader confers exactly the operations that name it. See the enum member.\n [CORE_APP_ROLES.APP_AUDIT_EVIDENCE_READER]: {\n role: CORE_APP_ROLES.APP_AUDIT_EVIDENCE_READER,\n isSystemRole: true,\n relatedPrimaryScope: ResourcePrimaryScope.APPLICATION\n },\n // No `inheritFrom`: handler-only, confers exactly the billing operations that name it (#1629).\n [CORE_APP_ROLES.APP_BILLING_PROVIDER_EVENTS]: {\n role: CORE_APP_ROLES.APP_BILLING_PROVIDER_EVENTS,\n isSystemRole: true,\n relatedPrimaryScope: ResourcePrimaryScope.APPLICATION\n },\n // No `inheritFrom`: handler-only, and no operation names it — the email intake writes as the engine (#1600).\n [CORE_APP_ROLES.APP_EMAIL_INBOUND_INTAKE]: {\n role: CORE_APP_ROLES.APP_EMAIL_INBOUND_INTAKE,\n isSystemRole: true,\n relatedPrimaryScope: ResourcePrimaryScope.APPLICATION\n },\n [CORE_APP_ROLES.APP_ANONYMOUS]: {\n role: CORE_APP_ROLES.APP_ANONYMOUS,\n isSystemRole: true,\n relatedPrimaryScope: ResourcePrimaryScope.APPLICATION\n },\n};\n\nexport const DEFAULT_ORGANIZATION_ROLES: RolesConfiguration = {\n [CORE_ORG_ROLES.ORG_GUEST]: {\n role: CORE_ORG_ROLES.ORG_GUEST,\n isSystemRole: true,\n relatedPrimaryScope: ResourcePrimaryScope.ORGANIZATIONS\n },\n [CORE_ORG_ROLES.ORG_MEMBER]: {\n role: CORE_ORG_ROLES.ORG_MEMBER,\n inheritFrom: CORE_ORG_ROLES.ORG_GUEST,\n isSystemRole: true,\n relatedPrimaryScope: ResourcePrimaryScope.ORGANIZATIONS\n },\n [CORE_ORG_ROLES.ORG_SERVICE_PROVIDER]: {\n role: CORE_ORG_ROLES.ORG_SERVICE_PROVIDER,\n inheritFrom: CORE_ORG_ROLES.ORG_MEMBER,\n isSystemRole: true,\n relatedPrimaryScope: ResourcePrimaryScope.ORGANIZATIONS\n },\n [CORE_ORG_ROLES.ORG_MANAGER]: {\n role: CORE_ORG_ROLES.ORG_MANAGER,\n inheritFrom: CORE_ORG_ROLES.ORG_MEMBER,\n isSystemRole: true,\n relatedPrimaryScope: ResourcePrimaryScope.ORGANIZATIONS\n },\n [CORE_ORG_ROLES.ORG_ADMIN]: {\n role: CORE_ORG_ROLES.ORG_ADMIN,\n inheritFrom: CORE_ORG_ROLES.ORG_MANAGER,\n isSystemRole: true,\n relatedPrimaryScope: ResourcePrimaryScope.ORGANIZATIONS\n },\n [CORE_ORG_ROLES.ORG_OWNER]: {\n role: CORE_ORG_ROLES.ORG_OWNER,\n inheritFrom: CORE_ORG_ROLES.ORG_ADMIN,\n isSystemRole: true,\n relatedPrimaryScope: ResourcePrimaryScope.ORGANIZATIONS\n },\n // No `inheritFrom`: handler-only, confers exactly the billing operations that name it (#1629).\n [CORE_ORG_ROLES.ORG_BILLING_PROVIDER_EVENTS]: {\n role: CORE_ORG_ROLES.ORG_BILLING_PROVIDER_EVENTS,\n isSystemRole: true,\n relatedPrimaryScope: ResourcePrimaryScope.ORGANIZATIONS\n },\n // No `inheritFrom` on any delegated capability (#1631): each confers exactly the operations that name it, and\n // inheriting anything would make a lent capability's reach a function of what that role grows into later.\n [CORE_ORG_ROLES.ORG_DELEGATED_INVITE_MEMBERS]: {\n role: CORE_ORG_ROLES.ORG_DELEGATED_INVITE_MEMBERS,\n isSystemRole: true,\n relatedPrimaryScope: ResourcePrimaryScope.ORGANIZATIONS\n },\n [CORE_ORG_ROLES.ORG_DELEGATED_MANAGE_RELATIONSHIP_EXPERTS]: {\n role: CORE_ORG_ROLES.ORG_DELEGATED_MANAGE_RELATIONSHIP_EXPERTS,\n isSystemRole: true,\n relatedPrimaryScope: ResourcePrimaryScope.ORGANIZATIONS\n },\n [CORE_ORG_ROLES.ORG_DELEGATED_READ_AUDIT_TRAIL]: {\n role: CORE_ORG_ROLES.ORG_DELEGATED_READ_AUDIT_TRAIL,\n isSystemRole: true,\n relatedPrimaryScope: ResourcePrimaryScope.ORGANIZATIONS\n },\n [CORE_ORG_ROLES.ORG_DELEGATED_MANAGE_SSO_SCIM]: {\n role: CORE_ORG_ROLES.ORG_DELEGATED_MANAGE_SSO_SCIM,\n isSystemRole: true,\n relatedPrimaryScope: ResourcePrimaryScope.ORGANIZATIONS\n },\n [CORE_ORG_ROLES.ORG_DELEGATED_MANAGE_API_KEYS]: {\n role: CORE_ORG_ROLES.ORG_DELEGATED_MANAGE_API_KEYS,\n isSystemRole: true,\n relatedPrimaryScope: ResourcePrimaryScope.ORGANIZATIONS\n },\n [CORE_ORG_ROLES.ORG_DELEGATED_APPROVE_ACCESS_GRANTS]: {\n role: CORE_ORG_ROLES.ORG_DELEGATED_APPROVE_ACCESS_GRANTS,\n isSystemRole: true,\n relatedPrimaryScope: ResourcePrimaryScope.ORGANIZATIONS\n }\n};\n\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"roles.shared.schemas.d.ts","sourceRoot":"","sources":["../../../../../src/security/authorizations/roles.shared.schemas.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,oBAAoB,EAAE,MAAM,0CAA0C,CAAC;AAEhF,oBAAY,cAAc;IACxB;;;;;;;;;;;;;;;OAeG;IACH,UAAU,eAAe;IACzB,qB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AAoB,CAAC,CAAC;AAElE,eAAO,MAAM,wBAAwB;;;;;kBAYpC,CAAC;AAEF,MAAM,MAAM,KAAK,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,WAAW,CAAC,CAAC;AAChD,MAAM,MAAM,SAAS,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,eAAe,CAAC,CAAC;AACxD,MAAM,MAAM,QAAQ,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,cAAc,CAAC,CAAC;AACtD,MAAM,MAAM,QAAQ,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,cAAc,CAAC,CAAC;AACtD,MAAM,MAAM,kBAAkB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,wBAAwB,CAAC,CAAC"}
1
+ {"version":3,"file":"roles.shared.schemas.d.ts","sourceRoot":"","sources":["../../../../src/security/authorizations/roles.shared.schemas.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,oBAAoB,EAAE,MAAM,0CAA0C,CAAC;AAEhF,oBAAY,cAAc;IACxB;;;;;;;;;;;;;;;OAeG;IACH,UAAU,eAAe;IACzB,qBAAqB,0BAA0B;IAC/C,yBAAyB,8BAA8B;IACvD,0BAA0B,+BAA+B;IACzD,gBAAgB,qBAAqB;IACrC;;;;;;;;;;;;OAYG;IACH,yBAAyB,8BAA8B;IACvD;;;;;;;;OAQG;IACH,2BAA2B,gCAAgC;IAC3D;;;;;;;;OAQG;IACH,wBAAwB,6BAA6B;IACrD,QAAQ,aAAa;IACrB,iGAAiG;IACjG,aAAa,kBAAkB;CAChC;AAED;;;;;;;GAOG;AACH,eAAO,MAAM,qCAAqC,EAAE,SAAS,cAAc,EAUzE,CAAC;AAEH,oBAAY,cAAc;IACxB,SAAS,cAAc;IACvB,SAAS,cAAc;IACvB,SAAS,cAAc;IACvB,WAAW,gBAAgB;IAC3B,UAAU,eAAe;IACzB;;;;;;OAMG;IACH,oBAAoB,y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.shared.schemas.js","sourceRoot":"","sources":["../../../../../src/security/authorizations/roles.shared.schemas.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,oBAAoB,EAAE,MAAM,0CAA0C,CAAC;AAEhF,MAAM,CAAN,IAAY,cA2DX;AA3DD,WAAY,cAAc;IACxB;;;;;;;;;;;;;;;OAeG;IACH,2CAAyB,CAAA;IACzB,iEAA+C,CAAA;IAC/C,yEAAuD,CAAA;IACvD,2EAAyD,CAAA;IACzD,uDAAqC,CAAA;IACrC;;;;;;;;;;;;OAYG;IACH,yEAAuD,CAAA;IACvD;;;;;;;;OAQG;IACH,6EAA2D,CAAA;IAC3D;;;;;;;;OAQG;IACH,uEAAqD,CAAA;IACrD,uCAAqB,CAAA;IACrB,iGAAiG;IACjG,iDAA+B,CAAA;AACjC,CAAC,EA3DW,cAAc,KAAd,cAAc,QA2DzB;AAED;;;;;;;GAOG;AACH,MAAM,CAAC,MAAM,qCAAqC,GAA8B,MAAM,CAAC,MAAM,CAAC;IAC5F,cAAc,CAAC,qBAAqB;IACpC,cAAc,CAAC,yBAAyB;IACxC,cAAc,CAAC,0BAA0B;IACzC,cAAc,CAAC,gBAAgB;IAC/B,+FAA+F;IAC/F,sFAAsF;IACtF,iGAAiG;IACjG,uDAAuD;IACvD,cAAc,CAAC,yBAAyB;CACzC,CAAC,CAAC;AAEH,MAAM,CAAN,IAAY,cA8CX;AA9CD,WAAY,cAAc;IACxB,yCAAuB,CAAA;IACvB,yCAAuB,CAAA;IACvB,yCAAuB,CAAA;IACvB,6CAA2B,CAAA;IAC3B,2CAAyB,CAAA;IACzB;;;;;;OAMG;IACH,+DAA6C,CAAA;IAC7C;;;;;;;;;;;OAWG;IACH,6EAA2D,CAAA;IAC3D;;;;;;OAMG;IACH,6EAA6E;IAC7E,+EAA6D,CAAA;IAC7D,mGAAmG;IACnG,yGAAuF,CAAA;IACvF,2CAA2C;IAC3C,mFAAiE,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,CAAC;AAEH,MAAM,CAAC,MAAM,oBAAoB,GAAG,CAAC,CAAC,MAAM,CAAC;IAC3C,IAAI,EAAE,WAAW;IACjB,WAAW,EAAE,WAAW,CAAC,QAAQ,EAAE;IACnC,YAAY,EAAE,CAAC,CAAC,OAAO,EAAE,CAAC,OAAO,CAAC,KAAK,CAAC;IACxC,mBAAmB,EAAG,CAAC,CAAC,IAAI,CAAC,oBAAoB,CAAC;CACnD,CAAC,CAAC;AAKH,MAAM,CAAC,MAAM,wBAAwB,GAAG,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,MAAM,EAAE,EAAE,oBAAoB,CAAC,CAAC,MAAM,CACvF,CAAC,MAAM,EAAE,EAAE;IACT,yCAAyC;IACzC,OAAO,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,KAAK,CAAC,GAAG,CAAC,EAAE;QACrC,IAAI,CAAC;YACH,WAAW,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;YACvB,OAAO,IAAI,CAAC;QACd,CAAC;QAAC,MAAM,CAAC;YACP,OAAO,KAAK,CAAC;QACf,CAAC;IACH,CAAC,CAAC,CAAC;AACL,CAAC,CACF,CAAC","sourcesContent":["\nimport { z } from 'zod';\nimport { ResourcePrimaryScope } from '../../resources/resources.shared.schemas';\n\nexport enum CORE_APP_ROLES {\n /**\n * Open access: an operation declaring `APP_PUBLIC` requires NO credential, and imposes no role\n * requirement on one that is presented.\n *\n * Not a role anybody is granted — a SENTINEL on the operation's `roles`, which is why the two\n * halves above have to be stated together. \"Accessible without auth\" was the whole comment until\n * 2026-08-31, and it was read as *reachable only when unauthenticated*: every role gate then\n * refused a credentialed caller, so a public price list, catalogue or i18n bundle answered 200 to\n * an anonymous probe and 403 to a logged-in customer (#153). Authenticating must never take access\n * away.\n *\n * `requiredRolesDeclarePublicAccess` in `roles.shared.utils.ts` is the runtime source of this\n * meaning; every gate consults it rather than re-deriving the test. Scope, tenancy and the\n * repository's contextual filter are untouched by the declaration — it says no role is required to\n * ASK, never that no scope confines the answer.\n */\n APP_PUBLIC = 'APP_PUBLIC',\n APP_ADMIN_SUPER_ADMIN = 'APP_ADMIN_SUPER_ADMIN',\n APP_ADMIN_BILLING_MANAGER = 'APP_ADMIN_BILLING_MANAGER',\n APP_ADMIN_MARKETING_EDITOR = 'APP_ADMIN_MARKETING_EDITOR',\n APP_ADMIN_VIEWER = 'APP_ADMIN_VIEWER',\n /**\n * Reads the application-wide audit trail and NOTHING else.\n *\n * Exists so the party that attests the application — an assurance evidence collector's machine\n * credential, or an external auditor — does not have to hold `APP_ADMIN_SUPER_ADMIN`, which until\n * 2026-09-13 was the only role the application audit door accepted. An auditor holding the largest\n * standing privilege in the deployment is the concentration `WILDO.ACCESS.PRIVILEGED_REVIEW` exists\n * to review, so the reader must not be it.\n *\n * Inherits from nothing, deliberately: a collector needs no `APP_USER` capability, and inheriting one\n * would make the role's reach a function of whatever the user tier grows later. Named only by the\n * application audit-log door's read verbs (`APPLICATION_AUDIT_LOG_READ_ROLES`).\n */\n APP_AUDIT_EVIDENCE_READER = 'APP_AUDIT_EVIDENCE_READER',\n /**\n * The engine's billing inbound handler, acting on a signature-verified provider event that belongs to ONE\n * person's billing account (#1629). The user-scope twin of `ORG_BILLING_PROVIDER_EVENTS`: personal\n * (`USER_SELF`) billing variants gate on application roles, so the handler's authority there is an\n * application role, confined to the delivery's scope user by the ownership check.\n *\n * HANDLER-ONLY — a member of {@link INBOUND_HANDLER_ONLY_ROLES}. It confers nothing to a person, an API\n * key or an OAuth client, and inherits from nothing: it grants exactly the billing operations that name it.\n */\n APP_BILLING_PROVIDER_EVENTS = 'APP_BILLING_PROVIDER_EVENTS',\n /**\n * The engine's email intake (#1600): the stage-1 handler that fetches a received message from the provider,\n * routes each recipient address to an organization, stores the message and hands it to the email channel.\n * It writes as the engine's infrastructure and calls NO resource operation, so no operation names this role\n * and it grants nothing — it exists because an application-scope delivery must run as SOME role, and every\n * other role would grant something.\n *\n * HANDLER-ONLY — a member of {@link INBOUND_HANDLER_ONLY_ROLES}. Inherits from nothing.\n */\n APP_EMAIL_INBOUND_INTAKE = 'APP_EMAIL_INBOUND_INTAKE',\n APP_USER = 'APP_USER',\n /** Anonymous session access. Operations with APP_ANONYMOUS are accessible to anonymous users. */\n APP_ANONYMOUS = 'APP_ANONYMOUS',\n}\n\n/**\n * Authorities that administer the generated application itself.\n *\n * This named subset is the canonical boundary used by consumer-facing\n * products such as the API reference. It prevents each downstream consumer\n * from guessing administrative meaning from `APP_ADMIN_` spelling or copying\n * an independent list that drifts when the role vocabulary evolves.\n */\nexport const CORE_APPLICATION_ADMINISTRATION_ROLES: readonly CORE_APP_ROLES[] = Object.freeze([\n CORE_APP_ROLES.APP_ADMIN_SUPER_ADMIN,\n CORE_APP_ROLES.APP_ADMIN_BILLING_MANAGER,\n CORE_APP_ROLES.APP_ADMIN_MARKETING_EDITOR,\n CORE_APP_ROLES.APP_ADMIN_VIEWER,\n // Reading the application's own audit trail is oversight of the APPLICATION, not access to its\n // customer-facing domain — and the API reference files an operation under application\n // administration only when EVERY role it accepts is in this set, so leaving the reader out would\n // move the audit door into the customer API reference.\n CORE_APP_ROLES.APP_AUDIT_EVIDENCE_READER,\n]);\n\nexport enum CORE_ORG_ROLES {\n ORG_GUEST = 'ORG_GUEST',\n ORG_OWNER = 'ORG_OWNER',\n ORG_ADMIN = 'ORG_ADMIN',\n ORG_MANAGER = 'ORG_MANAGER',\n ORG_MEMBER = 'ORG_MEMBER',\n /**\n * An expert of a SERVICE FIRM working inside this organization under a service-provider relationship\n * the organization controls (`SERVICE_PROVIDER_RELATIONSHIPS`). Inherits `ORG_MEMBER`, never more:\n * the relationship's role may be any role the client type makes available EXCEPT one that leads up to\n * `ORG_ADMIN`, which startup refuses. Administrative authority is never conferred by a relationship by\n * default (delegated administration is a separate, narrow, time-bound grant).\n */\n ORG_SERVICE_PROVIDER = 'ORG_SERVICE_PROVIDER',\n /**\n * The engine's billing inbound handler, acting on a signature-verified provider event that belongs to ONE\n * organization's billing account (#1629). It replaced the role-free `WEBHOOK_CALLBACK` bypass, under which\n * every billing webhook write ran with no role check and no tenant filter.\n *\n * Grants exactly what the event handlers do and nothing more: read the organization's billing account,\n * subscriptions, invoice references and credit pools; create and update subscriptions and invoice\n * references; create a credit pool and top it up; deactivate the billing account. Inherits from nothing.\n *\n * HANDLER-ONLY — a member of {@link INBOUND_HANDLER_ONLY_ROLES}. It confers nothing to a person, an API\n * key or an OAuth client.\n */\n ORG_BILLING_PROVIDER_EVENTS = 'ORG_BILLING_PROVIDER_EVENTS',\n /*\n * DELEGATED ADMINISTRATIVE CAPABILITIES (#1631) — one role per `DelegatedAdministrativeCapability`, conferred ONLY by\n * a live `SERVICE_PROVIDER_CAPABILITY_GRANTS` row to a service firm's experts, through the execution-context live\n * filter; the member role doors refuse them on any membership row. Each inherits from NOTHING and is listed\n * explicitly, beside `ORG_ADMIN`, in the `roles` of exactly the core operations it opens — so it confers those\n * operations and no others, and never leads to `ORG_ADMIN` / `ORG_OWNER` (startup refuses a capability role that does).\n */\n /** Invite people into the organization, resend an invitation, revoke one. */\n ORG_DELEGATED_INVITE_MEMBERS = 'ORG_DELEGATED_INVITE_MEMBERS',\n /** Suspend, reactivate or remove the delegating firm's OWN experts under the same relationship. */\n ORG_DELEGATED_MANAGE_RELATIONSHIP_EXPERTS = 'ORG_DELEGATED_MANAGE_RELATIONSHIP_EXPERTS',\n /** Read the organization's audit trail. */\n ORG_DELEGATED_READ_AUDIT_TRAIL = 'ORG_DELEGATED_READ_AUDIT_TRAIL',\n /** Configure the organization's SSO and SCIM provisioning. Security-critical: owner-granted, time-bound. */\n ORG_DELEGATED_MANAGE_SSO_SCIM = 'ORG_DELEGATED_MANAGE_SSO_SCIM',\n /** Manage the organization's API keys. Security-critical: owner-granted, time-bound. */\n ORG_DELEGATED_MANAGE_API_KEYS = 'ORG_DELEGATED_MANAGE_API_KEYS',\n /** Approve or deny, as the tenant, a platform operator's access request. Security-critical: owner-granted, time-bound. */\n ORG_DELEGATED_APPROVE_ACCESS_GRANTS = 'ORG_DELEGATED_APPROVE_ACCESS_GRANTS',\n}\n\n/**\n * Roles only an ENGINE inbound handler may act with (#1629) — never a person, an API key, an OAuth client or\n * an application's own handler.\n *\n * ## Why a named set, and where it is enforced\n *\n * A role is granted through many doors — organization and unit memberships, a user's application roles,\n * invitations, SSO and SCIM mappings, machine credentials — and several of them accept any string (the\n * member-role check is skipped entirely when an application declares no organization types). Guarding each\n * door would be the one-of-N shape `invariant-call-site-enumeration.md` records. So the set is enforced where\n * every principal converges instead:\n *\n * - the `ExecutionContext` constructor refuses a context carrying one of these roles unless it is an\n * `INBOUND_DELIVERY` context, so a grant that slipped through any door cannot confer anything;\n * - the inbound handler registry refuses them in an application handler's `actingRoles`, so only the engine's\n * own handler, which declares the engine capability, may act with them.\n *\n * The write doors that are cheap to guard (the organization member roles) refuse them too, so a mistaken grant\n * is answered where it is made rather than when the member next signs in.\n */\n// assurance-control: WILDO.ACCESS.LEAST_PRIVILEGE — the roles cut for one engine handler's writes confer nothing to any other principal (#1629).\nexport const INBOUND_HANDLER_ONLY_ROLES: ReadonlySet<string> = new Set<string>([\n CORE_ORG_ROLES.ORG_BILLING_PROVIDER_EVENTS,\n CORE_APP_ROLES.APP_BILLING_PROVIDER_EVENTS,\n CORE_APP_ROLES.APP_EMAIL_INBOUND_INTAKE,\n]);\n\n/** Whether `role` is one only an engine inbound handler may act with. */\nexport function isInboundHandlerOnlyRole(role: string): boolean {\n return INBOUND_HANDLER_ONLY_ROLES.has(role);\n}\n\n\nexport const CoreRolesSchema = z.union([\n z.enum(CORE_APP_ROLES),\n z.enum(CORE_ORG_ROLES),\n]);\n\nexport const RolesSchema = z.union([\n z.enum(CORE_APP_ROLES),\n z.enum(CORE_ORG_ROLES),\n z.string().min(1),\n]);\n\nexport const AppRolesSchema = z.union([\n z.enum(CORE_APP_ROLES),\n z.string().min(1),\n]);\n\nexport const OrgRolesSchema = z.union([\n z.enum(CORE_ORG_ROLES),\n z.string().min(1),\n]);\n\nexport const RoleDefinitionSchema = z.object({\n role: RolesSchema,\n inheritFrom: RolesSchema.optional(),\n isSystemRole: z.boolean().default(false),\n relatedPrimaryScope : z.enum(ResourcePrimaryScope),\n});\n\n\nexport type RoleDefinition = z.infer<typeof RoleDefinitionSchema>;\n\nexport const RolesConfigurationSchema = z.record(z.string(), RoleDefinitionSchema).refine(\n (record) => {\n // Validate that all keys are valid roles\n return Object.keys(record).every(key => {\n try {\n RolesSchema.parse(key);\n return true;\n } catch {\n return false;\n }\n });\n }\n);\n\nexport type Roles = z.infer<typeof RolesSchema>;\nexport type CoreRoles = z.infer<typeof CoreRolesSchema>;\nexport type AppRoles = z.infer<typeof AppRolesSchema>;\nexport type OrgRoles = z.infer<typeof OrgRolesSchema>;\nexport type RolesConfiguration = z.infer<typeof RolesConfigurationSchema>;\n"]}
1
+ {"version":3,"file":"roles.shared.schemas.js","sourceRoot":"","sources":["../../../../src/security/authorizations/roles.shared.schemas.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,oBAAoB,EAAE,MAAM,0CAA0C,CAAC;AAEhF,MAAM,CAAN,IAAY,cA2DX;AA3DD,WAAY,cAAc;IACxB;;;;;;;;;;;;;;;OAeG;IACH,2CAAyB,CAAA;IACzB,iEAA+C,CAAA;IAC/C,yEAAuD,CAAA;IACvD,2EAAyD,CAAA;IACzD,uDAAqC,CAAA;IACrC;;;;;;;;;;;;OAYG;IACH,yEAAuD,CAAA;IACvD;;;;;;;;OAQG;IACH,6EAA2D,CAAA;IAC3D;;;;;;;;OAQG;IACH,uEAAqD,CAAA;IACrD,uCAAqB,CAAA;IACrB,iGAAiG;IACjG,iDAA+B,CAAA;AACjC,CAAC,EA3DW,cAAc,KAAd,cAAc,QA2DzB;AAED;;;;;;;GAOG;AACH,MAAM,CAAC,MAAM,qCAAqC,GAA8B,MAAM,CAAC,MAAM,CAAC;IAC5F,cAAc,CAAC,qB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IACH,CAAC,CAAC,CAAC;AACL,CAAC,CACF,CAAC","sourcesContent":["\nimport { z } from 'zod';\nimport { ResourcePrimaryScope } from '../../resources/resources.shared.schemas';\n\nexport enum CORE_APP_ROLES {\n /**\n * Open access: an operation declaring `APP_PUBLIC` requires NO credential, and imposes no role\n * requirement on one that is presented.\n *\n * Not a role anybody is granted — a SENTINEL on the operation's `roles`, which is why the two\n * halves above have to be stated together. \"Accessible without auth\" was the whole comment until\n * 2026-08-31, and it was read as *reachable only when unauthenticated*: every role gate then\n * refused a credentialed caller, so a public price list, catalogue or i18n bundle answered 200 to\n * an anonymous probe and 403 to a logged-in customer (#153). Authenticating must never take access\n * away.\n *\n * `requiredRolesDeclarePublicAccess` in `roles.shared.utils.ts` is the runtime source of this\n * meaning; every gate consults it rather than re-deriving the test. Scope, tenancy and the\n * repository's contextual filter are untouched by the declaration — it says no role is required to\n * ASK, never that no scope confines the answer.\n */\n APP_PUBLIC = 'APP_PUBLIC',\n APP_ADMIN_SUPER_ADMIN = 'APP_ADMIN_SUPER_ADMIN',\n APP_ADMIN_BILLING_MANAGER = 'APP_ADMIN_BILLING_MANAGER',\n APP_ADMIN_MARKETING_EDITOR = 'APP_ADMIN_MARKETING_EDITOR',\n APP_ADMIN_VIEWER = 'APP_ADMIN_VIEWER',\n /**\n * Reads the application-wide audit trail and NOTHING else.\n *\n * Exists so the party that attests the application — an assurance evidence collector's machine\n * credential, or an external auditor — does not have to hold `APP_ADMIN_SUPER_ADMIN`, which until\n * 2026-09-13 was the only role the application audit door accepted. An auditor holding the largest\n * standing privilege in the deployment is the concentration `WILDO.ACCESS.PRIVILEGED_REVIEW` exists\n * to review, so the reader must not be it.\n *\n * Inherits from nothing, deliberately: a collector needs no `APP_USER` capability, and inheriting one\n * would make the role's reach a function of whatever the user tier grows later. Named only by the\n * application audit-log door's read verbs (`APPLICATION_AUDIT_LOG_READ_ROLES`).\n */\n APP_AUDIT_EVIDENCE_READER = 'APP_AUDIT_EVIDENCE_READER',\n /**\n * The engine's billing inbound handler, acting on a signature-verified provider event that belongs to ONE\n * person's billing account (#1629). The user-scope twin of `ORG_BILLING_PROVIDER_EVENTS`: personal\n * (`USER_SELF`) billing variants gate on application roles, so the handler's authority there is an\n * application role, confined to the delivery's scope user by the ownership check.\n *\n * HANDLER-ONLY — a member of {@link INBOUND_HANDLER_ONLY_ROLES}. It confers nothing to a person, an API\n * key or an OAuth client, and inherits from nothing: it grants exactly the billing operations that name it.\n */\n APP_BILLING_PROVIDER_EVENTS = 'APP_BILLING_PROVIDER_EVENTS',\n /**\n * The engine's email intake (#1600): the stage-1 handler that fetches a received message from the provider,\n * routes each recipient address to an organization, stores the message and hands it to the email channel.\n * It writes as the engine's infrastructure and calls NO resource operation, so no operation names this role\n * and it grants nothing — it exists because an application-scope delivery must run as SOME role, and every\n * other role would grant something.\n *\n * HANDLER-ONLY — a member of {@link INBOUND_HANDLER_ONLY_ROLES}. Inherits from nothing.\n */\n APP_EMAIL_INBOUND_INTAKE = 'APP_EMAIL_INBOUND_INTAKE',\n APP_USER = 'APP_USER',\n /** Anonymous session access. Operations with APP_ANONYMOUS are accessible to anonymous users. */\n APP_ANONYMOUS = 'APP_ANONYMOUS',\n}\n\n/**\n * Authorities that administer the generated application itself.\n *\n * This named subset is the canonical boundary used by consumer-facing\n * products such as the API reference. It prevents each downstream consumer\n * from guessing administrative meaning from `APP_ADMIN_` spelling or copying\n * an independent list that drifts when the role vocabulary evolves.\n */\nexport const CORE_APPLICATION_ADMINISTRATION_ROLES: readonly CORE_APP_ROLES[] = Object.freeze([\n CORE_APP_ROLES.APP_ADMIN_SUPER_ADMIN,\n CORE_APP_ROLES.APP_ADMIN_BILLING_MANAGER,\n CORE_APP_ROLES.APP_ADMIN_MARKETING_EDITOR,\n CORE_APP_ROLES.APP_ADMIN_VIEWER,\n // Reading the application's own audit trail is oversight of the APPLICATION, not access to its\n // customer-facing domain — and the API reference files an operation under application\n // administration only when EVERY role it accepts is in this set, so leaving the reader out would\n // move the audit door into the customer API reference.\n CORE_APP_ROLES.APP_AUDIT_EVIDENCE_READER,\n]);\n\nexport enum CORE_ORG_ROLES {\n ORG_GUEST = 'ORG_GUEST',\n ORG_OWNER = 'ORG_OWNER',\n ORG_ADMIN = 'ORG_ADMIN',\n ORG_MANAGER = 'ORG_MANAGER',\n ORG_MEMBER = 'ORG_MEMBER',\n /**\n * An expert of a SERVICE FIRM working inside this organization under a service-provider relationship\n * the organization controls (`SERVICE_PROVIDER_RELATIONSHIPS`). Inherits `ORG_MEMBER`, never more:\n * the relationship's role may be any role the client type makes available EXCEPT one that leads up to\n * `ORG_ADMIN`, which startup refuses. Administrative authority is never conferred by a relationship by\n * default (delegated administration is a separate, narrow, time-bound grant).\n */\n ORG_SERVICE_PROVIDER = 'ORG_SERVICE_PROVIDER',\n /**\n * The engine's billing inbound handler, acting on a signature-verified provider event that belongs to ONE\n * organization's billing account (#1629). It replaced the role-free `WEBHOOK_CALLBACK` bypass, under which\n * every billing webhook write ran with no role check and no tenant filter.\n *\n * Grants exactly what the event handlers do and nothing more: read the organization's billing account,\n * subscriptions, invoice references and credit pools; create and update subscriptions and invoice\n * references; create a credit pool and top it up; deactivate the billing account. Inherits from nothing.\n *\n * HANDLER-ONLY — a member of {@link INBOUND_HANDLER_ONLY_ROLES}. It confers nothing to a person, an API\n * key or an OAuth client.\n */\n ORG_BILLING_PROVIDER_EVENTS = 'ORG_BILLING_PROVIDER_EVENTS',\n /*\n * DELEGATED ADMINISTRATIVE CAPABILITIES (#1631) — one role per `DelegatedAdministrativeCapability`, conferred ONLY by\n * a live `SERVICE_PROVIDER_CAPABILITY_GRANTS` row to a service firm's experts, through the execution-context live\n * filter; the member role doors refuse them on any membership row. Each inherits from NOTHING and is listed\n * explicitly, beside `ORG_ADMIN`, in the `roles` of exactly the core operations it opens — so it confers those\n * operations and no others, and never leads to `ORG_ADMIN` / `ORG_OWNER` (startup refuses a capability role that does).\n */\n /** Invite people into the organization, resend an invitation, revoke one. */\n ORG_DELEGATED_INVITE_MEMBERS = 'ORG_DELEGATED_INVITE_MEMBERS',\n /** Suspend, reactivate or remove the delegating firm's OWN experts under the same relationship. */\n ORG_DELEGATED_MANAGE_RELATIONSHIP_EXPERTS = 'ORG_DELEGATED_MANAGE_RELATIONSHIP_EXPERTS',\n /** Read the organization's audit trail. */\n ORG_DELEGATED_READ_AUDIT_TRAIL = 'ORG_DELEGATED_READ_AUDIT_TRAIL',\n /** Configure the organization's SSO and SCIM provisioning. Security-critical: owner-granted, time-bound. */\n ORG_DELEGATED_MANAGE_SSO_SCIM = 'ORG_DELEGATED_MANAGE_SSO_SCIM',\n /** Manage the organization's API keys. Security-critical: owner-granted, time-bound. */\n ORG_DELEGATED_MANAGE_API_KEYS = 'ORG_DELEGATED_MANAGE_API_KEYS',\n /** Approve or deny, as the tenant, a platform operator's access request. Security-critical: owner-granted, time-bound. */\n ORG_DELEGATED_APPROVE_ACCESS_GRANTS = 'ORG_DELEGATED_APPROVE_ACCESS_GRANTS',\n}\n\n/**\n * Roles only an ENGINE inbound handler may act with (#1629) — never a person, an API key, an OAuth client or\n * an application's own handler.\n *\n * ## Why a named set, and where it is enforced\n *\n * A role is granted through many doors — organization and unit memberships, a user's application roles,\n * invitations, SSO and SCIM mappings, machine credentials — and several of them accept any string (the\n * member-role check is skipped entirely when an application declares no organization types). Guarding each\n * door would be the one-of-N shape `invariant-call-site-enumeration.md` records. So the set is enforced where\n * every principal converges instead:\n *\n * - the `ExecutionContext` constructor refuses a context carrying one of these roles unless it is an\n * `INBOUND_DELIVERY` context, so a grant that slipped through any door cannot confer anything;\n * - the inbound handler registry refuses them in an application handler's `actingRoles`, so only the engine's\n * own handler, which declares the engine capability, may act with them.\n *\n * The write doors that are cheap to guard (the organization member roles) refuse them too, so a mistaken grant\n * is answered where it is made rather than when the member next signs in.\n */\n// assurance-control: WILDO.ACCESS.LEAST_PRIVILEGE — the roles cut for one engine handler's writes confer nothing to any other principal (#1629).\nexport const INBOUND_HANDLER_ONLY_ROLES: ReadonlySet<string> = new Set<string>([\n CORE_ORG_ROLES.ORG_BILLING_PROVIDER_EVENTS,\n CORE_APP_ROLES.APP_BILLING_PROVIDER_EVENTS,\n CORE_APP_ROLES.APP_EMAIL_INBOUND_INTAKE,\n]);\n\n/** Whether `role` is one only an engine inbound handler may act with. */\nexport function isInboundHandlerOnlyRole(role: string): boolean {\n return INBOUND_HANDLER_ONLY_ROLES.has(role);\n}\n\n\nexport const CoreRolesSchema = z.union([\n z.enum(CORE_APP_ROLES),\n z.enum(CORE_ORG_ROLES),\n]);\n\nexport const RolesSchema = z.union([\n z.enum(CORE_APP_ROLES),\n z.enum(CORE_ORG_ROLES),\n z.string().min(1),\n]);\n\nexport const AppRolesSchema = z.union([\n z.enum(CORE_APP_ROLES),\n z.string().min(1),\n]);\n\nexport const OrgRolesSchema = z.union([\n z.enum(CORE_ORG_ROLES),\n z.string().min(1),\n]);\n\nexport const RoleDefinitionSchema = z.object({\n role: RolesSchema,\n inheritFrom: RolesSchema.optional(),\n isSystemRole: z.boolean().default(false),\n relatedPrimaryScope : z.enum(ResourcePrimaryScope),\n});\n\n\nexport type RoleDefinition = z.infer<typeof RoleDefinitionSchema>;\n\nexport const RolesConfigurationSchema = z.record(z.string(), RoleDefinitionSchema).refine(\n (record) => {\n // Validate that all keys are valid roles\n return Object.keys(record).every(key => {\n try {\n RolesSchema.parse(key);\n return true;\n } catch {\n return false;\n }\n });\n }\n);\n\nexport type Roles = z.infer<typeof RolesSchema>;\nexport type CoreRoles = z.infer<typeof CoreRolesSchema>;\nexport type AppRoles = z.infer<typeof AppRolesSchema>;\nexport type OrgRoles = z.infer<typeof OrgRolesSchema>;\nexport type RolesConfiguration = z.infer<typeof RolesConfigurationSchema>;\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"roles.shared.utils.d.ts","sourceRoot":"","sources":["../../../../../src/security/authorizations/roles.shared.utils.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AAEH,O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ACH,wBAAgB,2BAA2B,CAAC,CAAC,SAAS,qBAAqB,EACzE,QAAQ,EAAE,SAAS,CAAC,EAAE,EACtB,cAAc,CAAC,EAAE,kBAAkB,EACnC,cAAc,CAAC,EAAE,kBAAkB,GAClC,CAAC,EAAE,CAQL"}
1
+ {"version":3,"file":"roles.shared.utils.d.ts","sourceRoot":"","sources":["../../../../src/security/authorizations/roles.shared.utils.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AAEH,OAAO,EAAkC,KAAK,kBAAkB,EAAE,MAAM,wBAAwB,CAAC;AAMjG;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,oBAAoB,CAAC,OAAO,EAAE,MAAM,EAAE,WAAW,EAAE,kBAAkB,GAAG,MAAM,EAAE,CAQ/F;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAoDG;AACH,wBAAgB,gCAAgC,CAAC,aAAa,EAAE,SAAS,MAAM,EAAE,GAAG,SAAS,GAAG,OAAO,CAEtG;AAeD,4DAA4D;AAC5D,MAAM,WAAW,mCAAmC;IAClD,qFAAqF;IACrF,aAAa,EAAE,SAAS,MAAM,EAAE,GAAG,SAAS,CAAC;IAC7C,wEAAwE;IACxE,YAAY,EAAE,SAAS,MAAM,EAAE,CAAC;IAChC,0GAA0G;IAC1G,YAAY,EAAE,SAAS,MAAM,EAAE,CAAC;IAChC,mFAAmF;IACnF,cAAc,CAAC,EAAE,kBAAkB,CAAC;IACpC,+EAA+E;IAC/E,cAAc,CAAC,EAAE,kBAAkB,CAAC;CACrC;AAED;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,wBAAgB,6BAA6B,CAAC,MAAM,EAAE,mCAAmC,GAAG,OAAO,CAoClG;AAwCD;;;;;;;;;;;;;;;;;;GAkBG;AACH,wBAAgB,wBAAwB,CACtC,IAAI,EAAE,MAAM,EACZ,cAAc,GAAE,kBAAmD,EACnE,cAAc,GAAE,kBAA+C,GAC9D,MAAM,CAMR;AAED,sFAAsF;AACtF,MAAM,WAAW,qBAAqB;IACpC,8FAA8F;IAC9F,KAAK,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;CAC3B;AAED;;;GAGG;AACH,wBAAgB,wBAAwB,CACtC,OAAO,EAAE,qBAAqB,EAC9B,cAAc,CAAC,EAAE,kBAAkB,EACnC,cAAc,CAAC,EAAE,kBAAkB,GAClC,MAAM,CAIR;AAED;;;;;;;;;;;;;;;;;;;GAmBG;AACH,wBAAgB,2BAA2B,CAAC,CAAC,SAAS,qBAAqB,EACzE,QAAQ,EAAE,SAAS,CAAC,EAAE,EACtB,cAAc,CAAC,EAAE,kBAAkB,EACnC,cAAc,CAAC,EAAE,kBAAkB,GAClC,CAAC,EAAE,CAQL"}
@@ -1 +1 @@
1
- {"version":3,"file":"roles.shared.utils.js","sourceRoot":"","sources":["../../../../../src/security/authorizations/roles.shared.utils.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AAEH,OAAO,EAAE,cAAc,EAAE,cAAc,EAA2B,MAAM,wBAAwB,CAAC;AACjG,OAAO,EACL,8BAA8B,EAC9B,0BAA0B,GAC3B,MAAM,yBAAyB,CAAC;AAEjC;;;;;;;;;;;;;;GAcG;AACH,MAAM,UAAU,oBAAoB,CAAC,OAAe,EAAE,WAA+B;IACnF,MAAM,SAAS,GAAa,EAAE,CAAC;IAC/B,IAAI,OAAO,GAAuB,OAAO,CAAC;IAC1C,OAAO,OAAO,IAAI,WAAW,CAAC,OAAO,CAAC,EAAE,CAAC;QACvC,SAAS,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;QACxB,OAAO,GAAG,WAAW,CAAC,OAAO,CAAC,CAAC,WAAW,CAAC;IAC7C,CAAC;IACD,OAAO,SAAS,CAAC;AACnB,CAAC;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAoDG;AACH,MAAM,UA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AM,GAAG,QAAQ,CAAC,GAAG,CAAC,OAAO,CAAC,EAAE,CAAC,CAAC;QACtC,OAAO;QACP,IAAI,EAAE,wBAAwB,CAAC,OAAO,EAAE,cAAc,EAAE,cAAc,CAAC;KACxE,CAAC,CAAC,CAAC;IACJ,MAAM,OAAO,GAAG,IAAI,CAAC,GAAG,CAAC,GAAG,MAAM,CAAC,GAAG,CAAC,KAAK,CAAC,EAAE,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC;IAC7D,OAAO,MAAM,CAAC,MAAM,CAAC,KAAK,CAAC,EAAE,CAAC,KAAK,CAAC,IAAI,KAAK,OAAO,CAAC,CAAC,GAAG,CAAC,KAAK,CAAC,EAAE,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC;AACpF,CAAC","sourcesContent":["/**\n * Role-resolution utilities — pure, shared between backend authorization and\n * frontend display gating.\n *\n * The framework authorizes operations against a role **hierarchy**: a user\n * holding a high role (e.g. `ORG_OWNER`) implicitly satisfies every role it\n * inherits from (`ORG_OWNER → ORG_ADMIN → ORG_MANAGER → ORG_MEMBER → ORG_GUEST`).\n * `AuthorizationsBackendService` enforces this on every request; these helpers\n * expose the SAME hierarchy walk so the frontend can decide which operation\n * actions to even surface — without duplicating (and drifting from) the\n * algorithm.\n *\n * **Why this exists on the frontend.** The resource registry the browser holds\n * carries every operation a resource declares, each with its `roles` requirement,\n * but the frontend historically never consulted `operation.roles` when building\n * the action bar — so admin-only / super-admin-only actions rendered for every\n * viewer and only 403'd on click. The backend stays the security authority; this\n * gate is a display optimisation that hides buttons the user provably cannot use.\n *\n * @see roles.shared.defaults.ts — the default app/org role configurations\n * @see roles.shared.schemas.ts — `Roles`, `RolesConfiguration`, `RoleDefinition`\n * @see AuthorizationsBackendService.getRoleHierarchy / validateOperationRoles —\n * the backend twin this mirrors. If the hierarchy walk changes there, change it\n * here too (the role *configuration* is already shared via the constants below,\n * so only the algorithm can drift).\n */\n\nimport { CORE_APP_ROLES, CORE_ORG_ROLES, type RolesConfiguration } from './roles.shared.schemas';\nimport {\n DEFAULT_APP_ROLE_CONFIGURATION,\n DEFAULT_ORGANIZATION_ROLES,\n} from './roles.shared.defaults';\n\n/**\n * Walk a role's inheritance chain within a single role configuration, returning\n * the role itself plus every role it (transitively) inherits from, nearest-first.\n *\n * Mirrors `AuthorizationsBackendService.getRoleHierarchy`: starts at `roleKey`\n * and follows `inheritFrom` until a role is absent from the config. A role that\n * is **not present** in `rolesConfig` yields an EMPTY chain (it contributes\n * nothing), exactly like the backend — callers that must not over-restrict on\n * unknown (app-custom) roles handle that case explicitly (see\n * {@link userRolesSatisfyRequiredRoles}).\n *\n * @param roleKey - the assigned role to expand\n * @param rolesConfig - the role configuration owning the hierarchy (app or org)\n * @returns the role + its inherited ancestors, nearest-first; empty if unknown\n */\nexport function computeRoleHierarchy(roleKey: string, rolesConfig: RolesConfiguration): string[] {\n const hierarchy: string[] = [];\n let current: string | undefined = roleKey;\n while (current && rolesConfig[current]) {\n hierarchy.push(current);\n current = rolesConfig[current].inheritFrom;\n }\n return hierarchy;\n}\n\n/**\n * Does this required-role set declare PUBLIC access — imposing no positive role requirement on ANY\n * caller, credentialed or not?\n *\n * ## The semantic this settles, and why the alternative reading was wrong\n *\n * `APP_PUBLIC` can be read two ways, and for a long time different layers of the framework read it\n * differently:\n *\n * - *no credential REQUIRED* — reachable when nobody authenticated, and gated on roles otherwise;\n * - *no credential EXAMINED* — reachable by everyone, whether or not they authenticated.\n *\n * The second is the contract, and the first was a defect. Under the first reading, an operation\n * declaring `APP_PUBLIC` answered 200 to an anonymous probe and **403 to the same request carrying a\n * valid token**, because `APP_PUBLIC` is not a role anybody is GRANTED — so a credentialed caller\n * fell past the public carve-out to an ordinary role gate that nothing in their grant set could\n * satisfy. Authenticating REDUCED access below what anonymity gave, on every public surface an\n * application can build: a price list, a public catalogue, an i18n bundle served as a resource.\n *\n * Three of the four surfaces that consume `roles` already implemented the second reading, which is\n * what makes this the framework's settled contract rather than a preference:\n *\n * | surface | reading |\n * |---|---|\n * | frontend action visibility ({@link userRolesSatisfyRequiredRoles}) | no positive requirement |\n * | OpenAPI generation — `APP_PUBLIC` emits `security: []` | no authentication required |\n * | variant rights ranking ({@link computeRolePrivilegeRank}) | ranks `0`, the floor |\n * | backend role gate (before this predicate existed) | **credentialed callers refused** |\n *\n * An OpenAPI `security: []` says the endpoint imposes no security requirement. A client that sends a\n * bearer token to such an endpoint is conformant, and refusing it contradicts the published\n * contract. And independently of any document: **authenticating must never take access away.**\n *\n * ## What it does NOT relax\n *\n * Only the ROLE question. Tenancy, parent-scope and FK-path gates run unchanged, and the\n * repository's contextual filter still confines every row the caller then reaches. A public\n * declaration says \"no role is required to ask\"; it never says \"no scope confines the answer\".\n *\n * ## Why `APP_ANONYMOUS` is deliberately NOT here\n *\n * {@link OPEN_REQUIRED_ROLES} — the DISPLAY-side set — holds both sentinels, because that gate only\n * decides whether to render a button and is documented to fail OPEN on uncertainty. This predicate\n * is an ADMISSION rule, and the two sentinels are not interchangeable for admission:\n * `APP_ANONYMOUS` is a role an anonymous session genuinely HOLDS (the execution-context creator\n * grants it), so an anonymous caller already satisfies the ordinary gate and needs no carve-out —\n * whereas nobody is ever granted `APP_PUBLIC`. Widening admission to `APP_ANONYMOUS` would therefore\n * change who reaches anonymous-scoped operations without fixing anything, which is the wrong trade\n * for a gate. Keep the two questions separate.\n *\n * @param requiredRoles - an operation's declared `roles` (OR semantics)\n * @returns `true` when the declaration admits every caller, role-wise\n */\nexport function requiredRolesDeclarePublicAccess(requiredRoles: readonly string[] | undefined): boolean {\n return Array.isArray(requiredRoles) && requiredRoles.includes(CORE_APP_ROLES.APP_PUBLIC);\n}\n\n/**\n * Required-role sentinels that impose NO positive role requirement — an operation\n * gated on public / anonymous access must never be hidden from a viewer. Treated\n * as always-satisfied.\n *\n * DISPLAY-side and deliberately WIDER than {@link requiredRolesDeclarePublicAccess}; see that\n * predicate's JSDoc for why the admission rule must not adopt `APP_ANONYMOUS`.\n */\nconst OPEN_REQUIRED_ROLES: ReadonlySet<string> = new Set<string>([\n CORE_APP_ROLES.APP_PUBLIC,\n CORE_APP_ROLES.APP_ANONYMOUS,\n]);\n\n/** Parameters for {@link userRolesSatisfyRequiredRoles}. */\nexport interface UserRolesSatisfyRequiredRolesParams {\n /** The operation's required roles (OR semantics). Empty/undefined ⇒ unrestricted. */\n requiredRoles: readonly string[] | undefined;\n /** The user's APPLICATION-scope roles (e.g. `permissions.appLevel`). */\n userAppRoles: readonly string[];\n /** The user's ORGANIZATIONS-scope roles for the CURRENT org (e.g. `permissions.organizations[orgId]`). */\n userOrgRoles: readonly string[];\n /** App role configuration (defaults to {@link DEFAULT_APP_ROLE_CONFIGURATION}). */\n appRolesConfig?: RolesConfiguration;\n /** Org role configuration (defaults to {@link DEFAULT_ORGANIZATION_ROLES}). */\n orgRolesConfig?: RolesConfiguration;\n}\n\n/**\n * Decide whether a user's effective roles satisfy an operation's required roles,\n * honouring the role hierarchy — the shared answer to \"can this user perform this\n * operation, role-wise?\".\n *\n * This is the SAME OR-with-hierarchy decision the backend enforces\n * (`validateOperationRoles`): the user passes if ANY required role lies in the\n * inheritance closure of ANY role they hold (app roles expanded against the app\n * config, org roles against the org config).\n *\n * **Conservative on the frontend / display side.** It gates which action buttons\n * are even shown; the backend remains the security authority. It therefore FAILS\n * OPEN on uncertainty so it can never hide a button the user is actually allowed\n * to use:\n * - no/empty `requiredRoles` ⇒ `true` (unrestricted operation).\n * - a required role that is a public/anonymous sentinel ⇒ `true`.\n * - if the user holds a role UNKNOWN to the supplied config (an app-custom role\n * whose inheritance the default config cannot resolve) and the known-role\n * expansion did not already satisfy the requirement ⇒ `true` (do not hide —\n * the custom role might inherit a required role). For core-role-only users\n * (the common case, and the whole settings hub) the decision is exact.\n *\n * @returns `true` if the operation should be considered role-permitted (shown).\n */\nexport function userRolesSatisfyRequiredRoles(params: UserRolesSatisfyRequiredRolesParams): boolean {\n const {\n requiredRoles,\n userAppRoles,\n userOrgRoles,\n appRolesConfig = DEFAULT_APP_ROLE_CONFIGURATION,\n orgRolesConfig = DEFAULT_ORGANIZATION_ROLES,\n } = params;\n\n // Unrestricted operation — always permitted.\n if (!requiredRoles || requiredRoles.length === 0) return true;\n\n // A public/anonymous gate imposes no positive requirement.\n if (requiredRoles.some(role => OPEN_REQUIRED_ROLES.has(role))) return true;\n\n // Expand the user's roles through their respective hierarchies.\n const satisfiedRoles = new Set<string>();\n let hasUnresolvableUserRole = false;\n\n for (const role of userAppRoles) {\n const hierarchy = computeRoleHierarchy(role, appRolesConfig);\n if (hierarchy.length === 0) hasUnresolvableUserRole = true;\n for (const inherited of hierarchy) satisfiedRoles.add(inherited);\n }\n for (const role of userOrgRoles) {\n const hierarchy = computeRoleHierarchy(role, orgRolesConfig);\n if (hierarchy.length === 0) hasUnresolvableUserRole = true;\n for (const inherited of hierarchy) satisfiedRoles.add(inherited);\n }\n\n // Direct OR-with-hierarchy satisfaction.\n if (requiredRoles.some(role => satisfiedRoles.has(role))) return true;\n\n // Fail open if the user holds a role the supplied config can't expand — its\n // (unknown) inheritance might cover a required role. Never hide on uncertainty.\n return hasUnresolvableUserRole;\n}\n\n// ════════════════════════════════════════════════════════════════════════════\n// Variant selection by rights (\"show only the highest-right-level variant\")\n// ════════════════════════════════════════════════════════════════════════════\n\n/**\n * Privilege **tier** of a core role — the product ordering between role families.\n * A variant gated on a higher-tier role represents a \"higher right level\".\n *\n * 3 — platform/app admin (`APP_ADMIN_*`)\n * 2 — organisation roles (`ORG_*`)\n * 1 — authenticated user (`APP_USER`)\n * 0 — public / anonymous\n *\n * This is the one **cross-scope** decision the ranking needs: app-admin outranks\n * org, which outranks the plain authenticated user. Within a tier, the role\n * hierarchy depth breaks ties (a deeper role inherits more, so it is higher).\n */\nconst ROLE_PRIVILEGE_TIER: Readonly<Record<string, number>> = {\n [CORE_APP_ROLES.APP_PUBLIC]: 0,\n [CORE_APP_ROLES.APP_ANONYMOUS]: 0,\n [CORE_APP_ROLES.APP_USER]: 1,\n [CORE_ORG_ROLES.ORG_GUEST]: 2,\n [CORE_ORG_ROLES.ORG_MEMBER]: 2,\n [CORE_ORG_ROLES.ORG_MANAGER]: 2,\n [CORE_ORG_ROLES.ORG_ADMIN]: 2,\n [CORE_ORG_ROLES.ORG_OWNER]: 2,\n [CORE_APP_ROLES.APP_ADMIN_VIEWER]: 3,\n [CORE_APP_ROLES.APP_ADMIN_MARKETING_EDITOR]: 3,\n [CORE_APP_ROLES.APP_ADMIN_BILLING_MANAGER]: 3,\n [CORE_APP_ROLES.APP_ADMIN_SUPER_ADMIN]: 3,\n // Application tier: it reads across every tenant, which no organisation role can.\n [CORE_APP_ROLES.APP_AUDIT_EVIDENCE_READER]: 3,\n};\n\n/** Tier used for a role unknown to the default config (an app-custom role). */\nconst UNKNOWN_ROLE_TIER = 2;\nconst TIER_MULTIPLIER = 100;\n\n/**\n * Numeric privilege rank of a single role: `tier * 100 + hierarchyDepth`.\n *\n * Higher = more privileged. Derived from {@link ROLE_PRIVILEGE_TIER} (cross-tier\n * ordering) plus the role's hierarchy depth within its config (intra-tier\n * ordering), so e.g. `ORG_OWNER` (205) > `ORG_MEMBER` (202), and\n * `APP_ADMIN_SUPER_ADMIN` (304) outranks every `ORG_*`. Unknown custom roles fall\n * back to the org tier with depth 1 — exact for core-role apps (the common case),\n * conservative otherwise.\n *\n * Public / anonymous gates impose no positive requirement, so they rank `0` — the\n * floor, equal to a truly unrestricted variant (see {@link computeVariantRightsRank}).\n *\n * NOTE: the intra-tier tiebreak uses hierarchy DEPTH, which is a faithful proxy\n * for privilege only when inheritance is (near-)linear, as it is in the default\n * configs. A branching custom `RolesConfiguration` could give a shallow-but-powerful\n * role a lower depth than a deep-but-weak one and mis-order them; thread an explicit\n * rank (or extend this) if such a config is introduced.\n */\nexport function computeRolePrivilegeRank(\n role: string,\n appRolesConfig: RolesConfiguration = DEFAULT_APP_ROLE_CONFIGURATION,\n orgRolesConfig: RolesConfiguration = DEFAULT_ORGANIZATION_ROLES,\n): number {\n if (OPEN_REQUIRED_ROLES.has(role)) return 0;\n const tier = ROLE_PRIVILEGE_TIER[role] ?? UNKNOWN_ROLE_TIER;\n const config = appRolesConfig[role] ? appRolesConfig : orgRolesConfig[role] ? orgRolesConfig : undefined;\n const depth = config ? computeRoleHierarchy(role, config).length : 1;\n return tier * TIER_MULTIPLIER + depth;\n}\n\n/** Minimal shape this module needs from an operation variant to rank it by rights. */\nexport interface RightsRankableVariant {\n /** The roles that may perform this variant (OR semantics). Empty/undefined = unrestricted. */\n roles?: readonly string[];\n}\n\n/**\n * The rights rank a variant represents = the privilege of its most-privileged\n * required role. An unrestricted variant (no `roles`) ranks `0` — the lowest gate.\n */\nexport function computeVariantRightsRank(\n variant: RightsRankableVariant,\n appRolesConfig?: RolesConfiguration,\n orgRolesConfig?: RolesConfiguration,\n): number {\n const roles = variant.roles ?? [];\n if (roles.length === 0) return 0;\n return Math.max(...roles.map(role => computeRolePrivilegeRank(role, appRolesConfig, orgRolesConfig)));\n}\n\n/**\n * Collapse a set of operation variants to **only the highest-right-level ones**.\n *\n * The framework principle: variants of an operation exist to give different\n * behaviour according to rights, so a surface should show only the variant with\n * the highest right level the user qualifies for — not the lower-rights ones too.\n * (A super-admin who is also an org member otherwise sees both the member READ and\n * the super-admin READ; this keeps only the super-admin one.)\n *\n * **Precondition:** pass variants the user already QUALIFIES for (i.e. post\n * role-gating via {@link userRolesSatisfyRequiredRoles}). This selector then keeps\n * the subset with the maximum {@link computeVariantRightsRank}. Variants that\n * **tie** at the top rank (equal rights — e.g. context/variantKey variants that\n * are not a rights distinction) are all returned, so the caller's existing\n * default/sub-group logic still handles non-rights multiplicity unchanged.\n *\n * Used globally wherever variants surface as user actions; composite / execution\n * views deliberately bypass this (they may show all variants, for now) by not\n * routing through the collapsing path.\n */\nexport function selectHighestRightsVariants<T extends RightsRankableVariant>(\n variants: readonly T[],\n appRolesConfig?: RolesConfiguration,\n orgRolesConfig?: RolesConfiguration,\n): T[] {\n if (variants.length <= 1) return [...variants];\n const ranked = variants.map(variant => ({\n variant,\n rank: computeVariantRightsRank(variant, appRolesConfig, orgRolesConfig),\n }));\n const maxRank = Math.max(...ranked.map(entry => entry.rank));\n return ranked.filter(entry => entry.rank === maxRank).map(entry => entry.variant);\n}\n"]}
1
+ {"version":3,"file":"roles.shared.utils.js","sourceRoot":"","sources":["../../../../src/security/authorizations/roles.shared.utils.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AAEH,OAAO,EAAE,cAAc,EAAE,cAAc,EAA2B,MAAM,wBAAwB,CAAC;AACjG,OAAO,EACL,8BAA8B,EAC9B,0BAA0B,GAC3B,MAAM,yBAAyB,CAAC;AAEjC;;;;;;;;;;;;;;GAcG;AACH,MAAM,UAAU,oBAAoB,CAAC,OAAe,EAAE,WAA+B;IACnF,MAAM,SAAS,GAAa,EAAE,CAAC;IAC/B,IAAI,OAAO,GAAuB,OAAO,CAAC;IAC1C,OAAO,OAAO,IAAI,WAAW,CAAC,OAAO,CAAC,EAAE,CAAC;QACvC,SAAS,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;QACxB,OAAO,GAAG,WAAW,CAAC,OAAO,CAAC,CAAC,WAAW,CAAC;IAC7C,CAAC;IACD,OAAO,SAAS,CAAC;AACnB,CAAC;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAoDG;AACH,MAAM,UAAU,gCAAgC,CAAC,aAA4C;IAC3F,OAAO,KAAK,CAAC,OAAO,CAAC,aAAa,CAAC,IAAI,aAAa,CAAC,QAAQ,CAAC,cAAc,CAAC,UAAU,CAAC,CAAC;AAC3F,CAAC;AAED;;;;;;;GAOG;AACH,MAAM,mBAAmB,GAAwB,IAAI,GAAG,CAAS;IAC/D,cAAc,CAAC,UAAU;IACzB,cAAc,CAAC,aAAa;CAC7B,CAAC,CAAC;AAgBH;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,MAAM,UAAU,6BAA6B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AAK,CAAC,EAAE,CAAC,KAAK,CAAC,IAAI,KAAK,OAAO,CAAC,CAAC,GAAG,CAAC,KAAK,CAAC,EAAE,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC;AACpF,CAAC","sourcesContent":["/**\n * Role-resolution utilities — pure, shared between backend authorization and\n * frontend display gating.\n *\n * The framework authorizes operations against a role **hierarchy**: a user\n * holding a high role (e.g. `ORG_OWNER`) implicitly satisfies every role it\n * inherits from (`ORG_OWNER → ORG_ADMIN → ORG_MANAGER → ORG_MEMBER → ORG_GUEST`).\n * `AuthorizationsBackendService` enforces this on every request; these helpers\n * expose the SAME hierarchy walk so the frontend can decide which operation\n * actions to even surface — without duplicating (and drifting from) the\n * algorithm.\n *\n * **Why this exists on the frontend.** The resource registry the browser holds\n * carries every operation a resource declares, each with its `roles` requirement,\n * but the frontend historically never consulted `operation.roles` when building\n * the action bar — so admin-only / super-admin-only actions rendered for every\n * viewer and only 403'd on click. The backend stays the security authority; this\n * gate is a display optimisation that hides buttons the user provably cannot use.\n *\n * @see roles.shared.defaults.ts — the default app/org role configurations\n * @see roles.shared.schemas.ts — `Roles`, `RolesConfiguration`, `RoleDefinition`\n * @see AuthorizationsBackendService.getRoleHierarchy / validateOperationRoles —\n * the backend twin this mirrors. If the hierarchy walk changes there, change it\n * here too (the role *configuration* is already shared via the constants below,\n * so only the algorithm can drift).\n */\n\nimport { CORE_APP_ROLES, CORE_ORG_ROLES, type RolesConfiguration } from './roles.shared.schemas';\nimport {\n DEFAULT_APP_ROLE_CONFIGURATION,\n DEFAULT_ORGANIZATION_ROLES,\n} from './roles.shared.defaults';\n\n/**\n * Walk a role's inheritance chain within a single role configuration, returning\n * the role itself plus every role it (transitively) inherits from, nearest-first.\n *\n * Mirrors `AuthorizationsBackendService.getRoleHierarchy`: starts at `roleKey`\n * and follows `inheritFrom` until a role is absent from the config. A role that\n * is **not present** in `rolesConfig` yields an EMPTY chain (it contributes\n * nothing), exactly like the backend — callers that must not over-restrict on\n * unknown (app-custom) roles handle that case explicitly (see\n * {@link userRolesSatisfyRequiredRoles}).\n *\n * @param roleKey - the assigned role to expand\n * @param rolesConfig - the role configuration owning the hierarchy (app or org)\n * @returns the role + its inherited ancestors, nearest-first; empty if unknown\n */\nexport function computeRoleHierarchy(roleKey: string, rolesConfig: RolesConfiguration): string[] {\n const hierarchy: string[] = [];\n let current: string | undefined = roleKey;\n while (current && rolesConfig[current]) {\n hierarchy.push(current);\n current = rolesConfig[current].inheritFrom;\n }\n return hierarchy;\n}\n\n/**\n * Does this required-role set declare PUBLIC access — imposing no positive role requirement on ANY\n * caller, credentialed or not?\n *\n * ## The semantic this settles, and why the alternative reading was wrong\n *\n * `APP_PUBLIC` can be read two ways, and for a long time different layers of the framework read it\n * differently:\n *\n * - *no credential REQUIRED* — reachable when nobody authenticated, and gated on roles otherwise;\n * - *no credential EXAMINED* — reachable by everyone, whether or not they authenticated.\n *\n * The second is the contract, and the first was a defect. Under the first reading, an operation\n * declaring `APP_PUBLIC` answered 200 to an anonymous probe and **403 to the same request carrying a\n * valid token**, because `APP_PUBLIC` is not a role anybody is GRANTED — so a credentialed caller\n * fell past the public carve-out to an ordinary role gate that nothing in their grant set could\n * satisfy. Authenticating REDUCED access below what anonymity gave, on every public surface an\n * application can build: a price list, a public catalogue, an i18n bundle served as a resource.\n *\n * Three of the four surfaces that consume `roles` already implemented the second reading, which is\n * what makes this the framework's settled contract rather than a preference:\n *\n * | surface | reading |\n * |---|---|\n * | frontend action visibility ({@link userRolesSatisfyRequiredRoles}) | no positive requirement |\n * | OpenAPI generation — `APP_PUBLIC` emits `security: []` | no authentication required |\n * | variant rights ranking ({@link computeRolePrivilegeRank}) | ranks `0`, the floor |\n * | backend role gate (before this predicate existed) | **credentialed callers refused** |\n *\n * An OpenAPI `security: []` says the endpoint imposes no security requirement. A client that sends a\n * bearer token to such an endpoint is conformant, and refusing it contradicts the published\n * contract. And independently of any document: **authenticating must never take access away.**\n *\n * ## What it does NOT relax\n *\n * Only the ROLE question. Tenancy, parent-scope and FK-path gates run unchanged, and the\n * repository's contextual filter still confines every row the caller then reaches. A public\n * declaration says \"no role is required to ask\"; it never says \"no scope confines the answer\".\n *\n * ## Why `APP_ANONYMOUS` is deliberately NOT here\n *\n * {@link OPEN_REQUIRED_ROLES} — the DISPLAY-side set — holds both sentinels, because that gate only\n * decides whether to render a button and is documented to fail OPEN on uncertainty. This predicate\n * is an ADMISSION rule, and the two sentinels are not interchangeable for admission:\n * `APP_ANONYMOUS` is a role an anonymous session genuinely HOLDS (the execution-context creator\n * grants it), so an anonymous caller already satisfies the ordinary gate and needs no carve-out —\n * whereas nobody is ever granted `APP_PUBLIC`. Widening admission to `APP_ANONYMOUS` would therefore\n * change who reaches anonymous-scoped operations without fixing anything, which is the wrong trade\n * for a gate. Keep the two questions separate.\n *\n * @param requiredRoles - an operation's declared `roles` (OR semantics)\n * @returns `true` when the declaration admits every caller, role-wise\n */\nexport function requiredRolesDeclarePublicAccess(requiredRoles: readonly string[] | undefined): boolean {\n return Array.isArray(requiredRoles) && requiredRoles.includes(CORE_APP_ROLES.APP_PUBLIC);\n}\n\n/**\n * Required-role sentinels that impose NO positive role requirement — an operation\n * gated on public / anonymous access must never be hidden from a viewer. Treated\n * as always-satisfied.\n *\n * DISPLAY-side and deliberately WIDER than {@link requiredRolesDeclarePublicAccess}; see that\n * predicate's JSDoc for why the admission rule must not adopt `APP_ANONYMOUS`.\n */\nconst OPEN_REQUIRED_ROLES: ReadonlySet<string> = new Set<string>([\n CORE_APP_ROLES.APP_PUBLIC,\n CORE_APP_ROLES.APP_ANONYMOUS,\n]);\n\n/** Parameters for {@link userRolesSatisfyRequiredRoles}. */\nexport interface UserRolesSatisfyRequiredRolesParams {\n /** The operation's required roles (OR semantics). Empty/undefined ⇒ unrestricted. */\n requiredRoles: readonly string[] | undefined;\n /** The user's APPLICATION-scope roles (e.g. `permissions.appLevel`). */\n userAppRoles: readonly string[];\n /** The user's ORGANIZATIONS-scope roles for the CURRENT org (e.g. `permissions.organizations[orgId]`). */\n userOrgRoles: readonly string[];\n /** App role configuration (defaults to {@link DEFAULT_APP_ROLE_CONFIGURATION}). */\n appRolesConfig?: RolesConfiguration;\n /** Org role configuration (defaults to {@link DEFAULT_ORGANIZATION_ROLES}). */\n orgRolesConfig?: RolesConfiguration;\n}\n\n/**\n * Decide whether a user's effective roles satisfy an operation's required roles,\n * honouring the role hierarchy — the shared answer to \"can this user perform this\n * operation, role-wise?\".\n *\n * This is the SAME OR-with-hierarchy decision the backend enforces\n * (`validateOperationRoles`): the user passes if ANY required role lies in the\n * inheritance closure of ANY role they hold (app roles expanded against the app\n * config, org roles against the org config).\n *\n * **Conservative on the frontend / display side.** It gates which action buttons\n * are even shown; the backend remains the security authority. It therefore FAILS\n * OPEN on uncertainty so it can never hide a button the user is actually allowed\n * to use:\n * - no/empty `requiredRoles` ⇒ `true` (unrestricted operation).\n * - a required role that is a public/anonymous sentinel ⇒ `true`.\n * - if the user holds a role UNKNOWN to the supplied config (an app-custom role\n * whose inheritance the default config cannot resolve) and the known-role\n * expansion did not already satisfy the requirement ⇒ `true` (do not hide —\n * the custom role might inherit a required role). For core-role-only users\n * (the common case, and the whole settings hub) the decision is exact.\n *\n * @returns `true` if the operation should be considered role-permitted (shown).\n */\nexport function userRolesSatisfyRequiredRoles(params: UserRolesSatisfyRequiredRolesParams): boolean {\n const {\n requiredRoles,\n userAppRoles,\n userOrgRoles,\n appRolesConfig = DEFAULT_APP_ROLE_CONFIGURATION,\n orgRolesConfig = DEFAULT_ORGANIZATION_ROLES,\n } = params;\n\n // Unrestricted operation — always permitted.\n if (!requiredRoles || requiredRoles.length === 0) return true;\n\n // A public/anonymous gate imposes no positive requirement.\n if (requiredRoles.some(role => OPEN_REQUIRED_ROLES.has(role))) return true;\n\n // Expand the user's roles through their respective hierarchies.\n const satisfiedRoles = new Set<string>();\n let hasUnresolvableUserRole = false;\n\n for (const role of userAppRoles) {\n const hierarchy = computeRoleHierarchy(role, appRolesConfig);\n if (hierarchy.length === 0) hasUnresolvableUserRole = true;\n for (const inherited of hierarchy) satisfiedRoles.add(inherited);\n }\n for (const role of userOrgRoles) {\n const hierarchy = computeRoleHierarchy(role, orgRolesConfig);\n if (hierarchy.length === 0) hasUnresolvableUserRole = true;\n for (const inherited of hierarchy) satisfiedRoles.add(inherited);\n }\n\n // Direct OR-with-hierarchy satisfaction.\n if (requiredRoles.some(role => satisfiedRoles.has(role))) return true;\n\n // Fail open if the user holds a role the supplied config can't expand — its\n // (unknown) inheritance might cover a required role. Never hide on uncertainty.\n return hasUnresolvableUserRole;\n}\n\n// ════════════════════════════════════════════════════════════════════════════\n// Variant selection by rights (\"show only the highest-right-level variant\")\n// ════════════════════════════════════════════════════════════════════════════\n\n/**\n * Privilege **tier** of a core role — the product ordering between role families.\n * A variant gated on a higher-tier role represents a \"higher right level\".\n *\n * 3 — platform/app admin (`APP_ADMIN_*`)\n * 2 — organisation roles (`ORG_*`)\n * 1 — authenticated user (`APP_USER`)\n * 0 — public / anonymous\n *\n * This is the one **cross-scope** decision the ranking needs: app-admin outranks\n * org, which outranks the plain authenticated user. Within a tier, the role\n * hierarchy depth breaks ties (a deeper role inherits more, so it is higher).\n */\nconst ROLE_PRIVILEGE_TIER: Readonly<Record<string, number>> = {\n [CORE_APP_ROLES.APP_PUBLIC]: 0,\n [CORE_APP_ROLES.APP_ANONYMOUS]: 0,\n [CORE_APP_ROLES.APP_USER]: 1,\n [CORE_ORG_ROLES.ORG_GUEST]: 2,\n [CORE_ORG_ROLES.ORG_MEMBER]: 2,\n [CORE_ORG_ROLES.ORG_MANAGER]: 2,\n [CORE_ORG_ROLES.ORG_ADMIN]: 2,\n [CORE_ORG_ROLES.ORG_OWNER]: 2,\n [CORE_APP_ROLES.APP_ADMIN_VIEWER]: 3,\n [CORE_APP_ROLES.APP_ADMIN_MARKETING_EDITOR]: 3,\n [CORE_APP_ROLES.APP_ADMIN_BILLING_MANAGER]: 3,\n [CORE_APP_ROLES.APP_ADMIN_SUPER_ADMIN]: 3,\n // Application tier: it reads across every tenant, which no organisation role can.\n [CORE_APP_ROLES.APP_AUDIT_EVIDENCE_READER]: 3,\n};\n\n/** Tier used for a role unknown to the default config (an app-custom role). */\nconst UNKNOWN_ROLE_TIER = 2;\nconst TIER_MULTIPLIER = 100;\n\n/**\n * Numeric privilege rank of a single role: `tier * 100 + hierarchyDepth`.\n *\n * Higher = more privileged. Derived from {@link ROLE_PRIVILEGE_TIER} (cross-tier\n * ordering) plus the role's hierarchy depth within its config (intra-tier\n * ordering), so e.g. `ORG_OWNER` (205) > `ORG_MEMBER` (202), and\n * `APP_ADMIN_SUPER_ADMIN` (304) outranks every `ORG_*`. Unknown custom roles fall\n * back to the org tier with depth 1 — exact for core-role apps (the common case),\n * conservative otherwise.\n *\n * Public / anonymous gates impose no positive requirement, so they rank `0` — the\n * floor, equal to a truly unrestricted variant (see {@link computeVariantRightsRank}).\n *\n * NOTE: the intra-tier tiebreak uses hierarchy DEPTH, which is a faithful proxy\n * for privilege only when inheritance is (near-)linear, as it is in the default\n * configs. A branching custom `RolesConfiguration` could give a shallow-but-powerful\n * role a lower depth than a deep-but-weak one and mis-order them; thread an explicit\n * rank (or extend this) if such a config is introduced.\n */\nexport function computeRolePrivilegeRank(\n role: string,\n appRolesConfig: RolesConfiguration = DEFAULT_APP_ROLE_CONFIGURATION,\n orgRolesConfig: RolesConfiguration = DEFAULT_ORGANIZATION_ROLES,\n): number {\n if (OPEN_REQUIRED_ROLES.has(role)) return 0;\n const tier = ROLE_PRIVILEGE_TIER[role] ?? UNKNOWN_ROLE_TIER;\n const config = appRolesConfig[role] ? appRolesConfig : orgRolesConfig[role] ? orgRolesConfig : undefined;\n const depth = config ? computeRoleHierarchy(role, config).length : 1;\n return tier * TIER_MULTIPLIER + depth;\n}\n\n/** Minimal shape this module needs from an operation variant to rank it by rights. */\nexport interface RightsRankableVariant {\n /** The roles that may perform this variant (OR semantics). Empty/undefined = unrestricted. */\n roles?: readonly string[];\n}\n\n/**\n * The rights rank a variant represents = the privilege of its most-privileged\n * required role. An unrestricted variant (no `roles`) ranks `0` — the lowest gate.\n */\nexport function computeVariantRightsRank(\n variant: RightsRankableVariant,\n appRolesConfig?: RolesConfiguration,\n orgRolesConfig?: RolesConfiguration,\n): number {\n const roles = variant.roles ?? [];\n if (roles.length === 0) return 0;\n return Math.max(...roles.map(role => computeRolePrivilegeRank(role, appRolesConfig, orgRolesConfig)));\n}\n\n/**\n * Collapse a set of operation variants to **only the highest-right-level ones**.\n *\n * The framework principle: variants of an operation exist to give different\n * behaviour according to rights, so a surface should show only the variant with\n * the highest right level the user qualifies for — not the lower-rights ones too.\n * (A super-admin who is also an org member otherwise sees both the member READ and\n * the super-admin READ; this keeps only the super-admin one.)\n *\n * **Precondition:** pass variants the user already QUALIFIES for (i.e. post\n * role-gating via {@link userRolesSatisfyRequiredRoles}). This selector then keeps\n * the subset with the maximum {@link computeVariantRightsRank}. Variants that\n * **tie** at the top rank (equal rights — e.g. context/variantKey variants that\n * are not a rights distinction) are all returned, so the caller's existing\n * default/sub-group logic still handles non-rights multiplicity unchanged.\n *\n * Used globally wherever variants surface as user actions; composite / execution\n * views deliberately bypass this (they may show all variants, for now) by not\n * routing through the collapsing path.\n */\nexport function selectHighestRightsVariants<T extends RightsRankableVariant>(\n variants: readonly T[],\n appRolesConfig?: RolesConfiguration,\n orgRolesConfig?: RolesConfiguration,\n): T[] {\n if (variants.length <= 1) return [...variants];\n const ranked = variants.map(variant => ({\n variant,\n rank: computeVariantRightsRank(variant, appRolesConfig, orgRolesConfig),\n }));\n const maxRank = Math.max(...ranked.map(entry => entry.rank));\n return ranked.filter(entry => entry.rank === maxRank).map(entry => entry.variant);\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"provider-connection-listing.shared.schemas.d.ts","sourceRoot":"","sources":["../../../../../src/security/connected-accounts/provider-connection-listing.shared.schemas.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAEH,OAAO,EAAE,iCAAiC,E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AAM,EAAE,SAAS,iCAAiC,EAAE,GACnD,iCAAiC,CAMnC"}
1
+ {"version":3,"file":"provider-connection-listing.shared.schemas.d.ts","sourceRoot":"","sources":["../../../../src/security/connected-accounts/provider-connection-listing.shared.schemas.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAEH,OAAO,EAAE,iCAAiC,EAAE,MAAM,uCAAuC,CAAC;AAE1F,oHAAoH;AACpH,MAAM,WAAW,sCAAsC;IACrD,sDAAsD;IACtD,QAAQ,CAAC,YAAY,EAAE,MAAM,CAAC;IAC9B,mEAAmE;IACnE,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;IAC5B,wGAAwG;IACxG,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;CAC9B;AAED,qCAAqC;AACrC,MAAM,WAAW,4BAA4B;IAC3C,6FAA6F;IAC7F,QAAQ,CAAC,aAAa,EAAE,MAAM,CAAC;IAC/B;;;;OAIG;IACH,QAAQ,CAAC,UAAU,EAAE,SAAS,MAAM,EAAE,CAAC;IACvC;;;;;OAKG;IACH,QAAQ,CAAC,yBAAyB,CAAC,EAAE,MAAM,CAAC;IAC5C,oHAAoH;IACpH,QAAQ,CAAC,WAAW,EAAE,SAAS,sCAAsC,EAAE,CAAC;IACxE;;;;OAIG;IACH,QAAQ,CAAC,uBAAuB,EAAE,OAAO,CAAC;IAC1C;;;OAGG;IACH,QAAQ,CAAC,aAAa,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;IAC3C;;;OAGG;IACH,QAAQ,CAAC,eAAe,EAAE,iCAAiC,CAAC;IAC5D,oHAAoH;IACpH,QAAQ,CAAC,OAAO,EAAE,OAAO,CAAC;IAC1B,2DAA2D;IAC3D,QAAQ,CAAC,UAAU,CAAC,EAAE,MAAM,CAAC;IAC7B,4CAA4C;IAC5C,QAAQ,CAAC,WAAW,CAAC,EAAE,MAAM,CAAC;IAC9B;;;OAGG;IACH,QAAQ,CAAC,cAAc,CAAC,EAAE,MAAM,CAAC;IACjC,gHAAgH;IAChH,QAAQ,CAAC,qBAAqB,EAAE,OAAO,CAAC;CACzC;AAED,+CAA+C;AAC/C,MAAM,WAAW,iCAAiC;IAChD,QAAQ,CAAC,WAAW,EAAE,SAAS,4BAA4B,EAAE,CAAC;CAC/D;AAYD;;;;;;GAMG;AACH,wBAAgB,sCAAsC,CACpD,MAAM,EAAE,SAAS,iCAAiC,EAAE,GACnD,iCAAiC,CAMnC"}
@@ -1 +1 @@
1
- {"version":3,"file":"provider-connection-listing.shared.schemas.js","sourceRoot":"","sources":["../../../../../src/security/connected-accounts/provider-connection-listing.shared.schemas.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAEH,OAAO,EAAE,iCAAiC,EAAE,MAAM,uCAAuC,CAAC;AAmE1F;;;GAGG;AACH,MAAM,yBAAyB,GAAgE;IAC7F,CAAC,iCAAiC,CAAC,KAAK,CAAC,EAAE,CAAC;IAC5C,CAAC,iCAAiC,CAAC,WAAW,CAAC,EAAE,CAAC;IAClD,CAAC,iCAAiC,CAAC,OAAO,CAAC,EAAE,CAAC;CAC/C,CAAC;AAEF;;;;;;GAMG;AACH,MAAM,UAAU,sCAAsC,CACpD,MAAoD;IAEpD,IAAI,KAAoD,CAAC;IACzD,KAAK,MAAM,KAAK,IAAI,MAAM,EAAE,CAAC;QAC3B,IAAI,KAAK,KAAK,SAAS,IAAI,yBAAyB,CAAC,KAAK,CAAC,GAAG,yBAAyB,CAAC,KAAK,CAAC;YAAE,KAAK,GAAG,KAAK,CAAC;IAChH,CAAC;IACD,OAAO,KAAK,IAAI,iCAAiC,CAAC,WAAW,CAAC;AAChE,CAAC","sourcesContent":["/**\n * What `GET /connections/linked` answers — the CONNECTIONS one owner holds, one entry each (#1727).\n *\n * ## Why a connection and not a credential row\n *\n * A stored credential is keyed on `(owner, connectionRef, secretSlug)` (#1670), and a vendor served by several refs\n * — an engine part and the add-on packages beside it, declared in `providers.sharedConnections` (#1725) — holds ONE\n * grant keyed on its base ref. A screen that listed rows by `providerRef` therefore showed a person one Microsoft\n * account per ref while they had authorized once, and offered a disconnect per ref for one grant. The connection is\n * the unit a person granted, so it is the unit this lists.\n *\n * Shared because the backend composes it and the connected-accounts screen renders it; one declaration keeps the two\n * from disagreeing about a field neither compiler would otherwise compare.\n */\n\nimport { ProviderCredentialValidationState } from './provider-credentials.shared.schemas';\n\n/** One credential row of a connection — what a disconnect deletes, through the credential resource's own DELETE. */\nexport interface LinkedProviderConnectionCredentialView {\n /** The row's id, addressed by the resource DELETE. */\n readonly credentialId: string;\n /** The slot the row holds, as its contract key (`accessToken`). */\n readonly secretSlug: string;\n /** The ref whose connect flow or typed door CREATED the row — not necessarily the connection's base. */\n readonly providerRef: string;\n}\n\n/** One connection an owner holds. */\nexport interface LinkedProviderConnectionView {\n /** The connection's identity: its base ref, the key every row is stored and sealed under. */\n readonly connectionRef: string;\n /**\n * Every ref this connection SERVES on this application — the base first, then the declared members that are\n * loaded here. A ref declared in no shared connection serves only itself, which is why a single-ref vendor's entry\n * reads exactly as it always did.\n */\n readonly servesRefs: readonly string[];\n /**\n * Set when these rows were stored under a ref BEFORE that ref joined a shared connection: they are keyed and sealed\n * on the old identity, so nothing reads them any more (there is deliberately no re-seal door, #1670) and\n * `servesRefs` is empty. Names the connection the ref now belongs to — the person connects that one and disconnects\n * this residue.\n */\n readonly supersededByConnectionRef?: string;\n /** The rows the connection is made of. More than one only for a vendor whose typed credential has several slots. */\n readonly credentials: readonly LinkedProviderConnectionCredentialView[];\n /**\n * Whether an ENABLED row holds a grant the vendor minted (an authorization flow) that could be opened — as opposed\n * to a pasted credential. `false` also for a granted connection whose row is disabled or cannot be opened: its scopes\n * cannot be read, so nothing here may claim what it was consented to. Read `enabled` beside it.\n */\n readonly holdsAuthorizationGrant: boolean;\n /**\n * The scopes the grant's consent has ACCUMULATED (#1671) — absent for a pasted credential, and for a grant whose\n * vendor never stated its scopes. Vendor permission identifiers, not secrets; never a token.\n */\n readonly grantedScopes?: readonly string[];\n /**\n * The connection's standing, the WORST of its rows': one row the vendor refused makes the whole connection need\n * re-authorization, because every ref it serves spends that row.\n */\n readonly validationState: ProviderCredentialValidationState;\n /** Whether every row is enabled. A disabled row resolves as absent, so one disabled row disables the connection. */\n readonly enabled: boolean;\n /** When the connection was last spent, across its rows. */\n readonly lastUsedAt?: string;\n /** When the connection was first stored. */\n readonly connectedAt?: string;\n /**\n * On an organization's connection, the member who LINKED it — the person whose vendor account a lent grant is, and\n * the only member who may grow it (#1671 `NOT_THE_LINKING_MEMBER`). Absent on a person's own connection.\n */\n readonly linkedByUserId?: string;\n /** Whether disconnecting also withdraws the grant at the vendor (RFC 7009, #545), or only deletes this copy. */\n readonly revocationTellsVendor: boolean;\n}\n\n/** The answer of `GET /connections/linked`. */\nexport interface LinkedProviderConnectionsResponse {\n readonly connections: readonly LinkedProviderConnectionView[];\n}\n\n/**\n * How bad each validation state is, for {@link worstProviderCredentialValidationState}. Total over the enum, so a\n * member added tomorrow is a compile error here rather than a state that silently ranks as healthy.\n */\nconst VALIDATION_STATE_SEVERITY: Readonly<Record<ProviderCredentialValidationState, number>> = {\n [ProviderCredentialValidationState.VALID]: 0,\n [ProviderCredentialValidationState.UNVALIDATED]: 1,\n [ProviderCredentialValidationState.INVALID]: 2,\n};\n\n/**\n * The standing of a connection made of several rows: the worst of theirs.\n *\n * A connection is spent as ONE thing, so it is only as healthy as its least healthy row — a refused row is refused\n * for every ref the connection serves, and reporting the best row instead would show a working connection that every\n * call fails through. An empty set is `UNVALIDATED`: nothing has been proven about rows that do not exist.\n */\nexport function worstProviderCredentialValidationState(\n states: readonly ProviderCredentialValidationState[],\n): ProviderCredentialValidationState {\n let worst: ProviderCredentialValidationState | undefined;\n for (const state of states) {\n if (worst === undefined || VALIDATION_STATE_SEVERITY[state] > VALIDATION_STATE_SEVERITY[worst]) worst = state;\n }\n return worst ?? ProviderCredentialValidationState.UNVALIDATED;\n}\n"]}
1
+ {"version":3,"file":"provider-connection-listing.shared.schemas.js","sourceRoot":"","sources":["../../../../src/security/connected-accounts/provider-connection-listing.shared.schemas.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAEH,OAAO,EAAE,iCAAiC,EAAE,MAAM,uCAAuC,CAAC;AAmE1F;;;GAGG;AACH,MAAM,yBAAyB,GAAgE;IAC7F,CAAC,iCAAiC,CAAC,KAAK,CAAC,EAAE,CAAC;IAC5C,CAAC,iCAAiC,CAAC,WAAW,CAAC,EAAE,CAAC;IAClD,CAAC,iCAAiC,CAAC,OAAO,CAAC,EAAE,CAAC;CAC/C,CAAC;AAEF;;;;;;GAMG;AACH,MAAM,UAAU,sCAAsC,CACpD,MAAoD;IAEpD,IAAI,KAAoD,CAAC;IACzD,KAAK,MAAM,KAAK,IAAI,MAAM,EAAE,CAAC;QAC3B,IAAI,KAAK,KAAK,SAAS,IAAI,yBAAyB,CAAC,KAAK,CAAC,GAAG,yBAAyB,CAAC,KAAK,CAAC;YAAE,KAAK,GAAG,KAAK,CAAC;IAChH,CAAC;IACD,OAAO,KAAK,IAAI,iCAAiC,CAAC,WAAW,CAAC;AAChE,CAAC","sourcesContent":["/**\n * What `GET /connections/linked` answers — the CONNECTIONS one owner holds, one entry each (#1727).\n *\n * ## Why a connection and not a credential row\n *\n * A stored credential is keyed on `(owner, connectionRef, secretSlug)` (#1670), and a vendor served by several refs\n * — an engine part and the add-on packages beside it, declared in `providers.sharedConnections` (#1725) — holds ONE\n * grant keyed on its base ref. A screen that listed rows by `providerRef` therefore showed a person one Microsoft\n * account per ref while they had authorized once, and offered a disconnect per ref for one grant. The connection is\n * the unit a person granted, so it is the unit this lists.\n *\n * Shared because the backend composes it and the connected-accounts screen renders it; one declaration keeps the two\n * from disagreeing about a field neither compiler would otherwise compare.\n */\n\nimport { ProviderCredentialValidationState } from './provider-credentials.shared.schemas';\n\n/** One credential row of a connection — what a disconnect deletes, through the credential resource's own DELETE. */\nexport interface LinkedProviderConnectionCredentialView {\n /** The row's id, addressed by the resource DELETE. */\n readonly credentialId: string;\n /** The slot the row holds, as its contract key (`accessToken`). */\n readonly secretSlug: string;\n /** The ref whose connect flow or typed door CREATED the row — not necessarily the connection's base. */\n readonly providerRef: string;\n}\n\n/** One connection an owner holds. */\nexport interface LinkedProviderConnectionView {\n /** The connection's identity: its base ref, the key every row is stored and sealed under. */\n readonly connectionRef: string;\n /**\n * Every ref this connection SERVES on this application — the base first, then the declared members that are\n * loaded here. A ref declared in no shared connection serves only itself, which is why a single-ref vendor's entry\n * reads exactly as it always did.\n */\n readonly servesRefs: readonly string[];\n /**\n * Set when these rows were stored under a ref BEFORE that ref joined a shared connection: they are keyed and sealed\n * on the old identity, so nothing reads them any more (there is deliberately no re-seal door, #1670) and\n * `servesRefs` is empty. Names the connection the ref now belongs to — the person connects that one and disconnects\n * this residue.\n */\n readonly supersededByConnectionRef?: string;\n /** The rows the connection is made of. More than one only for a vendor whose typed credential has several slots. */\n readonly credentials: readonly LinkedProviderConnectionCredentialView[];\n /**\n * Whether an ENABLED row holds a grant the vendor minted (an authorization flow) that could be opened — as opposed\n * to a pasted credential. `false` also for a granted connection whose row is disabled or cannot be opened: its scopes\n * cannot be read, so nothing here may claim what it was consented to. Read `enabled` beside it.\n */\n readonly holdsAuthorizationGrant: boolean;\n /**\n * The scopes the grant's consent has ACCUMULATED (#1671) — absent for a pasted credential, and for a grant whose\n * vendor never stated its scopes. Vendor permission identifiers, not secrets; never a token.\n */\n readonly grantedScopes?: readonly string[];\n /**\n * The connection's standing, the WORST of its rows': one row the vendor refused makes the whole connection need\n * re-authorization, because every ref it serves spends that row.\n */\n readonly validationState: ProviderCredentialValidationState;\n /** Whether every row is enabled. A disabled row resolves as absent, so one disabled row disables the connection. */\n readonly enabled: boolean;\n /** When the connection was last spent, across its rows. */\n readonly lastUsedAt?: string;\n /** When the connection was first stored. */\n readonly connectedAt?: string;\n /**\n * On an organization's connection, the member who LINKED it — the person whose vendor account a lent grant is, and\n * the only member who may grow it (#1671 `NOT_THE_LINKING_MEMBER`). Absent on a person's own connection.\n */\n readonly linkedByUserId?: string;\n /** Whether disconnecting also withdraws the grant at the vendor (RFC 7009, #545), or only deletes this copy. */\n readonly revocationTellsVendor: boolean;\n}\n\n/** The answer of `GET /connections/linked`. */\nexport interface LinkedProviderConnectionsResponse {\n readonly connections: readonly LinkedProviderConnectionView[];\n}\n\n/**\n * How bad each validation state is, for {@link worstProviderCredentialValidationState}. Total over the enum, so a\n * member added tomorrow is a compile error here rather than a state that silently ranks as healthy.\n */\nconst VALIDATION_STATE_SEVERITY: Readonly<Record<ProviderCredentialValidationState, number>> = {\n [ProviderCredentialValidationState.VALID]: 0,\n [ProviderCredentialValidationState.UNVALIDATED]: 1,\n [ProviderCredentialValidationState.INVALID]: 2,\n};\n\n/**\n * The standing of a connection made of several rows: the worst of theirs.\n *\n * A connection is spent as ONE thing, so it is only as healthy as its least healthy row — a refused row is refused\n * for every ref the connection serves, and reporting the best row instead would show a working connection that every\n * call fails through. An empty set is `UNVALIDATED`: nothing has been proven about rows that do not exist.\n */\nexport function worstProviderCredentialValidationState(\n states: readonly ProviderCredentialValidationState[],\n): ProviderCredentialValidationState {\n let worst: ProviderCredentialValidationState | undefined;\n for (const state of states) {\n if (worst === undefined || VALIDATION_STATE_SEVERITY[state] > VALIDATION_STATE_SEVERITY[worst]) worst = state;\n }\n return worst ?? ProviderCredentialValidationState.UNVALIDATED;\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"provider-credentials-organization.shared.resources-config.schemas.d.ts","sourceRoot":"","sources":["../../../../../src/security/connected-accounts/provider-credentials-organization.shared.resources-config.schemas.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EAEL,iCAAiC,EAClC,MAAM,uCAAuC,CAAC;AAK/C,OAAO,EAAE,qBAAqB,EAAwD,MAAM,mDAAmD,CAAC;AAChJ,OAAO,EAA4D,oBAAoB,EAAE,MAAM,0CAA0C,CAAC;AAa1I,KAAK,oCAAoC,GACrC,qBAAqB,CAAC,IAAI,GAC1B,qBAAqB,CAAC,IAAI,GAC1B,qBAAqB,CAAC,MAAM,GAC5B,qBAAqB,CAAC,MAAM,GAC5B,qBAAqB,CAAC,MAAM,GAC5B,qBAAqB,CAAC,WAAW,CAAC;AAEtC,eAAO,MAAM,iEAAiE,GAC5E,wBAAwB,oBAAoB,EAAE;;;;;;;;;;;;;;;;;;;;;mBA8L9C,CAAC"}
1
+ {"version":3,"file":"provider-credentials-organization.shared.resources-config.schemas.d.ts","sourceRoot":"","sources":["../../../../src/security/connected-accounts/provider-credentials-organization.shared.resources-config.schemas.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EAEL,iCAAiC,EAClC,MAAM,uCAAuC,CAAC;AAK/C,OAAO,EAAE,qBAAqB,EAAwD,MAAM,mDAAmD,CAAC;AAChJ,OAAO,EAA4D,oBAAoB,EAAE,MAAM,0CAA0C,CAAC;AAa1I,KAAK,oCAAoC,GACrC,qBAAqB,CAAC,IAAI,GAC1B,qBAAqB,CAAC,IAAI,GAC1B,qBAAqB,CAAC,MAAM,GAC5B,qBAAqB,CAAC,MAAM,GAC5B,qBAAqB,CAAC,MAAM,GAC5B,qBAAqB,CAAC,WAAW,CAAC;AAEtC,eAAO,MAAM,iEAAiE,GAC5E,wBAAwB,oBAAoB,EAAE;;;;;;;;;;;;;;;;;;;;;mBA8L9C,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"provider-credentials-organization.shared.resources-config.schemas.js","sourceRoot":"","sources":["../../../../../src/security/connected-accounts/provider-credentials-organization.shared.resources-config.schemas.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EACL,oCAAoC,EACpC,iCAAiC,GAClC,MAAM,uCAAuC,CAAC;AAE/C,OAAO,EAAE,o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D,SAAS,EAAE,IAAI;oBACf,KAAK,EAAE,CAAC,cAAc,CAAC,SAAS,CAAC;oBACjC,uFAAuF;oBACvF,wBAAwB;oBACxB,SAAS,EAAE,0BAA0B,CAAC,QAAQ;iBAC/C;aACF;SACF;QAED,CAAC,qBAAqB,CAAC,MAAM,CAAC,EAAE;YAC9B,QAAQ,EAAE;gBACR;oBACE,WAAW,EAAE,4BAA4B,CAAC,QAAQ;oBAClD,SAAS,EAAE,IAAI;oBACf,KAAK,EAAE,CAAC,cAAc,CAAC,SAAS,CAAC;oBACjC,SAAS,EAAE,0BAA0B,CAAC,QAAQ;iBAC/C;aACF;SACF;QAED,CAAC,qBAAqB,CAAC,MAAM,CAAC,EAAE;YAC9B,QAAQ,EAAE;gBACR;oBACE,WAAW,EAAE,4BAA4B,CAAC,QAAQ;oBAClD,SAAS,EAAE,IAAI;oBACf,KAAK,EAAE,CAAC,cAAc,CAAC,SAAS,CAAC;oBACjC,SAAS,EAAE,0BAA0B,CAAC,QAAQ;iBAC/C;aACF;SACF;QAED;;;;;WAKG;QACH,CAAC,qBAAqB,CAAC,WAAW,CAAC,EAAE;YACnC,QAAQ,EAAE;gBACR;oBACE,WAAW,EAAE,4BAA4B,CAAC,aAAa;oBACvD,SAAS,EAAE,IAAI;oBACf,KAAK,EAAE,CAAC,cAAc,CAAC,qBAAqB,CAAC;oBAC7C,SAAS,EAAE,0BAA0B,CAAC,QAAQ;iBAC/C;aACF;SACF;KACF;CACF,CAAC,CAAC","sourcesContent":["/**\n * Organization Provider Credentials — resource configuration.\n *\n * The tenant-owned service credential toward a third-party provider. See\n * `provider-credentials.shared.schemas.ts` for what the resource is and what it deliberately is not.\n */\n\nimport { z } from 'zod';\n\nimport {\n OrganizationProviderCredentialSchema,\n ProviderCredentialValidationState,\n} from './provider-credentials.shared.schemas';\n\nimport { ErasureRetentionMode, ResourceDataSubjectKind } from '../../compliance/privacy/impersonalization.shared.schemas';\nimport { createResourceConfiguration_Initialization } from '../../resources/resources-config.shared.factory';\nimport { ResourceSystemAccessMode } from '../../resources/resources-config.shared.schemas';\nimport { CoreResourceOperation, CoreResourceType, coreResourceShared_FieldIdentifier } from '../../resources/resources.shared.core.definitions';\nimport { ResourceOperationRiskLevel, ResourceOperationVariantType, ResourceRelationship } from '../../resources/resources.shared.schemas';\nimport { CORE_APP_ROLES, CORE_ORG_ROLES } from '../authorizations/roles.shared.schemas';\n\nconst ORG_PROVIDER_CREDENTIALS_SORT_FIELDS = ['createdAt', 'updatedAt', 'providerRef', 'connectionRef', 'lastUsedAt'] as const;\n\nconst ORG_PROVIDER_CREDENTIALS_FILTER_FIELDS = {\n providerRef: z.string(),\n connectionRef: z.string(),\n secretSlug: z.string(),\n enabled: z.boolean(),\n validationState: z.enum(ProviderCredentialValidationState),\n};\n\ntype OrgProviderCredentialsCoreOperations =\n | CoreResourceOperation.READ\n | CoreResourceOperation.LIST\n | CoreResourceOperation.CREATE\n | CoreResourceOperation.UPDATE\n | CoreResourceOperation.DELETE\n | CoreResourceOperation.UPDATE_MANY;\n\nexport const orgProviderCredentialsResourceConfiguration_InitializationFactory = (\n resourcesRelationships: ResourceRelationship[],\n) => createResourceConfiguration_Initialization<\n undefined,\n OrgProviderCredentialsCoreOperations,\n typeof OrganizationProviderCredentialSchema\n>({\n mainSchema: OrganizationProviderCredentialSchema,\n resourceIdentifier: CoreResourceType.ORG_PROVIDER_CREDENTIALS,\n resourceFieldIdentifier: coreResourceShared_FieldIdentifier[CoreResourceType.ORG_PROVIDER_CREDENTIALS],\n resourceRelationships: resourcesRelationships,\n isSystemResource: true,\n\n /**\n * ## `read` / `list` — the RESOLVER's door\n *\n * A provider call happens on whatever execution context the caller holds: a batch, a queue\n * consumer, an anonymous webhook return leg. None of those carry an ORG_ADMIN role, and the\n * resolution must still work — so the resolver reads through `readAsSystem`, which is fail-closed\n * on this opt-in. The scope is supplied as the organization FK in the system context map, so the\n * bypass is of the ROLE check only, never of the tenant boundary.\n *\n * ## `update` — the resolver's WRITE-BACK door\n *\n * `lastUsedAt`, `validationState`, `validationError` and `lastValidatedAt` are all\n * `.excludeFromUpdate()`, so the strict re-parse on the ordinary update path strips them. The\n * trusted `updateAsSystem` path is the only one that re-attaches them, which is why it is opted\n * into here and why those fields are not client-writable: a tenant administrator must not be able\n * to declare their own credential `VALID`.\n *\n * ## `create` — deliberately NOT opted in\n *\n * A credential comes into existence only when a human supplies one. There is no seed, no\n * provisioning step and no import that should mint one on a tenant's behalf, so the system create\n * door stays shut.\n *\n * ## `exportSubject: FORBIDDEN`\n *\n * The reserved class. This row is a live credential toward a third party; a subject export that\n * carried one would hand a working secret to whoever requested the export.\n */\n /**\n * `create` is open for the reason its user-owned sibling documents at length: a credential a\n * vendor MINTS has no HTTP write that could carry it. An OAuth2 grant arrives through a redirect\n * after a tenant administrator authorized it on the vendor's consent screen, so the exchange —\n * engine code, never a request payload — is the only thing that can store it.\n */\n systemAccessPolicy: {\n exportSubject: ResourceSystemAccessMode.FORBIDDEN,\n read: ResourceSystemAccessMode.ALLOWED,\n list: ResourceSystemAccessMode.ALLOWED,\n update: ResourceSystemAccessMode.ALLOWED,\n create: ResourceSystemAccessMode.ALLOWED,\n },\n\n /**\n * Subject erasure RETAINS this row and scrubs nothing, because there is nothing here that belongs\n * to a person.\n *\n * The row is a TENANT's credential. `setByUserId` names an ACTOR — the administrator who typed it\n * — which is the first population `NO_PRINCIPAL` describes, and it is exactly the field an\n * erasure must not use as a reason to destroy the row: a tenant losing its Slack integration\n * because the admin who configured it left the company is a bug, not a privacy guarantee.\n *\n * The erasure walk cannot reach this resource in any case, because no `USERS` relationship is\n * registered for `setByUserId` — withheld deliberately, since that edge would also put a\n * credential on the Art. 15 export graph. `RETAIN_ONLY` is therefore a statement of what WOULD\n * happen rather than a path that runs today, and it is worth declaring for that reason: the next\n * author who registers a USERS edge inherits the correct answer instead of the default.\n *\n * The assertion is checked in both directions by the factory — `RETAIN_ONLY` is refused if any\n * field carries an impersonalize treatment or declares a personal-data category.\n */\n retentionPolicy: {\n mode: ErasureRetentionMode.RETAIN_ONLY,\n },\n\n dataSubjectPolicy: { kind: ResourceDataSubjectKind.NO_PRINCIPAL },\n\n coreOperations: [\n CoreResourceOperation.READ,\n CoreResourceOperation.LIST,\n CoreResourceOperation.CREATE,\n CoreResourceOperation.UPDATE,\n // Required by the ORGANIZATIONS cascade: `onParentDelete` dispatches the child's DELETE, and a\n // relationship declaring the cascade against a resource with no DELETE core operation throws at\n // config build. It is also the tenant's own \"remove this credential\" door.\n CoreResourceOperation.DELETE,\n // Route-less; `retentionPolicy` requires READ + LIST + UPDATE_MANY.\n CoreResourceOperation.UPDATE_MANY,\n ],\n\n operationsConfiguration: {\n /*\n * ORG_ADMIN everywhere, and NO super-administrator variant anywhere — a deliberate refusal, not\n * an omission.\n *\n * Every sibling security resource (org API keys, org OAuth clients) carries an `admin` variant\n * so a platform operator can support a tenant. This one does not, because the thing being\n * supported is a live credential toward a THIRD PARTY: an operator who can list, rotate or spend\n * a tenant's Slack token can act as that tenant toward Slack, and no audit event afterwards\n * makes that reversible. `administrative-continuity-floors.md` asks for the reversibility test\n * before crossing a tenant boundary, and this verb fails it in both directions — reading is\n * masked but LISTing reveals which vendors a tenant integrates with, and rotating locks the\n * tenant out of its own integration.\n *\n * The cost is real and accepted: a tenant that loses every ORG_ADMIN cannot have its credentials\n * repaired by support. That is what `organizationMembers.grantOwnership` exists for — restore an\n * administrator to the tenant, and the tenant repairs its own credentials. The repair path runs\n * through identity, where it is audited and reversible, rather than through the credential\n * store, where it would not be.\n */\n [CoreResourceOperation.READ]: {\n variants: [\n {\n variantType: ResourceOperationVariantType.API_CALL,\n isDefault: true,\n roles: [CORE_ORG_ROLES.ORG_ADMIN],\n // LOW because the value never leaves: `.isWriteOnlySecret()` redacts it at the client\n // boundary, so a READ returns metadata and a placeholder.\n riskLevel: ResourceOperationRiskLevel.LOW,\n },\n ],\n },\n\n [CoreResourceOperation.LIST]: {\n variants: [\n {\n variantType: ResourceOperationVariantType.API_CALL,\n isDefault: true,\n roles: [CORE_ORG_ROLES.ORG_ADMIN],\n riskLevel: ResourceOperationRiskLevel.LOW,\n filterFields: ORG_PROVIDER_CREDENTIALS_FILTER_FIELDS,\n sortFields: ORG_PROVIDER_CREDENTIALS_SORT_FIELDS,\n maxPaginatedResultPerPageLimit: 100,\n },\n ],\n },\n\n [CoreResourceOperation.CREATE]: {\n variants: [\n {\n variantType: ResourceOperationVariantType.API_CALL,\n isDefault: true,\n roles: [CORE_ORG_ROLES.ORG_ADMIN],\n // CRITICAL: this is the act of granting the application authority to act as the tenant\n // toward a third party.\n riskLevel: ResourceOperationRiskLevel.CRITICAL,\n },\n ],\n },\n\n [CoreResourceOperation.UPDATE]: {\n variants: [\n {\n variantType: ResourceOperationVariantType.API_CALL,\n isDefault: true,\n roles: [CORE_ORG_ROLES.ORG_ADMIN],\n riskLevel: ResourceOperationRiskLevel.CRITICAL,\n },\n ],\n },\n\n [CoreResourceOperation.DELETE]: {\n variants: [\n {\n variantType: ResourceOperationVariantType.API_CALL,\n isDefault: true,\n roles: [CORE_ORG_ROLES.ORG_ADMIN],\n riskLevel: ResourceOperationRiskLevel.CRITICAL,\n },\n ],\n },\n\n /*\n * Route-less retention plumbing. INTERNAL_CALL registers NO route, and must not be\n * REPOSITORY_ONLY: that satisfies the factory's boot-time presence guard and then fails to\n * resolve when an erasure actually runs, because the retention primitives resolve through\n * `getServiceOperationPathDefault`, which excludes REPOSITORY_ONLY.\n */\n [CoreResourceOperation.UPDATE_MANY]: {\n variants: [\n {\n variantType: ResourceOperationVariantType.INTERNAL_CALL,\n isDefault: true,\n roles: [CORE_APP_ROLES.APP_ADMIN_SUPER_ADMIN],\n riskLevel: ResourceOperationRiskLevel.CRITICAL,\n },\n ],\n },\n },\n});\n"]}
1
+ {"version":3,"file":"provider-credentials-organization.shared.resources-config.schemas.js","sourceRoot":"","sources":["../../../../src/security/connected-accounts/provider-credentials-organization.shared.resources-config.schemas.ts"],"names":[],"mappings":"AAAA;;;;;GAKG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AAG;iBACpC;aACF;SACF;QAED,CAAC,qBAAqB,CAAC,MAAM,CAAC,EAAE;YAC9B,QAAQ,EAAE;gBACR;oBACE,WAAW,EAAE,4BAA4B,CAAC,QAAQ;oBAClD,SAAS,EAAE,IAAI;oBACf,KAAK,EAAE,CAAC,cAAc,CAAC,SAAS,CAAC;oBACjC,uFAAuF;oBACvF,wBAAwB;oBACxB,SAAS,EAAE,0BAA0B,CAAC,QAAQ;iBAC/C;aACF;SACF;QAED,CAAC,qBAAqB,CAAC,MAAM,CAAC,EAAE;YAC9B,QAAQ,EAAE;gBACR;oBACE,WAAW,EAAE,4BAA4B,CAAC,QAAQ;oBAClD,SAAS,EAAE,IAAI;oBACf,KAAK,EAAE,CAAC,cAAc,CAAC,SAAS,CAAC;oBACjC,SAAS,EAAE,0BAA0B,CAAC,QAAQ;iBAC/C;aACF;SACF;QAED,CAAC,qBAAqB,CAAC,MAAM,CAAC,EAAE;YAC9B,QAAQ,EAAE;gBACR;oBACE,WAAW,EAAE,4BAA4B,CAAC,QAAQ;oBAClD,SAAS,EAAE,IAAI;oBACf,KAAK,EAAE,CAAC,cAAc,CAAC,SAAS,CAAC;oBACjC,SAAS,EAAE,0BAA0B,CAAC,QAAQ;iBAC/C;aACF;SACF;QAED;;;;;WAKG;QACH,CAAC,qBAAqB,CAAC,WAAW,CAAC,EAAE;YACnC,QAAQ,EAAE;gBACR;oBACE,WAAW,EAAE,4BAA4B,CAAC,aAAa;oBACvD,SAAS,EAAE,IAAI;oBACf,KAAK,EAAE,CAAC,cAAc,CAAC,qBAAqB,CAAC;oBAC7C,SAAS,EAAE,0BAA0B,CAAC,QAAQ;iBAC/C;aACF;SACF;KACF;CACF,CAAC,CAAC","sourcesContent":["/**\n * Organization Provider Credentials — resource configuration.\n *\n * The tenant-owned service credential toward a third-party provider. See\n * `provider-credentials.shared.schemas.ts` for what the resource is and what it deliberately is not.\n */\n\nimport { z } from 'zod';\n\nimport {\n OrganizationProviderCredentialSchema,\n ProviderCredentialValidationState,\n} from './provider-credentials.shared.schemas';\n\nimport { ErasureRetentionMode, ResourceDataSubjectKind } from '../../compliance/privacy/impersonalization.shared.schemas';\nimport { createResourceConfiguration_Initialization } from '../../resources/resources-config.shared.factory';\nimport { ResourceSystemAccessMode } from '../../resources/resources-config.shared.schemas';\nimport { CoreResourceOperation, CoreResourceType, coreResourceShared_FieldIdentifier } from '../../resources/resources.shared.core.definitions';\nimport { ResourceOperationRiskLevel, ResourceOperationVariantType, ResourceRelationship } from '../../resources/resources.shared.schemas';\nimport { CORE_APP_ROLES, CORE_ORG_ROLES } from '../authorizations/roles.shared.schemas';\n\nconst ORG_PROVIDER_CREDENTIALS_SORT_FIELDS = ['createdAt', 'updatedAt', 'providerRef', 'connectionRef', 'lastUsedAt'] as const;\n\nconst ORG_PROVIDER_CREDENTIALS_FILTER_FIELDS = {\n providerRef: z.string(),\n connectionRef: z.string(),\n secretSlug: z.string(),\n enabled: z.boolean(),\n validationState: z.enum(ProviderCredentialValidationState),\n};\n\ntype OrgProviderCredentialsCoreOperations =\n | CoreResourceOperation.READ\n | CoreResourceOperation.LIST\n | CoreResourceOperation.CREATE\n | CoreResourceOperation.UPDATE\n | CoreResourceOperation.DELETE\n | CoreResourceOperation.UPDATE_MANY;\n\nexport const orgProviderCredentialsResourceConfiguration_InitializationFactory = (\n resourcesRelationships: ResourceRelationship[],\n) => createResourceConfiguration_Initialization<\n undefined,\n OrgProviderCredentialsCoreOperations,\n typeof OrganizationProviderCredentialSchema\n>({\n mainSchema: OrganizationProviderCredentialSchema,\n resourceIdentifier: CoreResourceType.ORG_PROVIDER_CREDENTIALS,\n resourceFieldIdentifier: coreResourceShared_FieldIdentifier[CoreResourceType.ORG_PROVIDER_CREDENTIALS],\n resourceRelationships: resourcesRelationships,\n isSystemResource: true,\n\n /**\n * ## `read` / `list` — the RESOLVER's door\n *\n * A provider call happens on whatever execution context the caller holds: a batch, a queue\n * consumer, an anonymous webhook return leg. None of those carry an ORG_ADMIN role, and the\n * resolution must still work — so the resolver reads through `readAsSystem`, which is fail-closed\n * on this opt-in. The scope is supplied as the organization FK in the system context map, so the\n * bypass is of the ROLE check only, never of the tenant boundary.\n *\n * ## `update` — the resolver's WRITE-BACK door\n *\n * `lastUsedAt`, `validationState`, `validationError` and `lastValidatedAt` are all\n * `.excludeFromUpdate()`, so the strict re-parse on the ordinary update path strips them. The\n * trusted `updateAsSystem` path is the only one that re-attaches them, which is why it is opted\n * into here and why those fields are not client-writable: a tenant administrator must not be able\n * to declare their own credential `VALID`.\n *\n * ## `create` — deliberately NOT opted in\n *\n * A credential comes into existence only when a human supplies one. There is no seed, no\n * provisioning step and no import that should mint one on a tenant's behalf, so the system create\n * door stays shut.\n *\n * ## `exportSubject: FORBIDDEN`\n *\n * The reserved class. This row is a live credential toward a third party; a subject export that\n * carried one would hand a working secret to whoever requested the export.\n */\n /**\n * `create` is open for the reason its user-owned sibling documents at length: a credential a\n * vendor MINTS has no HTTP write that could carry it. An OAuth2 grant arrives through a redirect\n * after a tenant administrator authorized it on the vendor's consent screen, so the exchange —\n * engine code, never a request payload — is the only thing that can store it.\n */\n systemAccessPolicy: {\n exportSubject: ResourceSystemAccessMode.FORBIDDEN,\n read: ResourceSystemAccessMode.ALLOWED,\n list: ResourceSystemAccessMode.ALLOWED,\n update: ResourceSystemAccessMode.ALLOWED,\n create: ResourceSystemAccessMode.ALLOWED,\n },\n\n /**\n * Subject erasure RETAINS this row and scrubs nothing, because there is nothing here that belongs\n * to a person.\n *\n * The row is a TENANT's credential. `setByUserId` names an ACTOR — the administrator who typed it\n * — which is the first population `NO_PRINCIPAL` describes, and it is exactly the field an\n * erasure must not use as a reason to destroy the row: a tenant losing its Slack integration\n * because the admin who configured it left the company is a bug, not a privacy guarantee.\n *\n * The erasure walk cannot reach this resource in any case, because no `USERS` relationship is\n * registered for `setByUserId` — withheld deliberately, since that edge would also put a\n * credential on the Art. 15 export graph. `RETAIN_ONLY` is therefore a statement of what WOULD\n * happen rather than a path that runs today, and it is worth declaring for that reason: the next\n * author who registers a USERS edge inherits the correct answer instead of the default.\n *\n * The assertion is checked in both directions by the factory — `RETAIN_ONLY` is refused if any\n * field carries an impersonalize treatment or declares a personal-data category.\n */\n retentionPolicy: {\n mode: ErasureRetentionMode.RETAIN_ONLY,\n },\n\n dataSubjectPolicy: { kind: ResourceDataSubjectKind.NO_PRINCIPAL },\n\n coreOperations: [\n CoreResourceOperation.READ,\n CoreResourceOperation.LIST,\n CoreResourceOperation.CREATE,\n CoreResourceOperation.UPDATE,\n // Required by the ORGANIZATIONS cascade: `onParentDelete` dispatches the child's DELETE, and a\n // relationship declaring the cascade against a resource with no DELETE core operation throws at\n // config build. It is also the tenant's own \"remove this credential\" door.\n CoreResourceOperation.DELETE,\n // Route-less; `retentionPolicy` requires READ + LIST + UPDATE_MANY.\n CoreResourceOperation.UPDATE_MANY,\n ],\n\n operationsConfiguration: {\n /*\n * ORG_ADMIN everywhere, and NO super-administrator variant anywhere — a deliberate refusal, not\n * an omission.\n *\n * Every sibling security resource (org API keys, org OAuth clients) carries an `admin` variant\n * so a platform operator can support a tenant. This one does not, because the thing being\n * supported is a live credential toward a THIRD PARTY: an operator who can list, rotate or spend\n * a tenant's Slack token can act as that tenant toward Slack, and no audit event afterwards\n * makes that reversible. `administrative-continuity-floors.md` asks for the reversibility test\n * before crossing a tenant boundary, and this verb fails it in both directions — reading is\n * masked but LISTing reveals which vendors a tenant integrates with, and rotating locks the\n * tenant out of its own integration.\n *\n * The cost is real and accepted: a tenant that loses every ORG_ADMIN cannot have its credentials\n * repaired by support. That is what `organizationMembers.grantOwnership` exists for — restore an\n * administrator to the tenant, and the tenant repairs its own credentials. The repair path runs\n * through identity, where it is audited and reversible, rather than through the credential\n * store, where it would not be.\n */\n [CoreResourceOperation.READ]: {\n variants: [\n {\n variantType: ResourceOperationVariantType.API_CALL,\n isDefault: true,\n roles: [CORE_ORG_ROLES.ORG_ADMIN],\n // LOW because the value never leaves: `.isWriteOnlySecret()` redacts it at the client\n // boundary, so a READ returns metadata and a placeholder.\n riskLevel: ResourceOperationRiskLevel.LOW,\n },\n ],\n },\n\n [CoreResourceOperation.LIST]: {\n variants: [\n {\n variantType: ResourceOperationVariantType.API_CALL,\n isDefault: true,\n roles: [CORE_ORG_ROLES.ORG_ADMIN],\n riskLevel: ResourceOperationRiskLevel.LOW,\n filterFields: ORG_PROVIDER_CREDENTIALS_FILTER_FIELDS,\n sortFields: ORG_PROVIDER_CREDENTIALS_SORT_FIELDS,\n maxPaginatedResultPerPageLimit: 100,\n },\n ],\n },\n\n [CoreResourceOperation.CREATE]: {\n variants: [\n {\n variantType: ResourceOperationVariantType.API_CALL,\n isDefault: true,\n roles: [CORE_ORG_ROLES.ORG_ADMIN],\n // CRITICAL: this is the act of granting the application authority to act as the tenant\n // toward a third party.\n riskLevel: ResourceOperationRiskLevel.CRITICAL,\n },\n ],\n },\n\n [CoreResourceOperation.UPDATE]: {\n variants: [\n {\n variantType: ResourceOperationVariantType.API_CALL,\n isDefault: true,\n roles: [CORE_ORG_ROLES.ORG_ADMIN],\n riskLevel: ResourceOperationRiskLevel.CRITICAL,\n },\n ],\n },\n\n [CoreResourceOperation.DELETE]: {\n variants: [\n {\n variantType: ResourceOperationVariantType.API_CALL,\n isDefault: true,\n roles: [CORE_ORG_ROLES.ORG_ADMIN],\n riskLevel: ResourceOperationRiskLevel.CRITICAL,\n },\n ],\n },\n\n /*\n * Route-less retention plumbing. INTERNAL_CALL registers NO route, and must not be\n * REPOSITORY_ONLY: that satisfies the factory's boot-time presence guard and then fails to\n * resolve when an erasure actually runs, because the retention primitives resolve through\n * `getServiceOperationPathDefault`, which excludes REPOSITORY_ONLY.\n */\n [CoreResourceOperation.UPDATE_MANY]: {\n variants: [\n {\n variantType: ResourceOperationVariantType.INTERNAL_CALL,\n isDefault: true,\n roles: [CORE_APP_ROLES.APP_ADMIN_SUPER_ADMIN],\n riskLevel: ResourceOperationRiskLevel.CRITICAL,\n },\n ],\n },\n },\n});\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"provider-credentials-user.shared.resources-config.schemas.d.ts","sourceRoot":"","sources":["../../../../../src/security/connected-accounts/provider-credentials-user.shared.resources-config.schemas.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EACL,iCAAiC,EAElC,MAAM,uCAAuC,CAAC;AAI/C,OAAO,EAAE,qBAAqB,EAAwD,MAAM,mDAAmD,CAAC;AAChJ,OAAO,EAA4D,oBAAoB,EAAE,MAAM,0CAA0C,CAAC;AAa1I,KAAK,qCAAqC,GACtC,qBAAqB,CAAC,IAAI,GAC1B,qBAAqB,CAAC,IAAI,GAC1B,qBAAqB,CAAC,MAAM,GAC5B,qBAAqB,CAAC,MAAM,GAC5B,qBAAqB,CAAC,MAAM,CAAC;AAEjC,eAAO,MAAM,kEAAkE,GAC7E,wBAAwB,oBAAoB,EAAE;;;;;;;;;;;;;;;;;;;;mBAwJ9C,CAAC"}
1
+ {"version":3,"file":"provider-credentials-user.shared.resources-config.schemas.d.ts","sourceRoot":"","sources":["../../../../src/security/connected-accounts/provider-credentials-user.shared.resources-config.schemas.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EACL,iCAAiC,EAElC,MAAM,uCAAuC,CAAC;AAI/C,OAAO,EAAE,qBAAqB,EAAwD,MAAM,mDAAmD,CAAC;AAChJ,OAAO,EAA4D,oBAAoB,EAAE,MAAM,0CAA0C,CAAC;AAa1I,KAAK,qCAAqC,GACtC,qBAAqB,CAAC,IAAI,GAC1B,qBAAqB,CAAC,IAAI,GAC1B,qBAAqB,CAAC,MAAM,GAC5B,qBAAqB,CAAC,MAAM,GAC5B,qBAAqB,CAAC,MAAM,CAAC;AAEjC,eAAO,MAAM,kEAAkE,GAC7E,wBAAwB,oBAAoB,EAAE;;;;;;;;;;;;;;;;;;;;mBAwJ9C,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"provider-credentials-user.shared.resources-config.schemas.js","sourceRoot":"","sources":["../../../../../src/security/connected-accounts/provider-credentials-user.shared.resources-config.schemas.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EACL,iCAAiC,EACjC,4BAA4B,GAC7B,MAAM,uCAAuC,CAAC;AAE/C,OAAO,EAAE,0CAA0C,EAAE,MAAM,iDAAiD,CAAC;AAC7G,OAAO,EAAE,wBAAwB,EAAE,MAAM,iDAAiD,CAAC;AAC3F,OAAO,EAAE,qBAAqB,EAAE,gBAAgB,EAAE,kCAAkC,EAAE,MAAM,mDAAmD,CAAC;AAChJ,OAAO,EAAE,0BAA0B,EAAE,4BAA4B,EAAwB,MAAM,0CAA0C,CAAC;AAC1I,OAAO,EAAE,cAAc,EAAE,MAAM,wCAAwC,CAAC;AAExE,MAAM,qCAAqC,GAAG,CAAC,WAAW,EAAE,WAAW,EAAE,aAAa,EAAE,eAAe,EAAE,YAAY,CAAU,CAAC;AAEhI,MAAM,uCAAuC,GAAG;IAC9C,WAAW,EAAE,CAAC,CAAC,MAAM,EAAE;IACvB,aAAa,EAAE,CAAC,CAAC,MAAM,EAAE;IACzB,UAAU,EAAE,CAAC,CAAC,MAAM,EAAE;IACtB,OAAO,EAAE,CAAC,CAAC,OAAO,EAAE;IACpB,eAAe,EAAE,CAAC,CAAC,IAAI,CAAC,iCAAiC,CAAC;CAC3D,CAAC;AASF,MAAM,CAAC,MAAM,kEAAkE,GAAG,CAChF,sBAA8C,EAC9C,EAAE,CAAC,0CAA0C,CAI7C;IACA,UAAU,EAAE,4BAA4B;IACxC,kBAAkB,EAAE,gBAAgB,CAAC,yBAAyB;IAC9D,uBAAuB,EAAE,kCAAkC,CAAC,gBAAgB,CAAC,yBAAyB,CAAC;IACvG,qBAAqB,EAAE,sBAAsB;IAC7C,gBAAgB,EAA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C,QAAQ;oBAClD,SAAS,EAAE,IAAI;oBACf,KAAK,EAAE,CAAC,cAAc,CAAC,QAAQ,CAAC;oBAChC,yFAAyF;oBACzF,sFAAsF;oBACtF,SAAS,EAAE,0BAA0B,CAAC,QAAQ;iBAC/C;aACF;SACF;QAED,CAAC,qBAAqB,CAAC,MAAM,CAAC,EAAE;YAC9B,QAAQ,EAAE;gBACR;oBACE,WAAW,EAAE,4BAA4B,CAAC,QAAQ;oBAClD,SAAS,EAAE,IAAI;oBACf,KAAK,EAAE,CAAC,cAAc,CAAC,QAAQ,CAAC;oBAChC,SAAS,EAAE,0BAA0B,CAAC,QAAQ;iBAC/C;aACF;SACF;QAED,CAAC,qBAAqB,CAAC,MAAM,CAAC,EAAE;YAC9B,QAAQ,EAAE;gBACR;oBACE,WAAW,EAAE,4BAA4B,CAAC,QAAQ;oBAClD,SAAS,EAAE,IAAI;oBACf,KAAK,EAAE,CAAC,cAAc,CAAC,QAAQ,CAAC;oBAChC,oFAAoF;oBACpF,eAAe;oBACf,SAAS,EAAE,0BAA0B,CAAC,GAAG;iBAC1C;aACF;SACF;KACF;CACF,CAAC,CAAC","sourcesContent":["/**\n * User Provider Credentials — resource configuration.\n *\n * A PERSON's own credential toward a third party. See `provider-credentials.shared.schemas.ts` for\n * what the resource is, why it is separate from the organization-owned sibling, and why it is not a\n * delegated OAuth grant.\n */\n\nimport { z } from 'zod';\n\nimport {\n ProviderCredentialValidationState,\n UserProviderCredentialSchema,\n} from './provider-credentials.shared.schemas';\n\nimport { createResourceConfiguration_Initialization } from '../../resources/resources-config.shared.factory';\nimport { ResourceSystemAccessMode } from '../../resources/resources-config.shared.schemas';\nimport { CoreResourceOperation, CoreResourceType, coreResourceShared_FieldIdentifier } from '../../resources/resources.shared.core.definitions';\nimport { ResourceOperationRiskLevel, ResourceOperationVariantType, ResourceRelationship } from '../../resources/resources.shared.schemas';\nimport { CORE_APP_ROLES } from '../authorizations/roles.shared.schemas';\n\nconst USER_PROVIDER_CREDENTIALS_SORT_FIELDS = ['createdAt', 'updatedAt', 'providerRef', 'connectionRef', 'lastUsedAt'] as const;\n\nconst USER_PROVIDER_CREDENTIALS_FILTER_FIELDS = {\n providerRef: z.string(),\n connectionRef: z.string(),\n secretSlug: z.string(),\n enabled: z.boolean(),\n validationState: z.enum(ProviderCredentialValidationState),\n};\n\ntype UserProviderCredentialsCoreOperations =\n | CoreResourceOperation.READ\n | CoreResourceOperation.LIST\n | CoreResourceOperation.CREATE\n | CoreResourceOperation.UPDATE\n | CoreResourceOperation.DELETE;\n\nexport const userProviderCredentialsResourceConfiguration_InitializationFactory = (\n resourcesRelationships: ResourceRelationship[],\n) => createResourceConfiguration_Initialization<\n undefined,\n UserProviderCredentialsCoreOperations,\n typeof UserProviderCredentialSchema\n>({\n mainSchema: UserProviderCredentialSchema,\n resourceIdentifier: CoreResourceType.USER_PROVIDER_CREDENTIALS,\n resourceFieldIdentifier: coreResourceShared_FieldIdentifier[CoreResourceType.USER_PROVIDER_CREDENTIALS],\n resourceRelationships: resourcesRelationships,\n isSystemResource: true,\n\n /**\n * The same four system doors as the organization-owned sibling, for the same reasons: a provider\n * call runs on whatever execution context the caller holds, so the resolver reads through\n * `readAsSystem`, and writes back `lastUsedAt` / `validationState` through `updateAsSystem` because\n * those fields are `.excludeFromUpdate()` and a holder must not be able to declare their own\n * credential VALID.\n *\n * ## `create` was shut, and the sentence that shut it stopped being true\n *\n * It read: \"a credential exists only because a person supplied one.\" That is exactly right for a\n * credential somebody PASTES, and false for one a vendor MINTS. An OAuth2 grant exists because a\n * person authorized it on the vendor's own consent screen and came back through a redirect;\n * nobody ever types it, so there is no HTTP write that could carry it. Leaving the door shut would\n * mean the authorization exchange completes, the vendor records the grant, and this application\n * has nowhere to put it.\n *\n * What keeps that narrow is the door itself rather than a second check: `createAsSystem` is\n * reachable only from engine code — never an HTTP payload — its re-attach allowlist is DERIVED\n * from the schema rather than caller-supplied, and the row identity the seal binds to comes from\n * the scope map, so a caller cannot name whose credential it is writing.\n *\n * ## `exportSubject: FORBIDDEN` matters MORE here than on the sibling, and the difference is real\n *\n * The organization-owned row is unreachable on the subject-export graph anyway, because no `USERS`\n * relationship is registered for its `setByUserId` — the export walk simply never arrives. This row\n * IS reachable: `userId` is a registered `USERS` composition, which is what gives the resource its\n * USER_SELF scope in the first place. So the export walk arrives here BY CONSTRUCTION, and this\n * refusal is the only thing standing between a subject-access request and a working third-party\n * credential in the response.\n */\n systemAccessPolicy: {\n exportSubject: ResourceSystemAccessMode.FORBIDDEN,\n read: ResourceSystemAccessMode.ALLOWED,\n list: ResourceSystemAccessMode.ALLOWED,\n update: ResourceSystemAccessMode.ALLOWED,\n create: ResourceSystemAccessMode.ALLOWED,\n },\n\n /*\n * NO `retentionPolicy`, and so no `dataSubjectPolicy` (the factory pairs the two). A credential is\n * destroyed when its owner is, never kept: a secret is not personal data to pseudonymise, and a sealed\n * envelope kept after an erasure still opens against somebody who asked to be forgotten.\n *\n * This resource used to declare `retentionPolicy: RETAIN_ONLY` on the reasoning that the USERS\n * composition cascade would remove the row anyway. That held only while an erasure followed the\n * cascade's default. Since #1279 an erasure reads the CHILD's retention declaration on a silent edge,\n * because an erasure keeps the (scrubbed) USERS row and the cascade never fires. So RETAIN_ONLY meant\n * exactly what it says, and every erasure left the person's third-party tokens in place (#1569). The\n * USERS → USER_PROVIDER_CREDENTIALS edge now AUTHORS `strategy: DELETE`, so both the cascade and the\n * erasure destroy the rows, and re-adding a retain policy here would be refused as a contradiction.\n */\n\n coreOperations: [\n CoreResourceOperation.READ,\n CoreResourceOperation.LIST,\n CoreResourceOperation.CREATE,\n CoreResourceOperation.UPDATE,\n // Required by the USERS cascade and by a subject erasure, both of which dispatch this DELETE — and\n // it is also the holder's own \"remove this credential\" door.\n CoreResourceOperation.DELETE,\n ],\n\n operationsConfiguration: {\n /*\n * `APP_USER` everywhere, and NO administrative variant anywhere — a stronger refusal than the\n * organization-owned sibling's, which refuses only the PLATFORM operator.\n *\n * Here an organization administrator is refused too. The row is a key its holder authored against\n * their own account with a vendor; consent to store it is not consent for somebody else to spend\n * it, and the vendor would record the act as the holder's own. There is no support story that\n * makes that reversible, and the USER_SELF primary-scope filter is what enforces it structurally\n * rather than by a role list somebody could widen.\n *\n * The cost is that a personal credential cannot be repaired by anyone but its owner, which is the\n * correct outcome: if the person is gone, the credential should be too, and the cascade sees to it.\n */\n [CoreResourceOperation.READ]: {\n variants: [\n {\n variantType: ResourceOperationVariantType.API_CALL,\n isDefault: true,\n roles: [CORE_APP_ROLES.APP_USER],\n // LOW because the value never leaves: `.isWriteOnlySecret()` redacts it at the client\n // boundary, so a READ returns metadata and a placeholder.\n riskLevel: ResourceOperationRiskLevel.LOW,\n },\n ],\n },\n\n [CoreResourceOperation.LIST]: {\n variants: [\n {\n variantType: ResourceOperationVariantType.API_CALL,\n isDefault: true,\n roles: [CORE_APP_ROLES.APP_USER],\n riskLevel: ResourceOperationRiskLevel.LOW,\n filterFields: USER_PROVIDER_CREDENTIALS_FILTER_FIELDS,\n sortFields: USER_PROVIDER_CREDENTIALS_SORT_FIELDS,\n maxPaginatedResultPerPageLimit: 100,\n },\n ],\n },\n\n [CoreResourceOperation.CREATE]: {\n variants: [\n {\n variantType: ResourceOperationVariantType.API_CALL,\n isDefault: true,\n roles: [CORE_APP_ROLES.APP_USER],\n // CRITICAL: the act of granting this application authority to act as the person toward a\n // third party. That it is the person's own decision makes it consented, not low-risk.\n riskLevel: ResourceOperationRiskLevel.CRITICAL,\n },\n ],\n },\n\n [CoreResourceOperation.UPDATE]: {\n variants: [\n {\n variantType: ResourceOperationVariantType.API_CALL,\n isDefault: true,\n roles: [CORE_APP_ROLES.APP_USER],\n riskLevel: ResourceOperationRiskLevel.CRITICAL,\n },\n ],\n },\n\n [CoreResourceOperation.DELETE]: {\n variants: [\n {\n variantType: ResourceOperationVariantType.API_CALL,\n isDefault: true,\n roles: [CORE_APP_ROLES.APP_USER],\n // Revoking one's own credential is the safe direction and must never be harder than\n // granting it.\n riskLevel: ResourceOperationRiskLevel.LOW,\n },\n ],\n },\n },\n});\n"]}
1
+ {"version":3,"file":"provider-credentials-user.shared.resources-config.schemas.js","sourceRoot":"","sources":["../../../../src/security/connected-accounts/provider-credentials-user.shared.resources-config.schemas.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EACL,iCAAiC,EACjC,4BAA4B,GAC7B,MAAM,uCAAuC,CAAC;AAE/C,OAAO,EAAE,0CAA0C,EAAE,MAAM,iDAAiD,CAAC;AAC7G,OAAO,EAAE,wBAAwB,EAAE,MAAM,iDAAiD,CAAC;AAC3F,OAAO,EAAE,qBAAqB,EAAE,gBAAgB,EAAE,kCAAkC,EAAE,MAAM,mDAAmD,CAAC;AAChJ,OAAO,EAAE,0BAA0B,EAAE,4BAA4B,EAAwB,MAAM,0CAA0C,CAAC;AAC1I,OAAO,EAAE,cAAc,EAAE,MAAM,wCAAwC,CAAC;AAExE,MAAM,qCAAqC,GAAG,CAAC,WAAW,EAAE,WAAW,EAAE,aAAa,EAAE,eAAe,EAAE,YAAY,CAAU,CAAC;AAEhI,MAAM,uCAAuC,GAAG;IAC9C,WAAW,EAAE,CAAC,CAAC,MAAM,EAAE;IACvB,aAAa,EAAE,CAAC,CAAC,MAAM,EAAE;IACzB,UAAU,EAAE,CAAC,CAAC,MAAM,EAAE;IACtB,OAAO,EAAE,CAAC,CAAC,OAAO,EAAE;IACpB,eAAe,EAAE,CAAC,CAAC,IAAI,CAAC,iCAAiC,CAAC;CAC3D,CAAC;AASF,MAAM,CAAC,MAAM,kEAAkE,GAAG,CAChF,sBAA8C,EAC9C,EAAE,CAAC,0CAA0C,CAI7C;IACA,UAAU,EAAE,4BAA4B;IACxC,kBAAkB,EAAE,gBAAgB,CAAC,yBAAyB;IAC9D,uBAAuB,EAAE,kCAAkC,CAAC,gBAAgB,CAAC,yBAAyB,CAAC;IACvG,qBAAqB,EAAE,sBAAsB;IAC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AE,4BAA4B,CAAC,QAAQ;oBAClD,SAAS,EAAE,IAAI;oBACf,KAAK,EAAE,CAAC,cAAc,CAAC,QAAQ,CAAC;oBAChC,yFAAyF;oBACzF,sFAAsF;oBACtF,SAAS,EAAE,0BAA0B,CAAC,QAAQ;iBAC/C;aACF;SACF;QAED,CAAC,qBAAqB,CAAC,MAAM,CAAC,EAAE;YAC9B,QAAQ,EAAE;gBACR;oBACE,WAAW,EAAE,4BAA4B,CAAC,QAAQ;oBAClD,SAAS,EAAE,IAAI;oBACf,KAAK,EAAE,CAAC,cAAc,CAAC,QAAQ,CAAC;oBAChC,SAAS,EAAE,0BAA0B,CAAC,QAAQ;iBAC/C;aACF;SACF;QAED,CAAC,qBAAqB,CAAC,MAAM,CAAC,EAAE;YAC9B,QAAQ,EAAE;gBACR;oBACE,WAAW,EAAE,4BAA4B,CAAC,QAAQ;oBAClD,SAAS,EAAE,IAAI;oBACf,KAAK,EAAE,CAAC,cAAc,CAAC,QAAQ,CAAC;oBAChC,oFAAoF;oBACpF,eAAe;oBACf,SAAS,EAAE,0BAA0B,CAAC,GAAG;iBAC1C;aACF;SACF;KACF;CACF,CAAC,CAAC","sourcesContent":["/**\n * User Provider Credentials — resource configuration.\n *\n * A PERSON's own credential toward a third party. See `provider-credentials.shared.schemas.ts` for\n * what the resource is, why it is separate from the organization-owned sibling, and why it is not a\n * delegated OAuth grant.\n */\n\nimport { z } from 'zod';\n\nimport {\n ProviderCredentialValidationState,\n UserProviderCredentialSchema,\n} from './provider-credentials.shared.schemas';\n\nimport { createResourceConfiguration_Initialization } from '../../resources/resources-config.shared.factory';\nimport { ResourceSystemAccessMode } from '../../resources/resources-config.shared.schemas';\nimport { CoreResourceOperation, CoreResourceType, coreResourceShared_FieldIdentifier } from '../../resources/resources.shared.core.definitions';\nimport { ResourceOperationRiskLevel, ResourceOperationVariantType, ResourceRelationship } from '../../resources/resources.shared.schemas';\nimport { CORE_APP_ROLES } from '../authorizations/roles.shared.schemas';\n\nconst USER_PROVIDER_CREDENTIALS_SORT_FIELDS = ['createdAt', 'updatedAt', 'providerRef', 'connectionRef', 'lastUsedAt'] as const;\n\nconst USER_PROVIDER_CREDENTIALS_FILTER_FIELDS = {\n providerRef: z.string(),\n connectionRef: z.string(),\n secretSlug: z.string(),\n enabled: z.boolean(),\n validationState: z.enum(ProviderCredentialValidationState),\n};\n\ntype UserProviderCredentialsCoreOperations =\n | CoreResourceOperation.READ\n | CoreResourceOperation.LIST\n | CoreResourceOperation.CREATE\n | CoreResourceOperation.UPDATE\n | CoreResourceOperation.DELETE;\n\nexport const userProviderCredentialsResourceConfiguration_InitializationFactory = (\n resourcesRelationships: ResourceRelationship[],\n) => createResourceConfiguration_Initialization<\n undefined,\n UserProviderCredentialsCoreOperations,\n typeof UserProviderCredentialSchema\n>({\n mainSchema: UserProviderCredentialSchema,\n resourceIdentifier: CoreResourceType.USER_PROVIDER_CREDENTIALS,\n resourceFieldIdentifier: coreResourceShared_FieldIdentifier[CoreResourceType.USER_PROVIDER_CREDENTIALS],\n resourceRelationships: resourcesRelationships,\n isSystemResource: true,\n\n /**\n * The same four system doors as the organization-owned sibling, for the same reasons: a provider\n * call runs on whatever execution context the caller holds, so the resolver reads through\n * `readAsSystem`, and writes back `lastUsedAt` / `validationState` through `updateAsSystem` because\n * those fields are `.excludeFromUpdate()` and a holder must not be able to declare their own\n * credential VALID.\n *\n * ## `create` was shut, and the sentence that shut it stopped being true\n *\n * It read: \"a credential exists only because a person supplied one.\" That is exactly right for a\n * credential somebody PASTES, and false for one a vendor MINTS. An OAuth2 grant exists because a\n * person authorized it on the vendor's own consent screen and came back through a redirect;\n * nobody ever types it, so there is no HTTP write that could carry it. Leaving the door shut would\n * mean the authorization exchange completes, the vendor records the grant, and this application\n * has nowhere to put it.\n *\n * What keeps that narrow is the door itself rather than a second check: `createAsSystem` is\n * reachable only from engine code — never an HTTP payload — its re-attach allowlist is DERIVED\n * from the schema rather than caller-supplied, and the row identity the seal binds to comes from\n * the scope map, so a caller cannot name whose credential it is writing.\n *\n * ## `exportSubject: FORBIDDEN` matters MORE here than on the sibling, and the difference is real\n *\n * The organization-owned row is unreachable on the subject-export graph anyway, because no `USERS`\n * relationship is registered for its `setByUserId` — the export walk simply never arrives. This row\n * IS reachable: `userId` is a registered `USERS` composition, which is what gives the resource its\n * USER_SELF scope in the first place. So the export walk arrives here BY CONSTRUCTION, and this\n * refusal is the only thing standing between a subject-access request and a working third-party\n * credential in the response.\n */\n systemAccessPolicy: {\n exportSubject: ResourceSystemAccessMode.FORBIDDEN,\n read: ResourceSystemAccessMode.ALLOWED,\n list: ResourceSystemAccessMode.ALLOWED,\n update: ResourceSystemAccessMode.ALLOWED,\n create: ResourceSystemAccessMode.ALLOWED,\n },\n\n /*\n * NO `retentionPolicy`, and so no `dataSubjectPolicy` (the factory pairs the two). A credential is\n * destroyed when its owner is, never kept: a secret is not personal data to pseudonymise, and a sealed\n * envelope kept after an erasure still opens against somebody who asked to be forgotten.\n *\n * This resource used to declare `retentionPolicy: RETAIN_ONLY` on the reasoning that the USERS\n * composition cascade would remove the row anyway. That held only while an erasure followed the\n * cascade's default. Since #1279 an erasure reads the CHILD's retention declaration on a silent edge,\n * because an erasure keeps the (scrubbed) USERS row and the cascade never fires. So RETAIN_ONLY meant\n * exactly what it says, and every erasure left the person's third-party tokens in place (#1569). The\n * USERS → USER_PROVIDER_CREDENTIALS edge now AUTHORS `strategy: DELETE`, so both the cascade and the\n * erasure destroy the rows, and re-adding a retain policy here would be refused as a contradiction.\n */\n\n coreOperations: [\n CoreResourceOperation.READ,\n CoreResourceOperation.LIST,\n CoreResourceOperation.CREATE,\n CoreResourceOperation.UPDATE,\n // Required by the USERS cascade and by a subject erasure, both of which dispatch this DELETE — and\n // it is also the holder's own \"remove this credential\" door.\n CoreResourceOperation.DELETE,\n ],\n\n operationsConfiguration: {\n /*\n * `APP_USER` everywhere, and NO administrative variant anywhere — a stronger refusal than the\n * organization-owned sibling's, which refuses only the PLATFORM operator.\n *\n * Here an organization administrator is refused too. The row is a key its holder authored against\n * their own account with a vendor; consent to store it is not consent for somebody else to spend\n * it, and the vendor would record the act as the holder's own. There is no support story that\n * makes that reversible, and the USER_SELF primary-scope filter is what enforces it structurally\n * rather than by a role list somebody could widen.\n *\n * The cost is that a personal credential cannot be repaired by anyone but its owner, which is the\n * correct outcome: if the person is gone, the credential should be too, and the cascade sees to it.\n */\n [CoreResourceOperation.READ]: {\n variants: [\n {\n variantType: ResourceOperationVariantType.API_CALL,\n isDefault: true,\n roles: [CORE_APP_ROLES.APP_USER],\n // LOW because the value never leaves: `.isWriteOnlySecret()` redacts it at the client\n // boundary, so a READ returns metadata and a placeholder.\n riskLevel: ResourceOperationRiskLevel.LOW,\n },\n ],\n },\n\n [CoreResourceOperation.LIST]: {\n variants: [\n {\n variantType: ResourceOperationVariantType.API_CALL,\n isDefault: true,\n roles: [CORE_APP_ROLES.APP_USER],\n riskLevel: ResourceOperationRiskLevel.LOW,\n filterFields: USER_PROVIDER_CREDENTIALS_FILTER_FIELDS,\n sortFields: USER_PROVIDER_CREDENTIALS_SORT_FIELDS,\n maxPaginatedResultPerPageLimit: 100,\n },\n ],\n },\n\n [CoreResourceOperation.CREATE]: {\n variants: [\n {\n variantType: ResourceOperationVariantType.API_CALL,\n isDefault: true,\n roles: [CORE_APP_ROLES.APP_USER],\n // CRITICAL: the act of granting this application authority to act as the person toward a\n // third party. That it is the person's own decision makes it consented, not low-risk.\n riskLevel: ResourceOperationRiskLevel.CRITICAL,\n },\n ],\n },\n\n [CoreResourceOperation.UPDATE]: {\n variants: [\n {\n variantType: ResourceOperationVariantType.API_CALL,\n isDefault: true,\n roles: [CORE_APP_ROLES.APP_USER],\n riskLevel: ResourceOperationRiskLevel.CRITICAL,\n },\n ],\n },\n\n [CoreResourceOperation.DELETE]: {\n variants: [\n {\n variantType: ResourceOperationVariantType.API_CALL,\n isDefault: true,\n roles: [CORE_APP_ROLES.APP_USER],\n // Revoking one's own credential is the safe direction and must never be harder than\n // granting it.\n riskLevel: ResourceOperationRiskLevel.LOW,\n },\n ],\n },\n },\n});\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"provider-credentials.shared.schemas.d.ts","sourceRoot":"","sources":["../../../../../src/security/connected-accounts/provider-credentials.shared.schemas.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB;;;;;;;GAOG;AACH,oBAAY,iCAAiC;IAC3C,0FAA0F;IAC1F,WAAW,gBAAgB;IAC3B,gDAAgD;IAChD,KAAK,UAAU;IACf,8EAA8E;IAC9E,OAAO,YAAY;CACpB;AAED;;;;;;;;;;;GAWG;AACH,oBAAY,kCAAkC;IAC5C;;;;;OAKG;IACH,wBAAwB,6BAA6B;IACrD;;;OAGG;IACH,4BAA4B,iCAAiC;IAC7D;;;;OAIG;IACH,yBAAyB,8BAA8B;CACxD;AAED;;;;GAIG;AACH,oBAAY,gCAAgC;IAC1C;;;;OAIG;IACH,mBAAmB,wBAAwB;IAC3C,+GAA+G;IAC/G,kBAAkB,uBAAuB;CAC1C;AAED,yDAAyD;AACzD,eAAO,MAAM,4BAA4B;;;kBAGvC,CAAC;AAEH,MAAM,MAAM,sBAAsB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,4BAA4B,CAAC,CAAC;AAElF,oDAAoD;AACpD,MAAM,MAAM,uBAAuB,GAAG,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,sBAAsB,CAAC,CAAC,CAAC;AAEvF;;;;;;;;GAQG;AACH,oBAAY,kCAAkC;IAC5C,yEAAyE;IACzE,uBAAuB,4BAA4B;IACnD;;;OAGG;IACH,sBAAsB,2BAA2B;IACjD;;;;;;;;;OASG;IACH,eAAe,oBAAoB;CACpC;AAED;;;;;;;;;GASG;AACH,oBAAY,+BAA+B;IACzC;;;;;;;OAOG;IACH,OAAO,YAAY;IACnB;;;;;;OAMG;IACH,YAAY,i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;;;;GAUG;AACH,eAAO,MAAM,oCAAoC,KAAK,CAAC;AAEvD,wBAAgB,+BAA+B,CAAC,KAAK,EAAE,mBAAmB,EAAE,GAAG,GAAE,IAAiB,GAAG,OAAO,CAK3G"}
1
+ {"version":3,"file":"provider-credentials.shared.schemas.d.ts","sourceRoot":"","sources":["../../../../src/security/connected-accounts/provider-credentials.shared.schemas.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB;;;;;;;GAOG;AACH,oBAAY,iCAAiC;IAC3C,0FAA0F;IAC1F,WAAW,gBAAgB;IAC3B,gDAAgD;IAChD,KAAK,UAAU;IACf,8EAA8E;IAC9E,OAAO,YAAY;CACpB;AAED;;;;;;;;;;;GAWG;AACH,oBAAY,kCAAkC;IAC5C;;;;;OAKG;IACH,wBAAwB,6BAA6B;IACrD;;;OAGG;IACH,4BAA4B,iCAAiC;IAC7D;;;;OAIG;IACH,yBAAyB,8BAA8B;CACxD;AAED;;;;GAIG;AACH,oBAAY,gCAAgC;IAC1C;;;;OAIG;IACH,mBAAmB,wBAAwB;IAC3C,+GAA+G;IAC/G,kBAAkB,uBAAuB;CAC1C;AAED,yDAAyD;AACzD,eAAO,MAAM,4BAA4B;;;kBAGvC,CAAC;AAEH,MAAM,MAAM,sBAAsB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,4BAA4B,CAAC,CAAC;AAElF,oDAAoD;AACpD,MAAM,MAAM,uBAAuB,GAAG,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,sBAAsB,CAAC,CAAC,CAAC;AAEvF;;;;;;;;GAQG;AACH,oBAAY,kCAAkC;IAC5C,yEAAyE;IACzE,uBAAuB,4BAA4B;IACnD;;;OAGG;IACH,sBAAsB,2BAA2B;IACjD;;;;;;;;;OASG;IACH,eAAe,oBAAoB;CACpC;AAED;;;;;;;;;GASG;AACH,oBAAY,+BAA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