@wildo-ai/saas-models 1.1.2 → 1.1.4

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 (645) hide show
  1. package/dist/esm/__tests__/setup.d.ts.map +1 -1
  2. package/dist/esm/_inspect.d.ts.map +1 -1
  3. package/dist/esm/applications/application-metadata.shared.resources-config.schemas.d.ts.map +1 -1
  4. package/dist/esm/applications/application-subject.shared.schemas.d.ts.map +1 -1
  5. package/dist/esm/applications/application-versions.shared.resources-config.schemas.d.ts.map +1 -1
  6. package/dist/esm/applications/applications-context.schemas.d.ts +14 -10
  7. package/dist/esm/applications/applications-context.schemas.d.ts.map +1 -1
  8. package/dist/esm/applications/applications.shared.resources-config.schemas.d.ts.map +1 -1
  9. package/dist/esm/applications/applications.shared.resources-config.schemas.js +4 -3
  10. package/dist/esm/applications/applications.shared.resources-config.schemas.js.map +1 -1
  11. package/dist/esm/applications/applications.shared.schemas.d.ts.map +1 -1
  12. package/dist/esm/billing/billing-account.shared.resources-config.schemas.d.ts.map +1 -1
  13. package/dist/esm/billing/billing-account.shared.schemas.d.ts.map +1 -1
  14. package/dist/esm/billing/billing-configuration.shared.schemas.d.ts +0 -4
  15. package/dist/esm/billing/billing-configuration.shared.schemas.d.ts.map +1 -1
  16. package/dist/esm/billing/billing-configuration.shared.schemas.js +59 -17
  17. package/dist/esm/billing/billing-configuration.shared.schemas.js.map +1 -1
  18. package/dist/esm/billing/billing-enums.shared.schemas.d.ts +77 -21
  19. package/dist/esm/billing/billing-enums.shared.schemas.d.ts.map +1 -1
  20. package/dist/esm/billing/billing-enums.shared.schemas.js +85 -23
  21. package/dist/esm/billing/billing-enums.shared.schemas.js.map +1 -1
  22. package/dist/esm/billing/billing-types.shared.schemas.d.ts +4 -3
  23. package/dist/esm/billing/billing-types.shared.schemas.d.ts.map +1 -1
  24. package/dist/esm/billing/billing-types.shared.schemas.js +45 -0
  25. package/dist/esm/billing/billing-types.shared.schemas.js.map +1 -1
  26. package/dist/esm/billing/credit-pool.shared.resources-config.schemas.d.ts.map +1 -1
  27. package/dist/esm/billing/credit-pool.shared.schemas.d.ts.map +1 -1
  28. package/dist/esm/billing/invoice-ref.shared.resources-config.schemas.d.ts.map +1 -1
  29. package/dist/esm/billing/invoice-ref.shared.schemas.d.ts.map +1 -1
  30. package/dist/esm/billing/price.shared.resources-config.schemas.d.ts.map +1 -1
  31. package/dist/esm/billing/price.shared.schemas.d.ts.map +1 -1
  32. package/dist/esm/billing/price.shared.schemas.js +7 -1
  33. package/dist/esm/billing/price.shared.schemas.js.map +1 -1
  34. package/dist/esm/billing/product-behavior-policy.shared.schemas.d.ts.map +1 -1
  35. package/dist/esm/billing/product-behavior-policy.shared.schemas.js +52 -11
  36. package/dist/esm/billing/product-behavior-policy.shared.schemas.js.map +1 -1
  37. package/dist/esm/billing/product-definition.shared.schemas.d.ts +2 -2
  38. package/dist/esm/billing/product-definition.shared.schemas.d.ts.map +1 -1
  39. package/dist/esm/billing/product.shared.resources-config.schemas.d.ts +2 -2
  40. package/dist/esm/billing/product.shared.resources-config.schemas.d.ts.map +1 -1
  41. package/dist/esm/billing/product.shared.schemas.d.ts +2 -2
  42. package/dist/esm/billing/product.shared.schemas.d.ts.map +1 -1
  43. package/dist/esm/billing/product.shared.schemas.js +7 -3
  44. package/dist/esm/billing/product.shared.schemas.js.map +1 -1
  45. package/dist/esm/billing/promotions.shared.resources-config.schemas.d.ts.map +1 -1
  46. package/dist/esm/billing/promotions.shared.schemas.d.ts.map +1 -1
  47. package/dist/esm/billing/referral.shared.resources-config.schemas.d.ts.map +1 -1
  48. package/dist/esm/billing/referral.shared.schemas.d.ts.map +1 -1
  49. package/dist/esm/billing/subscription.shared.resources-config.schemas.d.ts +1 -1
  50. package/dist/esm/billing/subscription.shared.resources-config.schemas.d.ts.map +1 -1
  51. package/dist/esm/billing/subscription.shared.resources-config.schemas.js +15 -1
  52. package/dist/esm/billing/subscription.shared.resources-config.schemas.js.map +1 -1
  53. package/dist/esm/billing/subscription.shared.schemas.d.ts.map +1 -1
  54. package/dist/esm/billing/usage-record.shared.resources-config.schemas.d.ts.map +1 -1
  55. package/dist/esm/billing/usage-record.shared.schemas.d.ts +7 -3
  56. package/dist/esm/billing/usage-record.shared.schemas.d.ts.map +1 -1
  57. package/dist/esm/billing/usage-record.shared.schemas.js +22 -3
  58. package/dist/esm/billing/usage-record.shared.schemas.js.map +1 -1
  59. package/dist/esm/charts/aggregation-query.shared.schemas.d.ts.map +1 -1
  60. package/dist/esm/charts/chart-definition-builder.shared.d.ts.map +1 -1
  61. package/dist/esm/companion/provider-discovery.shared.schemas.d.ts +71 -2
  62. package/dist/esm/companion/provider-discovery.shared.schemas.d.ts.map +1 -1
  63. package/dist/esm/companion/provider-discovery.shared.schemas.js +20 -1
  64. package/dist/esm/companion/provider-discovery.shared.schemas.js.map +1 -1
  65. package/dist/esm/companion/shared-library-companion.shared.definitions.d.ts.map +1 -1
  66. package/dist/esm/companion-exports.d.ts.map +1 -1
  67. package/dist/esm/compliance/audit-trails/application-audit-logs.shared.resources-config.schemas.d.ts +85 -0
  68. package/dist/esm/compliance/audit-trails/application-audit-logs.shared.resources-config.schemas.d.ts.map +1 -0
  69. package/dist/esm/compliance/audit-trails/application-audit-logs.shared.resources-config.schemas.js +157 -0
  70. package/dist/esm/compliance/audit-trails/application-audit-logs.shared.resources-config.schemas.js.map +1 -0
  71. package/dist/esm/compliance/audit-trails/audit-log-sink.shared.schemas.d.ts.map +1 -1
  72. package/dist/esm/compliance/audit-trails/audit-logs.shared.resources-config.schemas.d.ts.map +1 -1
  73. package/dist/esm/compliance/audit-trails/audit-trail-config.shared.schemas.d.ts +23 -0
  74. package/dist/esm/compliance/audit-trails/audit-trail-config.shared.schemas.d.ts.map +1 -1
  75. package/dist/esm/compliance/audit-trails/audit-trail-config.shared.schemas.js +56 -0
  76. package/dist/esm/compliance/audit-trails/audit-trail-config.shared.schemas.js.map +1 -1
  77. package/dist/esm/compliance/audit-trails/auditable-events.shared.schema.d.ts +658 -26
  78. package/dist/esm/compliance/audit-trails/auditable-events.shared.schema.d.ts.map +1 -1
  79. package/dist/esm/compliance/audit-trails/auditable-events.shared.schema.js +873 -27
  80. package/dist/esm/compliance/audit-trails/auditable-events.shared.schema.js.map +1 -1
  81. package/dist/esm/compliance/audit-trails/security-audit-event-envelope.shared.schema.d.ts.map +1 -1
  82. package/dist/esm/compliance/audit-trails/security-audit-event-envelope.shared.schema.js +104 -3
  83. package/dist/esm/compliance/audit-trails/security-audit-event-envelope.shared.schema.js.map +1 -1
  84. package/dist/esm/compliance/documents/governed-documents.shared.schemas.d.ts.map +1 -1
  85. package/dist/esm/compliance/privacy/ai-use-posture.shared.schemas.d.ts.map +1 -1
  86. package/dist/esm/compliance/privacy/client-storage.shared.schemas.d.ts.map +1 -1
  87. package/dist/esm/compliance/privacy/data-retention.shared.schemas.d.ts.map +1 -1
  88. package/dist/esm/compliance/privacy/impersonalization-scrub.shared.utils.d.ts.map +1 -1
  89. package/dist/esm/compliance/privacy/impersonalization.shared.schemas.d.ts.map +1 -1
  90. package/dist/esm/compliance/privacy/operating-jurisdictions.shared.schemas.d.ts +54 -26
  91. package/dist/esm/compliance/privacy/operating-jurisdictions.shared.schemas.d.ts.map +1 -1
  92. package/dist/esm/compliance/privacy/operating-jurisdictions.shared.schemas.js +132 -3
  93. package/dist/esm/compliance/privacy/operating-jurisdictions.shared.schemas.js.map +1 -1
  94. package/dist/esm/compliance/privacy/operator-compliance-identity.shared.schemas.d.ts.map +1 -1
  95. package/dist/esm/compliance/privacy/personal-data-category.shared.schemas.d.ts.map +1 -1
  96. package/dist/esm/compliance/privacy/personal-data-declaration.shared.utils.d.ts.map +1 -1
  97. package/dist/esm/compliance/privacy/privacy.shared.schemas.d.ts +17 -0
  98. package/dist/esm/compliance/privacy/privacy.shared.schemas.d.ts.map +1 -1
  99. package/dist/esm/compliance/privacy/privacy.shared.schemas.js +27 -4
  100. package/dist/esm/compliance/privacy/privacy.shared.schemas.js.map +1 -1
  101. package/dist/esm/compliance/privacy/redaction.shared.schemas.d.ts +82 -29
  102. package/dist/esm/compliance/privacy/redaction.shared.schemas.d.ts.map +1 -1
  103. package/dist/esm/compliance/privacy/redaction.shared.schemas.js +95 -29
  104. package/dist/esm/compliance/privacy/redaction.shared.schemas.js.map +1 -1
  105. package/dist/esm/compliance/privacy/retention-schedule.shared.schemas.d.ts.map +1 -1
  106. package/dist/esm/compliance/privacy/subject-erasure.shared.schemas.d.ts.map +1 -1
  107. package/dist/esm/compliance/privacy/subject-export-render.shared.utils.d.ts.map +1 -1
  108. package/dist/esm/compliance/privacy/subject-export.shared.schemas.d.ts.map +1 -1
  109. package/dist/esm/compliance/privacy/subject-export.shared.schemas.js +12 -5
  110. package/dist/esm/compliance/privacy/subject-export.shared.schemas.js.map +1 -1
  111. package/dist/esm/config/analytics-value-moments.shared.schemas.d.ts +21 -0
  112. package/dist/esm/config/analytics-value-moments.shared.schemas.d.ts.map +1 -1
  113. package/dist/esm/config/analytics-value-moments.shared.schemas.js +20 -0
  114. package/dist/esm/config/analytics-value-moments.shared.schemas.js.map +1 -1
  115. package/dist/esm/config/app-configuration-shared.shared.schemas.d.ts +7 -5
  116. package/dist/esm/config/app-configuration-shared.shared.schemas.d.ts.map +1 -1
  117. package/dist/esm/config/auth-config-resolution.shared.utils.d.ts +8 -1
  118. package/dist/esm/config/auth-config-resolution.shared.utils.d.ts.map +1 -1
  119. package/dist/esm/config/auth-config-resolution.shared.utils.js +29 -0
  120. package/dist/esm/config/auth-config-resolution.shared.utils.js.map +1 -1
  121. package/dist/esm/config/brand-assets.shared.schemas.d.ts.map +1 -1
  122. package/dist/esm/config/entity-identity-config.shared.schemas.d.ts +95 -17
  123. package/dist/esm/config/entity-identity-config.shared.schemas.d.ts.map +1 -1
  124. package/dist/esm/config/entity-identity-config.shared.schemas.js +86 -8
  125. package/dist/esm/config/entity-identity-config.shared.schemas.js.map +1 -1
  126. package/dist/esm/config/frontend/chart-definition.shared.schemas.d.ts +26 -26
  127. package/dist/esm/config/frontend/chart-definition.shared.schemas.d.ts.map +1 -1
  128. package/dist/esm/config/frontend/chart-registration-alignment.shared.d.ts +139 -3
  129. package/dist/esm/config/frontend/chart-registration-alignment.shared.d.ts.map +1 -1
  130. package/dist/esm/config/frontend/chart-registration-alignment.shared.js +151 -4
  131. package/dist/esm/config/frontend/chart-registration-alignment.shared.js.map +1 -1
  132. package/dist/esm/config/frontend/navigation.shared.schemas.d.ts.map +1 -1
  133. package/dist/esm/config/frontend/onboarding.shared.schemas.d.ts.map +1 -1
  134. package/dist/esm/config/registration-acquisition-policy.shared.utils.d.ts.map +1 -1
  135. package/dist/esm/config-authoring.entry.d.ts.map +1 -1
  136. package/dist/esm/crdt/crdt-merge.shared.utils.d.ts.map +1 -1
  137. package/dist/esm/data-seeding/data-seeding-config.shared.schemas.d.ts.map +1 -1
  138. package/dist/esm/errors/errors.custom-message-ref.shared.definitions.d.ts +34 -0
  139. package/dist/esm/errors/errors.custom-message-ref.shared.definitions.d.ts.map +1 -1
  140. package/dist/esm/errors/errors.custom-message-ref.shared.definitions.js +34 -0
  141. package/dist/esm/errors/errors.custom-message-ref.shared.definitions.js.map +1 -1
  142. package/dist/esm/errors/errors.shared.definitions.d.ts.map +1 -1
  143. package/dist/esm/errors/errors.shared.schemas.d.ts.map +1 -1
  144. package/dist/esm/errors/errors.shared.utils.d.ts.map +1 -1
  145. package/dist/esm/external-data/external-data-pipeline.shared.schemas.d.ts +45 -12
  146. package/dist/esm/external-data/external-data-pipeline.shared.schemas.d.ts.map +1 -1
  147. package/dist/esm/external-data/external-data-pipeline.shared.schemas.js.map +1 -1
  148. package/dist/esm/external-data.exports.d.ts.map +1 -1
  149. package/dist/esm/external-providers/compose-provider-registry.shared.d.ts.map +1 -1
  150. package/dist/esm/external-providers/engine-capabilities.shared.schemas.d.ts +110 -58
  151. package/dist/esm/external-providers/engine-capabilities.shared.schemas.d.ts.map +1 -1
  152. package/dist/esm/external-providers/engine-capabilities.shared.schemas.js +183 -15
  153. package/dist/esm/external-providers/engine-capabilities.shared.schemas.js.map +1 -1
  154. package/dist/esm/external-providers/engine-capability-resolution-mode.shared.d.ts +15 -3
  155. package/dist/esm/external-providers/engine-capability-resolution-mode.shared.d.ts.map +1 -1
  156. package/dist/esm/external-providers/engine-capability-resolution-mode.shared.js +32 -5
  157. package/dist/esm/external-providers/engine-capability-resolution-mode.shared.js.map +1 -1
  158. package/dist/esm/external-providers/external-providers.shared.schemas.d.ts.map +1 -1
  159. package/dist/esm/external-providers/frontend-bootstrap.shared.schemas.d.ts +87 -7
  160. package/dist/esm/external-providers/frontend-bootstrap.shared.schemas.d.ts.map +1 -1
  161. package/dist/esm/external-providers/frontend-capability-public-config.shared.schemas.d.ts +59 -0
  162. package/dist/esm/external-providers/frontend-capability-public-config.shared.schemas.d.ts.map +1 -0
  163. package/dist/esm/external-providers/frontend-capability-public-config.shared.schemas.js +61 -0
  164. package/dist/esm/external-providers/frontend-capability-public-config.shared.schemas.js.map +1 -0
  165. package/dist/esm/external-providers/frontend-capability-runtime.shared.types.d.ts +97 -0
  166. package/dist/esm/external-providers/frontend-capability-runtime.shared.types.d.ts.map +1 -0
  167. package/dist/esm/external-providers/frontend-capability-runtime.shared.types.js +41 -0
  168. package/dist/esm/external-providers/frontend-capability-runtime.shared.types.js.map +1 -0
  169. package/dist/esm/external-providers/frontend-provider-entry.shared.schemas.d.ts +205 -2
  170. package/dist/esm/external-providers/frontend-provider-entry.shared.schemas.d.ts.map +1 -1
  171. package/dist/esm/external-providers/frontend-provider-entry.shared.schemas.js +85 -1
  172. package/dist/esm/external-providers/frontend-provider-entry.shared.schemas.js.map +1 -1
  173. package/dist/esm/external-providers/frontend-provider-public-config.shared.d.ts +175 -0
  174. package/dist/esm/external-providers/frontend-provider-public-config.shared.d.ts.map +1 -0
  175. package/dist/esm/external-providers/frontend-provider-public-config.shared.js +207 -0
  176. package/dist/esm/external-providers/frontend-provider-public-config.shared.js.map +1 -0
  177. package/dist/esm/external-providers/provider-capability.shared.schemas.d.ts +5 -28
  178. package/dist/esm/external-providers/provider-capability.shared.schemas.d.ts.map +1 -1
  179. package/dist/esm/external-providers/provider-capability.shared.schemas.js +4 -2
  180. package/dist/esm/external-providers/provider-capability.shared.schemas.js.map +1 -1
  181. package/dist/esm/external-providers/provider-compliance-profile.shared.schemas.d.ts +28 -8
  182. package/dist/esm/external-providers/provider-compliance-profile.shared.schemas.d.ts.map +1 -1
  183. package/dist/esm/external-providers/provider-compliance-profile.shared.schemas.js +15 -4
  184. package/dist/esm/external-providers/provider-compliance-profile.shared.schemas.js.map +1 -1
  185. package/dist/esm/external-providers/provider-frontend-component-contract.shared.types.d.ts +165 -0
  186. package/dist/esm/external-providers/provider-frontend-component-contract.shared.types.d.ts.map +1 -0
  187. package/dist/esm/external-providers/provider-frontend-component-contract.shared.types.js +39 -0
  188. package/dist/esm/external-providers/provider-frontend-component-contract.shared.types.js.map +1 -0
  189. package/dist/esm/external-providers/provider-frontend-surface.shared.schemas.d.ts +338 -0
  190. package/dist/esm/external-providers/provider-frontend-surface.shared.schemas.d.ts.map +1 -0
  191. package/dist/esm/external-providers/provider-frontend-surface.shared.schemas.js +332 -0
  192. package/dist/esm/external-providers/provider-frontend-surface.shared.schemas.js.map +1 -0
  193. package/dist/esm/external-providers/provider-metadata.shared.schemas.d.ts +178 -9
  194. package/dist/esm/external-providers/provider-metadata.shared.schemas.d.ts.map +1 -1
  195. package/dist/esm/external-providers/provider-metadata.shared.schemas.js +181 -9
  196. package/dist/esm/external-providers/provider-metadata.shared.schemas.js.map +1 -1
  197. package/dist/esm/external-providers/provider-protocol.shared.schemas.d.ts +7 -5
  198. package/dist/esm/external-providers/provider-protocol.shared.schemas.d.ts.map +1 -1
  199. package/dist/esm/external-providers/provider-protocol.shared.schemas.js +7 -5
  200. package/dist/esm/external-providers/provider-protocol.shared.schemas.js.map +1 -1
  201. package/dist/esm/external-providers/provider-tier-rule.shared.utils.d.ts +40 -0
  202. package/dist/esm/external-providers/provider-tier-rule.shared.utils.d.ts.map +1 -0
  203. package/dist/esm/external-providers/provider-tier-rule.shared.utils.js +80 -0
  204. package/dist/esm/external-providers/provider-tier-rule.shared.utils.js.map +1 -0
  205. package/dist/esm/external-providers/provider-usage-pricing.shared.schemas.d.ts.map +1 -1
  206. package/dist/esm/features/application-features.shared.resources-config.schemas.d.ts.map +1 -1
  207. package/dist/esm/features/application-features.shared.resources-config.schemas.js +12 -0
  208. package/dist/esm/features/application-features.shared.resources-config.schemas.js.map +1 -1
  209. package/dist/esm/features/core-feature-definitions.shared.d.ts.map +1 -1
  210. package/dist/esm/features/core-feature-definitions.shared.js +7 -1
  211. package/dist/esm/features/core-feature-definitions.shared.js.map +1 -1
  212. package/dist/esm/features/feature-builders.shared.d.ts +32 -0
  213. package/dist/esm/features/feature-builders.shared.d.ts.map +1 -1
  214. package/dist/esm/features/feature-builders.shared.js +32 -0
  215. package/dist/esm/features/feature-builders.shared.js.map +1 -1
  216. package/dist/esm/features/feature-definition.shared.schemas.d.ts.map +1 -1
  217. package/dist/esm/features/feature-registry.shared.d.ts.map +1 -1
  218. package/dist/esm/features/feature-resolution.shared.schemas.d.ts.map +1 -1
  219. package/dist/esm/features/scope-features.shared.schemas.d.ts.map +1 -1
  220. package/dist/esm/features/user-features.shared.resources-config.schemas.d.ts.map +1 -1
  221. package/dist/esm/features/user-features.shared.resources-config.schemas.js +12 -0
  222. package/dist/esm/features/user-features.shared.resources-config.schemas.js.map +1 -1
  223. package/dist/esm/files/file-remote-reference-link.shared.schemas.d.ts +73 -0
  224. package/dist/esm/files/file-remote-reference-link.shared.schemas.d.ts.map +1 -0
  225. package/dist/esm/files/file-remote-reference-link.shared.schemas.js +62 -0
  226. package/dist/esm/files/file-remote-reference-link.shared.schemas.js.map +1 -0
  227. package/dist/esm/files/file-upload-grant.shared.schemas.d.ts +14 -2
  228. package/dist/esm/files/file-upload-grant.shared.schemas.d.ts.map +1 -1
  229. package/dist/esm/files/file-upload-grant.shared.schemas.js +44 -5
  230. package/dist/esm/files/file-upload-grant.shared.schemas.js.map +1 -1
  231. package/dist/esm/files/files.shared.resources-config.schemas.d.ts.map +1 -1
  232. package/dist/esm/files/files.shared.schemas.d.ts +15 -8
  233. package/dist/esm/files/files.shared.schemas.d.ts.map +1 -1
  234. package/dist/esm/files/files.shared.schemas.js +15 -8
  235. package/dist/esm/files/files.shared.schemas.js.map +1 -1
  236. package/dist/esm/files/files.shared.utils.d.ts.map +1 -1
  237. package/dist/esm/flows-actors/a2a-push-delivery-log.shared.resources-config.schemas.d.ts.map +1 -1
  238. package/dist/esm/flows-actors/a2a-push-delivery-log.shared.schemas.d.ts.map +1 -1
  239. package/dist/esm/flows-actors/a2a-token-budget-state.shared.resources-config.schemas.d.ts.map +1 -1
  240. package/dist/esm/flows-actors/a2a-token-budget-state.shared.schemas.d.ts.map +1 -1
  241. package/dist/esm/flows-actors/actors.shared.schemas.d.ts.map +1 -1
  242. package/dist/esm/flows-actors/actors.shared.schemas.js +3 -2
  243. package/dist/esm/flows-actors/actors.shared.schemas.js.map +1 -1
  244. package/dist/esm/flows-actors/agent-traceability.shared.schemas.d.ts.map +1 -1
  245. package/dist/esm/flows-actors/agents.shared.schemas.d.ts +54 -5
  246. package/dist/esm/flows-actors/agents.shared.schemas.d.ts.map +1 -1
  247. package/dist/esm/flows-actors/agents.shared.schemas.js.map +1 -1
  248. package/dist/esm/flows-actors/apps-blueprint/apps-blueprint.shared.schemas.d.ts.map +1 -1
  249. package/dist/esm/flows-actors/apps-blueprint/artifacts.apps-blueprint.shared.schemas.d.ts.map +1 -1
  250. package/dist/esm/flows-actors/deliberation.shared.schemas.d.ts +0 -3
  251. package/dist/esm/flows-actors/deliberation.shared.schemas.d.ts.map +1 -1
  252. package/dist/esm/flows-actors/deliberation.shared.schemas.js +0 -5
  253. package/dist/esm/flows-actors/deliberation.shared.schemas.js.map +1 -1
  254. package/dist/esm/flows-actors/flows-actors-execution.shared.resources-config.schemas.d.ts.map +1 -1
  255. package/dist/esm/flows-actors/flows-actors-execution.shared.schemas.d.ts +14 -0
  256. package/dist/esm/flows-actors/flows-actors-execution.shared.schemas.d.ts.map +1 -1
  257. package/dist/esm/flows-actors/flows-actors-execution.shared.schemas.js +40 -3
  258. package/dist/esm/flows-actors/flows-actors-execution.shared.schemas.js.map +1 -1
  259. package/dist/esm/flows-actors/flows-actors-task.shared.resources-config.schemas.d.ts.map +1 -1
  260. package/dist/esm/flows-actors/flows-actors-task.shared.schemas.d.ts.map +1 -1
  261. package/dist/esm/flows-actors/flows-actors.commons.shared.schemas.d.ts +19 -0
  262. package/dist/esm/flows-actors/flows-actors.commons.shared.schemas.d.ts.map +1 -1
  263. package/dist/esm/flows-actors/flows-actors.commons.shared.schemas.js +33 -0
  264. package/dist/esm/flows-actors/flows-actors.commons.shared.schemas.js.map +1 -1
  265. package/dist/esm/flows-actors/flows-actors.configuration.shared.schemas.d.ts.map +1 -1
  266. package/dist/esm/flows-actors/flows-actors.frontend.shared.schemas.d.ts.map +1 -1
  267. package/dist/esm/flows-actors/flows-actors.io.shared.schemas.d.ts +14 -9
  268. package/dist/esm/flows-actors/flows-actors.io.shared.schemas.d.ts.map +1 -1
  269. package/dist/esm/flows-actors/flows-actors.io.shared.schemas.js +14 -9
  270. package/dist/esm/flows-actors/flows-actors.io.shared.schemas.js.map +1 -1
  271. package/dist/esm/flows-actors/flows-actors.system.shared.definitions.d.ts.map +1 -1
  272. package/dist/esm/flows-actors/flows-actors.system.shared.schemas.d.ts.map +1 -1
  273. package/dist/esm/flows-actors/flows-actors.system.shared.schemas.js +3 -2
  274. package/dist/esm/flows-actors/flows-actors.system.shared.schemas.js.map +1 -1
  275. package/dist/esm/flows-actors/flows.shared.schemas.d.ts.map +1 -1
  276. package/dist/esm/flows-actors/flows.shared.schemas.js +3 -2
  277. package/dist/esm/flows-actors/flows.shared.schemas.js.map +1 -1
  278. package/dist/esm/flows-actors/mcp-servers.shared.schemas.d.ts +130 -0
  279. package/dist/esm/flows-actors/mcp-servers.shared.schemas.d.ts.map +1 -0
  280. package/dist/esm/flows-actors/mcp-servers.shared.schemas.js +153 -0
  281. package/dist/esm/flows-actors/mcp-servers.shared.schemas.js.map +1 -0
  282. package/dist/esm/flows-actors/meta-workflows/actions.meta-workflows.shared.schemas.d.ts.map +1 -1
  283. package/dist/esm/flows-actors/meta-workflows/budget-authority.meta-workflows.shared.schemas.d.ts +0 -3
  284. package/dist/esm/flows-actors/meta-workflows/budget-authority.meta-workflows.shared.schemas.d.ts.map +1 -1
  285. package/dist/esm/flows-actors/meta-workflows/budget-authority.meta-workflows.shared.schemas.js +1 -4
  286. package/dist/esm/flows-actors/meta-workflows/budget-authority.meta-workflows.shared.schemas.js.map +1 -1
  287. package/dist/esm/flows-actors/meta-workflows/catalog.meta-workflows.shared.schemas.d.ts.map +1 -1
  288. package/dist/esm/flows-actors/meta-workflows/context-selection.meta-workflows.shared.schemas.d.ts +0 -16
  289. package/dist/esm/flows-actors/meta-workflows/context-selection.meta-workflows.shared.schemas.d.ts.map +1 -1
  290. package/dist/esm/flows-actors/meta-workflows/context-selection.meta-workflows.shared.schemas.js +1 -17
  291. package/dist/esm/flows-actors/meta-workflows/context-selection.meta-workflows.shared.schemas.js.map +1 -1
  292. package/dist/esm/flows-actors/meta-workflows/continuity-identifiers.meta-workflows.shared.schemas.d.ts.map +1 -1
  293. package/dist/esm/flows-actors/meta-workflows/decisions.meta-workflows.shared.schemas.d.ts +3 -3
  294. package/dist/esm/flows-actors/meta-workflows/decisions.meta-workflows.shared.schemas.d.ts.map +1 -1
  295. package/dist/esm/flows-actors/meta-workflows/decisions.meta-workflows.shared.schemas.js +3 -3
  296. package/dist/esm/flows-actors/meta-workflows/decisions.meta-workflows.shared.schemas.js.map +1 -1
  297. package/dist/esm/flows-actors/meta-workflows/execution-binding-common.meta-workflows.shared.schemas.d.ts +2 -8
  298. package/dist/esm/flows-actors/meta-workflows/execution-binding-common.meta-workflows.shared.schemas.d.ts.map +1 -1
  299. package/dist/esm/flows-actors/meta-workflows/execution-binding-common.meta-workflows.shared.schemas.js +4 -15
  300. package/dist/esm/flows-actors/meta-workflows/execution-binding-common.meta-workflows.shared.schemas.js.map +1 -1
  301. package/dist/esm/flows-actors/meta-workflows/portable-primitives.meta-workflows.shared.schemas.d.ts.map +1 -1
  302. package/dist/esm/flows-actors/prompt-ir.shared.schemas.d.ts.map +1 -1
  303. package/dist/esm/flows-actors/task-continuity-binding.actors.shared.schemas.d.ts.map +1 -1
  304. package/dist/esm/flows-actors/tasks.actors.shared.schemas.d.ts.map +1 -1
  305. package/dist/esm/frontend-definitions/settings-destination-ref.definitions.d.ts +112 -0
  306. package/dist/esm/frontend-definitions/settings-destination-ref.definitions.d.ts.map +1 -0
  307. package/dist/esm/frontend-definitions/settings-destination-ref.definitions.js +113 -0
  308. package/dist/esm/frontend-definitions/settings-destination-ref.definitions.js.map +1 -0
  309. package/dist/esm/guidance/guidance-flow.shared.schemas.d.ts.map +1 -1
  310. package/dist/esm/guidance/guidance-state.shared.resources-config.schemas.d.ts.map +1 -1
  311. package/dist/esm/guidance/guidance-state.shared.schemas.d.ts.map +1 -1
  312. package/dist/esm/guidance/guidance-state.shared.utils.d.ts.map +1 -1
  313. package/dist/esm/guidance/guidance-state.shared.utils.js +1 -0
  314. package/dist/esm/guidance/guidance-state.shared.utils.js.map +1 -1
  315. package/dist/esm/guidance/lifecycle-config.shared.schemas.d.ts.map +1 -1
  316. package/dist/esm/guidance/lifecycle-state.shared.resources-config.schemas.d.ts.map +1 -1
  317. package/dist/esm/guidance/lifecycle-state.shared.schemas.d.ts.map +1 -1
  318. package/dist/esm/guidance/milestone-builders.shared.d.ts.map +1 -1
  319. package/dist/esm/guidance/milestone-definition.shared.schemas.d.ts.map +1 -1
  320. package/dist/esm/guidance/progression-state.shared.resources-config.schemas.d.ts +8 -0
  321. package/dist/esm/guidance/progression-state.shared.resources-config.schemas.d.ts.map +1 -1
  322. package/dist/esm/guidance/progression-state.shared.schemas.d.ts +46 -0
  323. package/dist/esm/guidance/progression-state.shared.schemas.d.ts.map +1 -1
  324. package/dist/esm/guidance/progression-state.shared.schemas.js +49 -0
  325. package/dist/esm/guidance/progression-state.shared.schemas.js.map +1 -1
  326. package/dist/esm/http-api-binding/http-api-binding-id.shared.utils.d.ts.map +1 -1
  327. package/dist/esm/http-api-binding/http-api-binding.shared.schemas.d.ts +320 -50
  328. package/dist/esm/http-api-binding/http-api-binding.shared.schemas.d.ts.map +1 -1
  329. package/dist/esm/http-api-binding/http-api-binding.shared.schemas.js +137 -36
  330. package/dist/esm/http-api-binding/http-api-binding.shared.schemas.js.map +1 -1
  331. package/dist/esm/i18n/labelling.dto.shared.schemas.d.ts.map +1 -1
  332. package/dist/esm/index.d.ts +15 -0
  333. package/dist/esm/index.d.ts.map +1 -1
  334. package/dist/esm/index.js +15 -0
  335. package/dist/esm/index.js.map +1 -1
  336. package/dist/esm/meta-workflows.exports.d.ts.map +1 -1
  337. package/dist/esm/monitoring/monitoring.shared.schemas.d.ts.map +1 -1
  338. package/dist/esm/notifications/email/email-context.shared.schemas.d.ts.map +1 -1
  339. package/dist/esm/notifications/email/email-template-registry.shared.schemas.d.ts +11 -2
  340. package/dist/esm/notifications/email/email-template-registry.shared.schemas.d.ts.map +1 -1
  341. package/dist/esm/notifications/email/email-template-registry.shared.schemas.js.map +1 -1
  342. package/dist/esm/notifications/email/email-template.shared.enums.d.ts +15 -0
  343. package/dist/esm/notifications/email/email-template.shared.enums.d.ts.map +1 -1
  344. package/dist/esm/notifications/email/email-template.shared.enums.js +15 -0
  345. package/dist/esm/notifications/email/email-template.shared.enums.js.map +1 -1
  346. package/dist/esm/notifications/m2m/m2m-webhook-delivery-contract.shared.d.ts.map +1 -1
  347. package/dist/esm/notifications/m2m/m2m-webhook-delivery-log.shared.resources-config.schemas.d.ts.map +1 -1
  348. package/dist/esm/notifications/m2m/m2m-webhook-delivery-log.shared.schemas.d.ts.map +1 -1
  349. package/dist/esm/notifications/m2m/webhook-config.shared.resources-config.schemas.d.ts +1 -0
  350. package/dist/esm/notifications/m2m/webhook-config.shared.resources-config.schemas.d.ts.map +1 -1
  351. package/dist/esm/notifications/m2m/webhook-config.shared.resources-config.schemas.js +19 -0
  352. package/dist/esm/notifications/m2m/webhook-config.shared.resources-config.schemas.js.map +1 -1
  353. package/dist/esm/notifications/m2m/webhook-config.shared.schemas.d.ts +30 -0
  354. package/dist/esm/notifications/m2m/webhook-config.shared.schemas.d.ts.map +1 -1
  355. package/dist/esm/notifications/m2m/webhook-config.shared.schemas.js +65 -1
  356. package/dist/esm/notifications/m2m/webhook-config.shared.schemas.js.map +1 -1
  357. package/dist/esm/notifications/notification-badges.core.definitions.d.ts +6 -4
  358. package/dist/esm/notifications/notification-badges.core.definitions.d.ts.map +1 -1
  359. package/dist/esm/notifications/notification-badges.core.definitions.js +6 -4
  360. package/dist/esm/notifications/notification-badges.core.definitions.js.map +1 -1
  361. package/dist/esm/notifications/notification-badges.schemas.d.ts +167 -5
  362. package/dist/esm/notifications/notification-badges.schemas.d.ts.map +1 -1
  363. package/dist/esm/notifications/notification-badges.schemas.js +191 -6
  364. package/dist/esm/notifications/notification-badges.schemas.js.map +1 -1
  365. package/dist/esm/notifications/notification-badges.shared.resources-config.schemas.d.ts.map +1 -1
  366. package/dist/esm/notifications/notifications.shared.schemas.d.ts +158 -0
  367. package/dist/esm/notifications/notifications.shared.schemas.d.ts.map +1 -1
  368. package/dist/esm/notifications/notifications.shared.schemas.js +200 -1
  369. package/dist/esm/notifications/notifications.shared.schemas.js.map +1 -1
  370. package/dist/esm/organizations/organization-features.shared.resources-config.schemas.d.ts.map +1 -1
  371. package/dist/esm/organizations/organization-features.shared.resources-config.schemas.js +13 -0
  372. package/dist/esm/organizations/organization-features.shared.resources-config.schemas.js.map +1 -1
  373. package/dist/esm/organizations/organization-members.shared.resources-config.schemas.d.ts.map +1 -1
  374. package/dist/esm/organizations/organization-members.shared.schemas.d.ts.map +1 -1
  375. package/dist/esm/organizations/organization-notifications.shared.resources-config.schemas.d.ts.map +1 -1
  376. package/dist/esm/organizations/organization-notifications.shared.schemas.d.ts.map +1 -1
  377. package/dist/esm/organizations/organization-notifications.shared.schemas.js +22 -1
  378. package/dist/esm/organizations/organization-notifications.shared.schemas.js.map +1 -1
  379. package/dist/esm/organizations/organization-preferences.shared.resources-config.schemas.d.ts.map +1 -1
  380. package/dist/esm/organizations/organization-preferences.shared.schemas.d.ts +26 -0
  381. package/dist/esm/organizations/organization-preferences.shared.schemas.d.ts.map +1 -1
  382. package/dist/esm/organizations/organization-preferences.shared.schemas.js +25 -0
  383. package/dist/esm/organizations/organization-preferences.shared.schemas.js.map +1 -1
  384. package/dist/esm/organizations/organization-profile.shared.resources-config.schemas.d.ts.map +1 -1
  385. package/dist/esm/organizations/organization-profile.shared.schemas.d.ts +25 -0
  386. package/dist/esm/organizations/organization-profile.shared.schemas.d.ts.map +1 -1
  387. package/dist/esm/organizations/organization-profile.shared.schemas.js +42 -17
  388. package/dist/esm/organizations/organization-profile.shared.schemas.js.map +1 -1
  389. package/dist/esm/organizations/organization-unit-inheritance.shared.d.ts.map +1 -1
  390. package/dist/esm/organizations/organization-unit-members.shared.resources-config.schemas.d.ts.map +1 -1
  391. package/dist/esm/organizations/organization-unit-members.shared.schemas.d.ts.map +1 -1
  392. package/dist/esm/organizations/organization-unit-narrowing-decision.shared.d.ts.map +1 -1
  393. package/dist/esm/organizations/organization-unit-narrowing.example.d.ts.map +1 -1
  394. package/dist/esm/organizations/organization-unit-narrowing.shared.d.ts +3 -2
  395. package/dist/esm/organizations/organization-unit-narrowing.shared.d.ts.map +1 -1
  396. package/dist/esm/organizations/organization-unit-narrowing.shared.js +9 -2
  397. package/dist/esm/organizations/organization-unit-narrowing.shared.js.map +1 -1
  398. package/dist/esm/organizations/organization-units.shared.resources-config.schemas.d.ts.map +1 -1
  399. package/dist/esm/organizations/organization-units.shared.schemas.d.ts.map +1 -1
  400. package/dist/esm/organizations/organizations.shared.resources-config.schemas.d.ts.map +1 -1
  401. package/dist/esm/organizations/organizations.shared.resources-config.schemas.js +18 -3
  402. package/dist/esm/organizations/organizations.shared.resources-config.schemas.js.map +1 -1
  403. package/dist/esm/organizations/organizations.shared.schemas.d.ts.map +1 -1
  404. package/dist/esm/organizations/tenant-teardown-config.shared.schemas.d.ts +13 -0
  405. package/dist/esm/organizations/tenant-teardown-config.shared.schemas.d.ts.map +1 -1
  406. package/dist/esm/organizations/tenant-teardown-config.shared.schemas.js +13 -0
  407. package/dist/esm/organizations/tenant-teardown-config.shared.schemas.js.map +1 -1
  408. package/dist/esm/provider-registration-runtime.exports.d.ts.map +1 -1
  409. package/dist/esm/public-runtime/index.d.ts +71 -2
  410. package/dist/esm/public-runtime/index.d.ts.map +1 -1
  411. package/dist/esm/public-runtime/index.js +62 -1
  412. package/dist/esm/public-runtime/index.js.map +1 -1
  413. package/dist/esm/queue/jobs.shared.resources-config.schemas.d.ts +6 -5
  414. package/dist/esm/queue/jobs.shared.resources-config.schemas.d.ts.map +1 -1
  415. package/dist/esm/queue/jobs.shared.resources-config.schemas.js +6 -5
  416. package/dist/esm/queue/jobs.shared.resources-config.schemas.js.map +1 -1
  417. package/dist/esm/queue/jobs.shared.schemas.d.ts +16 -3
  418. package/dist/esm/queue/jobs.shared.schemas.d.ts.map +1 -1
  419. package/dist/esm/queue/jobs.shared.schemas.js +16 -3
  420. package/dist/esm/queue/jobs.shared.schemas.js.map +1 -1
  421. package/dist/esm/queue/jobs.shared.utils.d.ts.map +1 -1
  422. package/dist/esm/queue/queues.shared.schemas.d.ts.map +1 -1
  423. package/dist/esm/queue/queues.shared.utils.d.ts.map +1 -1
  424. package/dist/esm/requests/manual-controllers-routes-documentation.d.ts +137 -0
  425. package/dist/esm/requests/manual-controllers-routes-documentation.d.ts.map +1 -0
  426. package/dist/esm/requests/manual-controllers-routes-documentation.js +1255 -0
  427. package/dist/esm/requests/manual-controllers-routes-documentation.js.map +1 -0
  428. package/dist/esm/requests/manual-controllers-routes-urls.d.ts +114 -0
  429. package/dist/esm/requests/manual-controllers-routes-urls.d.ts.map +1 -1
  430. package/dist/esm/requests/manual-controllers-routes-urls.js +129 -0
  431. package/dist/esm/requests/manual-controllers-routes-urls.js.map +1 -1
  432. package/dist/esm/requests/rate-limits.shared.schemas.d.ts +11 -1
  433. package/dist/esm/requests/rate-limits.shared.schemas.d.ts.map +1 -1
  434. package/dist/esm/requests/rate-limits.shared.schemas.js +11 -1
  435. package/dist/esm/requests/rate-limits.shared.schemas.js.map +1 -1
  436. package/dist/esm/requests/websocket.shared.schemas.d.ts +28 -3
  437. package/dist/esm/requests/websocket.shared.schemas.d.ts.map +1 -1
  438. package/dist/esm/requests/websocket.shared.schemas.js +52 -0
  439. package/dist/esm/requests/websocket.shared.schemas.js.map +1 -1
  440. package/dist/esm/resources/child-operations.shared.schemas.d.ts.map +1 -1
  441. package/dist/esm/resources/context-policy.shared.schemas.d.ts.map +1 -1
  442. package/dist/esm/resources/relationship-display.shared.schemas.d.ts.map +1 -1
  443. package/dist/esm/resources/resources-config.shared.factory.d.ts +1 -0
  444. package/dist/esm/resources/resources-config.shared.factory.d.ts.map +1 -1
  445. package/dist/esm/resources/resources-config.shared.factory.js +203 -25
  446. package/dist/esm/resources/resources-config.shared.factory.js.map +1 -1
  447. package/dist/esm/resources/resources-config.shared.schemas.d.ts +297 -68
  448. package/dist/esm/resources/resources-config.shared.schemas.d.ts.map +1 -1
  449. package/dist/esm/resources/resources-config.shared.schemas.js.map +1 -1
  450. package/dist/esm/resources/resources-registry.shared.core.definitions.d.ts.map +1 -1
  451. package/dist/esm/resources/resources-registry.shared.core.definitions.js +151 -5
  452. package/dist/esm/resources/resources-registry.shared.core.definitions.js.map +1 -1
  453. package/dist/esm/resources/resources-relationships.shared.factory.d.ts.map +1 -1
  454. package/dist/esm/resources/resources-relationships.shared.factory.js +15 -0
  455. package/dist/esm/resources/resources-relationships.shared.factory.js.map +1 -1
  456. package/dist/esm/resources/resources-serialization.shared.schemas.d.ts.map +1 -1
  457. package/dist/esm/resources/resources.shared.core.definitions.d.ts +54 -0
  458. package/dist/esm/resources/resources.shared.core.definitions.d.ts.map +1 -1
  459. package/dist/esm/resources/resources.shared.core.definitions.js +69 -0
  460. package/dist/esm/resources/resources.shared.core.definitions.js.map +1 -1
  461. package/dist/esm/resources/resources.shared.schemas.d.ts +11 -2
  462. package/dist/esm/resources/resources.shared.schemas.d.ts.map +1 -1
  463. package/dist/esm/resources/resources.shared.schemas.js +34 -3
  464. package/dist/esm/resources/resources.shared.schemas.js.map +1 -1
  465. package/dist/esm/resources/resources.shared.utils.d.ts +32 -7
  466. package/dist/esm/resources/resources.shared.utils.d.ts.map +1 -1
  467. package/dist/esm/resources/resources.shared.utils.js +32 -7
  468. package/dist/esm/resources/resources.shared.utils.js.map +1 -1
  469. package/dist/esm/resources/utils/collection-export.shared.utils.d.ts.map +1 -1
  470. package/dist/esm/resources/utils/composition-cascade-deletability.validation.d.ts.map +1 -1
  471. package/dist/esm/resources/utils/composition-seedability.validation.d.ts.map +1 -1
  472. package/dist/esm/resources/utils/context-addressed-composition-singleton.shared.utils.d.ts.map +1 -1
  473. package/dist/esm/resources/utils/duplicate-relationship-registration.validation.d.ts.map +1 -1
  474. package/dist/esm/resources/utils/field-value-disclosure.utils.d.ts +51 -0
  475. package/dist/esm/resources/utils/field-value-disclosure.utils.d.ts.map +1 -0
  476. package/dist/esm/resources/utils/field-value-disclosure.utils.js +53 -0
  477. package/dist/esm/resources/utils/field-value-disclosure.utils.js.map +1 -0
  478. package/dist/esm/resources/utils/persistence-adapter-discrimination.shared.utils.d.ts.map +1 -1
  479. package/dist/esm/resources/utils/repository-dto-builder.utils.d.ts.map +1 -1
  480. package/dist/esm/resources/utils/required-fk-fillability.validation.d.ts.map +1 -1
  481. package/dist/esm/resources/utils/resource-operation-type-guards.utils.d.ts.map +1 -1
  482. package/dist/esm/resources/utils/resource-polymorphism.factory.d.ts.map +1 -1
  483. package/dist/esm/resources/utils/resource-polymorphism.relationships.d.ts.map +1 -1
  484. package/dist/esm/resources/utils/resource-polymorphism.schemas.d.ts.map +1 -1
  485. package/dist/esm/resources/utils/resource-polymorphism.utils.d.ts.map +1 -1
  486. package/dist/esm/resources/utils/resource-subtree.utils.d.ts.map +1 -1
  487. package/dist/esm/resources/utils/resources-config-context-needs.utils.d.ts.map +1 -1
  488. package/dist/esm/resources/utils/resources-config-operations.dtos-builder.utils.d.ts.map +1 -1
  489. package/dist/esm/resources/utils/resources-config-operations.path.utils.d.ts.map +1 -1
  490. package/dist/esm/resources/utils/resources-config-operations.urls-builder.utils.d.ts.map +1 -1
  491. package/dist/esm/resources/utils/resources-config-operations.utils.d.ts.map +1 -1
  492. package/dist/esm/resources/utils/resources-serialization.utils.d.ts.map +1 -1
  493. package/dist/esm/resources/utils/resources-summary.utils.d.ts +16 -2
  494. package/dist/esm/resources/utils/resources-summary.utils.d.ts.map +1 -1
  495. package/dist/esm/resources/utils/resources-summary.utils.js +19 -5
  496. package/dist/esm/resources/utils/resources-summary.utils.js.map +1 -1
  497. package/dist/esm/resources/utils/schema-family-builder.utils.d.ts.map +1 -1
  498. package/dist/esm/resources/utils/schema-type-inference.utils.d.ts.map +1 -1
  499. package/dist/esm/resources/utils/schema-type-utils.d.ts.map +1 -1
  500. package/dist/esm/resources/utils/schema-variant-resolver.utils.d.ts.map +1 -1
  501. package/dist/esm/resources/utils/shared-persistence-collection.utils.d.ts.map +1 -1
  502. package/dist/esm/resources/utils/shared-persistence-collection.utils.js +11 -0
  503. package/dist/esm/resources/utils/shared-persistence-collection.utils.js.map +1 -1
  504. package/dist/esm/resources/utils/templatable-file-fields.shared.utils.d.ts.map +1 -1
  505. package/dist/esm/runtime/domain-module.shared.definitions.d.ts +25 -0
  506. package/dist/esm/runtime/domain-module.shared.definitions.d.ts.map +1 -1
  507. package/dist/esm/runtime/domain-module.shared.definitions.js.map +1 -1
  508. package/dist/esm/runtime/execution-context.shared.schemas.d.ts.map +1 -1
  509. package/dist/esm/security/api-keys/api-keys-application.shared.resources-config.schemas.d.ts +1 -0
  510. package/dist/esm/security/api-keys/api-keys-application.shared.resources-config.schemas.d.ts.map +1 -1
  511. package/dist/esm/security/api-keys/api-keys-application.shared.resources-config.schemas.js +38 -0
  512. package/dist/esm/security/api-keys/api-keys-application.shared.resources-config.schemas.js.map +1 -1
  513. package/dist/esm/security/api-keys/api-keys-organization.shared.resources-config.schemas.d.ts +1 -0
  514. package/dist/esm/security/api-keys/api-keys-organization.shared.resources-config.schemas.d.ts.map +1 -1
  515. package/dist/esm/security/api-keys/api-keys-organization.shared.resources-config.schemas.js +38 -0
  516. package/dist/esm/security/api-keys/api-keys-organization.shared.resources-config.schemas.js.map +1 -1
  517. package/dist/esm/security/api-keys/api-keys.shared.schemas.d.ts.map +1 -1
  518. package/dist/esm/security/authentications/anonymous-session/anonymous-session.shared.contract.d.ts.map +1 -1
  519. package/dist/esm/security/authentications/authentication.shared.dto.schemas.d.ts +5 -12
  520. package/dist/esm/security/authentications/authentication.shared.dto.schemas.d.ts.map +1 -1
  521. package/dist/esm/security/authentications/authentication.shared.dto.schemas.js +0 -1
  522. package/dist/esm/security/authentications/authentication.shared.dto.schemas.js.map +1 -1
  523. package/dist/esm/security/authentications/authentication.shared.schemas.d.ts +84 -5
  524. package/dist/esm/security/authentications/authentication.shared.schemas.d.ts.map +1 -1
  525. package/dist/esm/security/authentications/authentication.shared.schemas.js +83 -3
  526. package/dist/esm/security/authentications/authentication.shared.schemas.js.map +1 -1
  527. package/dist/esm/security/authentications/authentication.shared.utils.d.ts.map +1 -1
  528. package/dist/esm/security/authentications/consumable-token.shared.schemas.d.ts.map +1 -1
  529. package/dist/esm/security/authentications/consumable-token.shared.schemas.js.map +1 -1
  530. package/dist/esm/security/authentications/cross-frontend-handoff.shared.dto.schemas.d.ts.map +1 -1
  531. package/dist/esm/security/authentications/password-reset.shared.dto.schemas.d.ts.map +1 -1
  532. package/dist/esm/security/authentications/registration.shared.dto.schemas.d.ts +1 -0
  533. package/dist/esm/security/authentications/registration.shared.dto.schemas.d.ts.map +1 -1
  534. package/dist/esm/security/authentications/registration.shared.dto.schemas.js +11 -0
  535. package/dist/esm/security/authentications/registration.shared.dto.schemas.js.map +1 -1
  536. package/dist/esm/security/authentications/scim/scim-organization-unit-mapping.shared.d.ts.map +1 -1
  537. package/dist/esm/security/authentications/scim/scim-provisioning-config.shared.resources-config.schemas.d.ts.map +1 -1
  538. package/dist/esm/security/authentications/scim/scim-provisioning-config.shared.schemas.d.ts +15 -0
  539. package/dist/esm/security/authentications/scim/scim-provisioning-config.shared.schemas.d.ts.map +1 -1
  540. package/dist/esm/security/authentications/scim/scim-provisioning-config.shared.schemas.js +21 -4
  541. package/dist/esm/security/authentications/scim/scim-provisioning-config.shared.schemas.js.map +1 -1
  542. package/dist/esm/security/authentications/scim/scim-tokens.shared.resources-config.schemas.d.ts.map +1 -1
  543. package/dist/esm/security/authentications/scim/scim-tokens.shared.schemas.d.ts.map +1 -1
  544. package/dist/esm/security/authentications/siem/siem-delivery-dlq.shared.resources-config.schemas.d.ts.map +1 -1
  545. package/dist/esm/security/authentications/siem/siem-delivery-dlq.shared.schemas.d.ts.map +1 -1
  546. package/dist/esm/security/authentications/siem/siem-delivery-reliability-contract.shared.d.ts.map +1 -1
  547. package/dist/esm/security/authentications/siem/siem-delivery-reliability-contract.shared.js.map +1 -1
  548. package/dist/esm/security/authentications/siem/siem-export-config.shared.resources-config.schemas.d.ts.map +1 -1
  549. package/dist/esm/security/authentications/siem/siem-export-config.shared.schemas.d.ts.map +1 -1
  550. package/dist/esm/security/authentications/sso/sso-config.shared.resources-config.schemas.d.ts +61 -1
  551. package/dist/esm/security/authentications/sso/sso-config.shared.resources-config.schemas.d.ts.map +1 -1
  552. package/dist/esm/security/authentications/sso/sso-config.shared.resources-config.schemas.js +238 -6
  553. package/dist/esm/security/authentications/sso/sso-config.shared.resources-config.schemas.js.map +1 -1
  554. package/dist/esm/security/authentications/sso/sso-config.shared.schemas.d.ts +37 -27
  555. package/dist/esm/security/authentications/sso/sso-config.shared.schemas.d.ts.map +1 -1
  556. package/dist/esm/security/authentications/sso/sso-config.shared.schemas.js +134 -12
  557. package/dist/esm/security/authentications/sso/sso-config.shared.schemas.js.map +1 -1
  558. package/dist/esm/security/authentications/sso/sso-connection.shared.resources-config.schemas.d.ts.map +1 -1
  559. package/dist/esm/security/authentications/sso/sso-connection.shared.schemas.d.ts +2 -6
  560. package/dist/esm/security/authentications/sso/sso-connection.shared.schemas.d.ts.map +1 -1
  561. package/dist/esm/security/authentications/sso/sso-connection.shared.schemas.js +32 -8
  562. package/dist/esm/security/authentications/sso/sso-connection.shared.schemas.js.map +1 -1
  563. package/dist/esm/security/authorizations/administrative-continuity.shared.schemas.d.ts +45 -2
  564. package/dist/esm/security/authorizations/administrative-continuity.shared.schemas.d.ts.map +1 -1
  565. package/dist/esm/security/authorizations/administrative-continuity.shared.schemas.js +45 -2
  566. package/dist/esm/security/authorizations/administrative-continuity.shared.schemas.js.map +1 -1
  567. package/dist/esm/security/authorizations/application-access-grants.shared.resources-config.schemas.d.ts +35 -0
  568. package/dist/esm/security/authorizations/application-access-grants.shared.resources-config.schemas.d.ts.map +1 -0
  569. package/dist/esm/security/authorizations/application-access-grants.shared.resources-config.schemas.js +257 -0
  570. package/dist/esm/security/authorizations/application-access-grants.shared.resources-config.schemas.js.map +1 -0
  571. package/dist/esm/security/authorizations/application-access-grants.shared.schemas.d.ts +143 -0
  572. package/dist/esm/security/authorizations/application-access-grants.shared.schemas.d.ts.map +1 -0
  573. package/dist/esm/security/authorizations/application-access-grants.shared.schemas.js +219 -0
  574. package/dist/esm/security/authorizations/application-access-grants.shared.schemas.js.map +1 -0
  575. package/dist/esm/security/authorizations/platform-access-grants.shared.resources-config.schemas.d.ts.map +1 -1
  576. package/dist/esm/security/authorizations/platform-access-grants.shared.resources-config.schemas.js +27 -0
  577. package/dist/esm/security/authorizations/platform-access-grants.shared.resources-config.schemas.js.map +1 -1
  578. package/dist/esm/security/authorizations/platform-access-grants.shared.schemas.d.ts +75 -7
  579. package/dist/esm/security/authorizations/platform-access-grants.shared.schemas.d.ts.map +1 -1
  580. package/dist/esm/security/authorizations/platform-access-grants.shared.schemas.js +69 -8
  581. package/dist/esm/security/authorizations/platform-access-grants.shared.schemas.js.map +1 -1
  582. package/dist/esm/security/authorizations/roles.shared.defaults.d.ts.map +1 -1
  583. package/dist/esm/security/authorizations/roles.shared.schemas.d.ts.map +1 -1
  584. package/dist/esm/security/authorizations/roles.shared.utils.d.ts.map +1 -1
  585. package/dist/esm/security/connected-accounts/provider-credentials-organization.shared.resources-config.schemas.d.ts +31 -0
  586. package/dist/esm/security/connected-accounts/provider-credentials-organization.shared.resources-config.schemas.d.ts.map +1 -0
  587. package/dist/esm/security/connected-accounts/provider-credentials-organization.shared.resources-config.schemas.js +198 -0
  588. package/dist/esm/security/connected-accounts/provider-credentials-organization.shared.resources-config.schemas.js.map +1 -0
  589. package/dist/esm/security/connected-accounts/provider-credentials-user.shared.resources-config.schemas.d.ts +31 -0
  590. package/dist/esm/security/connected-accounts/provider-credentials-user.shared.resources-config.schemas.d.ts.map +1 -0
  591. package/dist/esm/security/connected-accounts/provider-credentials-user.shared.resources-config.schemas.js +191 -0
  592. package/dist/esm/security/connected-accounts/provider-credentials-user.shared.resources-config.schemas.js.map +1 -0
  593. package/dist/esm/security/connected-accounts/provider-credentials.shared.schemas.d.ts +307 -0
  594. package/dist/esm/security/connected-accounts/provider-credentials.shared.schemas.d.ts.map +1 -0
  595. package/dist/esm/security/connected-accounts/provider-credentials.shared.schemas.js +530 -0
  596. package/dist/esm/security/connected-accounts/provider-credentials.shared.schemas.js.map +1 -0
  597. package/dist/esm/security/oauth-clients/oauth-clients-application.shared.resources-config.schemas.d.ts +4 -1
  598. package/dist/esm/security/oauth-clients/oauth-clients-application.shared.resources-config.schemas.d.ts.map +1 -1
  599. package/dist/esm/security/oauth-clients/oauth-clients-application.shared.resources-config.schemas.js +29 -0
  600. package/dist/esm/security/oauth-clients/oauth-clients-application.shared.resources-config.schemas.js.map +1 -1
  601. package/dist/esm/security/oauth-clients/oauth-clients-organization.shared.resources-config.schemas.d.ts +4 -1
  602. package/dist/esm/security/oauth-clients/oauth-clients-organization.shared.resources-config.schemas.d.ts.map +1 -1
  603. package/dist/esm/security/oauth-clients/oauth-clients-organization.shared.resources-config.schemas.js +29 -0
  604. package/dist/esm/security/oauth-clients/oauth-clients-organization.shared.resources-config.schemas.js.map +1 -1
  605. package/dist/esm/security/oauth-clients/oauth-clients.shared.schemas.d.ts +6 -0
  606. package/dist/esm/security/oauth-clients/oauth-clients.shared.schemas.d.ts.map +1 -1
  607. package/dist/esm/security/oauth-clients/oauth-clients.shared.schemas.js +31 -0
  608. package/dist/esm/security/oauth-clients/oauth-clients.shared.schemas.js.map +1 -1
  609. package/dist/esm/security/oauth-clients/oauth-consent-grants.shared.resources-config.schemas.d.ts.map +1 -1
  610. package/dist/esm/security/oauth-clients/oauth-consent-grants.shared.schemas.d.ts +13 -0
  611. package/dist/esm/security/oauth-clients/oauth-consent-grants.shared.schemas.d.ts.map +1 -1
  612. package/dist/esm/security/oauth-clients/oauth-consent-grants.shared.schemas.js +24 -3
  613. package/dist/esm/security/oauth-clients/oauth-consent-grants.shared.schemas.js.map +1 -1
  614. package/dist/esm/security/oauth-clients/oauth-resource-server.shared.schemas.d.ts.map +1 -1
  615. package/dist/esm/testing/resource-config-builders.d.ts.map +1 -1
  616. package/dist/esm/testing.d.ts.map +1 -1
  617. package/dist/esm/users/anonymous-user-marketing-metadata.shared.schemas.d.ts.map +1 -1
  618. package/dist/esm/users/anonymous-users.shared.resources-config.schemas.d.ts.map +1 -1
  619. package/dist/esm/users/anonymous-users.shared.schema.d.ts.map +1 -1
  620. package/dist/esm/users/inbound-contacts.shared.resources-config.schemas.d.ts.map +1 -1
  621. package/dist/esm/users/inbound-contacts.shared.schemas.d.ts.map +1 -1
  622. package/dist/esm/users/user-credentials.shared.resources-config.schemas.d.ts.map +1 -1
  623. package/dist/esm/users/user-credentials.shared.schemas.d.ts.map +1 -1
  624. package/dist/esm/users/user-identity-links.shared.resources-config.schemas.d.ts.map +1 -1
  625. package/dist/esm/users/user-identity-links.shared.schemas.d.ts.map +1 -1
  626. package/dist/esm/users/user-preferences-reset.shared.utils.d.ts.map +1 -1
  627. package/dist/esm/users/user-preferences.shared.resources-config.schemas.d.ts +4 -4
  628. package/dist/esm/users/user-preferences.shared.resources-config.schemas.d.ts.map +1 -1
  629. package/dist/esm/users/user-profiles.shared.resources-config.schemas.d.ts.map +1 -1
  630. package/dist/esm/users/user-self-preferences.shared.resources-config.schemas.d.ts +4 -4
  631. package/dist/esm/users/user-self-preferences.shared.resources-config.schemas.d.ts.map +1 -1
  632. package/dist/esm/users/user-self-profiles.shared.resources-config.schemas.d.ts.map +1 -1
  633. package/dist/esm/users/user-self.shared.resources-config.schemas.d.ts.map +1 -1
  634. package/dist/esm/users/user-self.shared.resources-config.schemas.js +33 -3
  635. package/dist/esm/users/user-self.shared.resources-config.schemas.js.map +1 -1
  636. package/dist/esm/users/users.shared.resources-config.schemas.d.ts +17 -1
  637. package/dist/esm/users/users.shared.resources-config.schemas.d.ts.map +1 -1
  638. package/dist/esm/users/users.shared.resources-config.schemas.js +136 -5
  639. package/dist/esm/users/users.shared.resources-config.schemas.js.map +1 -1
  640. package/dist/esm/users/users.shared.schemas.d.ts +60 -13
  641. package/dist/esm/users/users.shared.schemas.d.ts.map +1 -1
  642. package/dist/esm/users/users.shared.schemas.js +56 -9
  643. package/dist/esm/users/users.shared.schemas.js.map +1 -1
  644. package/dist/tsconfig.build.tsbuildinfo +1 -1
  645. package/package.json +4 -4
@@ -0,0 +1 @@
1
+ {"version":3,"file":"application-access-grants.shared.resources-config.schemas.js","sourceRoot":"","sources":["../../../../src/security/authorizations/application-access-grants.shared.resources-config.schemas.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EACL,4BAA4B,EAC5B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,CAAC;oBAC7C,SAAS,EAAE,0BAA0B,CAAC,GAAG;oBACzC,qBAAqB,EAAE,qBAAqB,CAAC,MAAM;oBACnD,UAAU,EAAE,CAAC,CAAC,MAAM,CAAC,EAAE,CAAC;iBACzB;aACF;SACF;KACF;IACD,4FAA4F;IAC5F,0FAA0F;CAC3F,CAAC,CAAC","sourcesContent":["/**\n * Application Access Grants — resource configuration.\n *\n * The operation set mirrors `platformAccessGrants` verb for verb, and the ONE difference is the whole\n * feature: `approve` is gated on the PLATFORM's own administrators rather than a tenant's, and refuses\n * the requester. On the tenant resource the ABSENCE of `admitsCrossTenantPlatformAdministration` on\n * `approve` is what stops an operator approving their own request; here every verb is platform-tier by\n * construction, so that absence buys nothing and the refusal has to be a MEASUREMENT the\n * implementation makes — `applicationAccessGrantApproverIsDistinct`.\n *\n * See `application-access-grants.shared.schemas.ts` for why the resource exists and why it is a\n * sibling type rather than a field, and `.claude/rules/administrative-continuity-floors.md` for the\n * ladder it sits on.\n */\n\nimport { z } from 'zod';\nimport {\n ApplicationAccessGrantSchema,\n ApplicationAccessGrants_Operations,\n applicationAccessGrantApproverIsDistinct,\n} from './application-access-grants.shared.schemas';\nimport { PlatformAccessGrantStatus } from './platform-access-grants.shared.schemas';\nimport { CoreResourceOperation, CoreResourceType, coreResourceShared_FieldIdentifier } from '../../resources/resources.shared.core.definitions';\nimport {\n ResourceOperationRiskLevel,\n ResourceOperationVariantType,\n type ResourceRelationship,\n} from '../../resources/resources.shared.schemas';\nimport { createResourceConfiguration_Initialization } from '../../resources/resources-config.shared.factory';\nimport { ResourceSystemAccessMode } from '../../resources/resources-config.shared.schemas';\nimport { CORE_APP_ROLES } from './roles.shared.schemas';\nimport { ErasureRetentionMode, ResourceDataSubjectKind } from '../../compliance/privacy/impersonalization.shared.schemas';\n\ntype ApplicationAccessGrantsCoreOperations =\n | CoreResourceOperation.READ\n | CoreResourceOperation.LIST\n | CoreResourceOperation.COUNT\n // Route-less; `retentionPolicy` requires READ + LIST + UPDATE_MANY.\n | CoreResourceOperation.UPDATE_MANY;\n\nexport const applicationAccessGrantsResourceConfiguration_InitializationFactory = (resourcesRelationships: ResourceRelationship[]) =>\n createResourceConfiguration_Initialization<\n typeof ApplicationAccessGrants_Operations,\n ApplicationAccessGrantsCoreOperations,\n typeof ApplicationAccessGrantSchema\n >({\n mainSchema: ApplicationAccessGrantSchema,\n resourceIdentifier: CoreResourceType.APPLICATION_ACCESS_GRANTS,\n resourceFieldIdentifier: coreResourceShared_FieldIdentifier[CoreResourceType.APPLICATION_ACCESS_GRANTS],\n resourceRelationships: resourcesRelationships,\n isSystemResource: true,\n\n /**\n * `read`/`list` ALLOWED for the trusted path, and for exactly the reason the tenant resource\n * allows them: the authorization layer itself resolves a caller's usable grant on a system\n * context, before the caller's own authority has been established for the read it is gating.\n *\n * No trusted `create`/`update`: every transition belongs to a custom implementation that applies\n * the two-person measurement. A system door around those would be a second way to mint an\n * application-wide elevation, which is the one thing this resource exists to prevent.\n *\n * `exportSubject: FORBIDDEN`, mirrored from the tenant resource. `operatorUserId` and\n * `approvedByUserId` are foreign keys back to USERS, so these rows sit on a user's Art. 15 graph\n * as `INCLUDED_REFERENCES_SUBJECT`; an included resource carrying NO declaration REFUSES the whole\n * export, so omitting this would trade a boot failure for a broken disclosure right. FORBIDDEN\n * because this is a security-monitoring record and handing the monitoring trail to the person it\n * monitors is self-defeating — and because it names ANOTHER data subject's decision (the second\n * administrator), which Art. 15(4) protects.\n */\n systemAccessPolicy: {\n read: ResourceSystemAccessMode.ALLOWED,\n list: ResourceSystemAccessMode.ALLOWED,\n exportSubject: ResourceSystemAccessMode.FORBIDDEN,\n },\n\n /**\n * Subject erasure RETAINS this row and scrubs its free text — mirrored from the tenant resource\n * because it is the same kind of record. What survives is WHO reached application-wide, WHEN, and\n * who signed for it; what does not is `justification` and `decisionReason`, the operator- and\n * approver-written prose most likely to name a third party in passing.\n */\n retentionPolicy: {\n mode: ErasureRetentionMode.RETAIN_AND_IMPERSONALIZE,\n },\n\n /**\n * Erasing one of these revokes NO session: the grant is a record ABOUT an operator's access, not\n * the operator. Their session ends through the `USERS` row, which is `SELF_PRINCIPAL`.\n */\n dataSubjectPolicy: { kind: ResourceDataSubjectKind.NO_PRINCIPAL },\n\n coreOperations: [\n CoreResourceOperation.READ,\n CoreResourceOperation.LIST,\n CoreResourceOperation.COUNT,\n // Route-less; `retentionPolicy` requires READ + LIST + UPDATE_MANY.\n CoreResourceOperation.UPDATE_MANY,\n ],\n\n operationsConfiguration: {\n\n /*\n * Route-less retention plumbing — INTERNAL_CALL registers no route and must not be\n * REPOSITORY_ONLY: the retention primitives resolve through `getServiceOperationPathDefault`,\n * which matches only INTERNAL_CALL / API_CALL. CRITICAL — it is the verb the impersonalize\n * writer uses to stamp markers.\n */\n [CoreResourceOperation.UPDATE_MANY]: {\n variants: [{\n variantType: ResourceOperationVariantType.INTERNAL_CALL,\n isDefault: true,\n roles: [CORE_APP_ROLES.APP_ADMIN_SUPER_ADMIN],\n riskLevel: ResourceOperationRiskLevel.CRITICAL,\n }],\n },\n\n /**\n * The pending queue a second administrator works from, and the record of what was granted.\n *\n * `APP_ADMIN_SUPER_ADMIN` on every read: the rows name operator reach across every tenant, and\n * there is no tenant-side reader here as there is on the platform resource — an application-wide\n * grant has no customer to show it to. That absence is precisely why the approval had to become\n * a second signature.\n */\n [CoreResourceOperation.READ]: {\n variants: [\n {\n variantType: ResourceOperationVariantType.API_CALL,\n isDefault: true,\n roles: [CORE_APP_ROLES.APP_ADMIN_SUPER_ADMIN],\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_ADMIN_SUPER_ADMIN],\n riskLevel: ResourceOperationRiskLevel.LOW,\n },\n ],\n },\n\n [CoreResourceOperation.COUNT]: {\n variants: [\n {\n variantType: ResourceOperationVariantType.API_CALL,\n isDefault: true,\n roles: [CORE_APP_ROLES.APP_ADMIN_SUPER_ADMIN],\n riskLevel: ResourceOperationRiskLevel.LOW,\n },\n ],\n },\n\n /**\n * The bootstrap verb.\n *\n * Note what it deliberately does NOT declare: `admitsCrossTenantPlatformAdministration`. On the\n * tenant resource that flag is what lets a non-member operator write a row inside someone else's\n * tenant, and `requestAccess` there is exempted from the grant requirement it bootstraps. Here\n * the resource is APPLICATION-scoped — there is no tenant boundary to cross — so the flag would\n * be meaningless and the exemption has a different shape: the ADMISSION gate exempts this\n * resource entirely, because an operator would otherwise need an application-wide grant in order\n * to ask for one.\n *\n * What keeps that safe is the same argument the tenant resource makes: requesting is not\n * accessing. This writes one PENDING row and reads nothing. The blast radius of an abused\n * request is an entry in a queue that another administrator must sign.\n *\n * assurance-control: WILDO.ACCESS.CROSS_TENANT_ADMINISTRATION — application-wide reach is\n * requested, never assumed.\n * assurance-control: WILDO.ACCESS.PRIVILEGE_EVIDENCE\n */\n [ApplicationAccessGrants_Operations.REQUEST_ACCESS]: {\n variants: [\n {\n variantType: ResourceOperationVariantType.API_CALL,\n isDefault: true,\n roles: [CORE_APP_ROLES.APP_ADMIN_SUPER_ADMIN],\n riskLevel: ResourceOperationRiskLevel.CRITICAL,\n resourceOperationLike: CoreResourceOperation.CREATE,\n requestDto: z.object({\n justification: z.string().min(1).max(1000),\n /** Minutes. Clamped server-side to the 1h ceiling; a longer ask is not refused. */\n requestedDurationMinutes: z.number().int().positive().optional(),\n }),\n },\n ],\n },\n\n /**\n * The SECOND SIGNATURE.\n *\n * `enabledCondition` refuses a self-approval here as well as in the implementation, and the\n * duplication is deliberate rather than redundant — they are two different guarantees. This one\n * makes the affordance DISAPPEAR for the requester, so a platform console never renders an\n * Approve button on one's own request; the implementation's `assert…` is the fail-closed half,\n * because `enabledCondition` is evaluated against the row the framework fetched and a future\n * variant authored without one would otherwise transition silently.\n *\n * Neutering either alone must not admit a self-approval. That is what the two pins assert.\n *\n * assurance-control: WILDO.ACCESS.SEGREGATION_OF_DUTIES — the widest operator elevation requires\n * a second, distinct platform administrator's signature.\n */\n [ApplicationAccessGrants_Operations.APPROVE]: {\n variants: [\n {\n variantType: ResourceOperationVariantType.API_CALL,\n isDefault: true,\n roles: [CORE_APP_ROLES.APP_ADMIN_SUPER_ADMIN],\n riskLevel: ResourceOperationRiskLevel.CRITICAL,\n resourceOperationLike: CoreResourceOperation.UPDATE,\n requestDto: z.object({\n decisionReason: z.string().max(1000).optional(),\n }),\n enabledCondition: ({ currentObject, initiatorIds }) =>\n currentObject.status === PlatformAccessGrantStatus.PENDING_APPROVAL\n && applicationAccessGrantApproverIsDistinct({\n operatorUserId: currentObject.operatorUserId,\n approverUserId: initiatorIds?.userId,\n }),\n },\n ],\n },\n\n /**\n * Refusing a request. NOT gated on being a different person: an operator who thinks better of\n * their own request should be able to withdraw it, and a denial only ever removes authority.\n * The two-person rule constrains what an operator can GRANT themselves, never what they can\n * refuse themselves.\n */\n [ApplicationAccessGrants_Operations.DENY]: {\n variants: [\n {\n variantType: ResourceOperationVariantType.API_CALL,\n isDefault: true,\n roles: [CORE_APP_ROLES.APP_ADMIN_SUPER_ADMIN],\n riskLevel: ResourceOperationRiskLevel.MEDIUM,\n resourceOperationLike: CoreResourceOperation.UPDATE,\n requestDto: z.object({\n decisionReason: z.string().max(1000).optional(),\n }),\n enabledCondition: ({ currentObject }) => currentObject.status === PlatformAccessGrantStatus.PENDING_APPROVAL,\n },\n ],\n },\n\n /** Ending an elevation early. Monotonic — it only ever removes authority — so it is unrestricted among platform administrators. */\n [ApplicationAccessGrants_Operations.REVOKE]: {\n variants: [\n {\n variantType: ResourceOperationVariantType.API_CALL,\n isDefault: true,\n roles: [CORE_APP_ROLES.APP_ADMIN_SUPER_ADMIN],\n riskLevel: ResourceOperationRiskLevel.MEDIUM,\n resourceOperationLike: CoreResourceOperation.UPDATE,\n requestDto: z.object({\n decisionReason: z.string().max(1000).optional(),\n }),\n enabledCondition: ({ currentObject }) =>\n currentObject.status === PlatformAccessGrantStatus.PENDING_APPROVAL\n || currentObject.status === PlatformAccessGrantStatus.ACTIVE,\n },\n ],\n },\n\n /**\n * ACTIVE → EXPIRED once the window has elapsed, dispatched by the credential-expiry sweep and by\n * nothing else. INTERNAL_CALL: no route, no affordance.\n *\n * `requestDto: z.object({})` is EMPTY BY CONTRACT, not by omission — an operation without a\n * `requestDto` inherits the resource's entire update contract, which would let a verb that\n * accepts nothing advertise every field, `status` included.\n */\n [ApplicationAccessGrants_Operations.EXPIRE]: {\n variants: [\n {\n variantType: ResourceOperationVariantType.INTERNAL_CALL,\n isDefault: true,\n roles: [CORE_APP_ROLES.APP_ADMIN_SUPER_ADMIN],\n riskLevel: ResourceOperationRiskLevel.LOW,\n resourceOperationLike: CoreResourceOperation.UPDATE,\n requestDto: z.object({}),\n },\n ],\n },\n },\n // NOTE: the APPLICATION primary scope is NOT declared here. It is derived from the registry\n // relationship carrying `isPrimaryScope: true` (APPLICATION → APPLICATION_ACCESS_GRANTS).\n });\n"]}
@@ -0,0 +1,143 @@
1
+ /**
2
+ * Application Access Grants — time-bound, justified, TWO-PERSON-APPROVED elevation for an operator
3
+ * act that names no single tenant.
4
+ *
5
+ * ## The asymmetry this closes
6
+ *
7
+ * `platformAccessGrants` governs the NARROW act: one operator, one named tenant, one window. It is
8
+ * the door `.claude/rules/administrative-continuity-floors.md` calls rungs 4–5 of the ladder, and it
9
+ * works.
10
+ *
11
+ * The WIDE act was ungoverned. Measured 2026-09-09 and recorded on
12
+ * `ScopeRootConfinementDisposition.UNCONFINED_APPLICATION_TIER_DIRECTORY`:
13
+ *
14
+ * | | per-row crossing | application-wide read |
15
+ * |---|---|---|
16
+ * | elevation required | a usable `platformAccessGrants` row | **none** |
17
+ * | role tier | `APP_ADMIN_SUPER_ADMIN` | `APP_ADMIN_VIEWER` / `ORG_MEMBER` |
18
+ * | evidence | `CROSS_TENANT_ADMINISTRATIVE_ACCESS`, naming the grant | an observation naming no elevation |
19
+ *
20
+ * So the narrow act carried elevation and expiry and the widest read did not — and the wide one sat
21
+ * at a strictly LOWER role tier. That is worse than "not symmetric"; it is the control inverted.
22
+ *
23
+ * ## Why a SEPARATE resource and not a `scope` field on the tenant grant
24
+ *
25
+ * Structural, not stylistic. A `platformAccessGrants` row is ORGANIZATIONS-scoped: its primary-scope
26
+ * relationship carries `isPrimaryScope: true` on `organizationId`, every route is
27
+ * `/organizations/{organizationId}/platform-access-grants/…`, and the tenant's ability to SEE and
28
+ * REVOKE the row is exactly what that scope buys. An application-wide elevation names no tenant, so
29
+ * the route has nothing to carry and the scope has nobody to serve. Adding a nullable
30
+ * `organizationId` to make one row shape serve both would weaken the field whose presence IS the
31
+ * tenant grant's control — which the finding explicitly refuses ("do not weaken the per-row model to
32
+ * make the two symmetric").
33
+ *
34
+ * The engine's own precedent for a second scope over one lifecycle is `applicationAuditLogs` beside
35
+ * `auditLogs`: a sibling resource type carrying ONE application parent, taking the route it needs and
36
+ * leaving the existing door byte-identical.
37
+ *
38
+ * ## Why TWO-PERSON, and what was rejected
39
+ *
40
+ * Tenant approval is the industry ceiling (Microsoft Customer Lockbox, Google Access Approval) and it
41
+ * is structurally unavailable here: there is no single customer to ask. `administrative-continuity-floors.md`
42
+ * names the next-strongest control in as many words — *"a second factor authenticates a session; only
43
+ * a second signature constrains an authenticated operator"* — and asks for a two-person rule on the
44
+ * widest acts.
45
+ *
46
+ * Auto-approval was rejected: it is the tenant grant's default posture precisely BECAUSE a tenant can
47
+ * opt in above it, and there is no such party here, so an auto-approved application-wide grant would
48
+ * be a standing privilege with a request form in front of it.
49
+ *
50
+ * Confining the read to tenants the caller holds a grant for was rejected on MEASUREMENT rather than
51
+ * cost: `users` rows carry no tenant column at all, so there is nothing for a tenant predicate to
52
+ * bind to, and any junction-based confinement would also remove the tenant-less user — the person who
53
+ * has just signed up and belongs to nobody — from the only surface that can find them.
54
+ */
55
+ import { z } from 'zod';
56
+ import { PlatformAccessGrantStatus } from './platform-access-grants.shared.schemas';
57
+ /**
58
+ * The default life of an application-wide grant whose request names no duration.
59
+ *
60
+ * THIRTY minutes — half the tenant grant's default, and the halving is the point rather than a round
61
+ * number. A tenant grant reaches ONE customer and the customer can see and revoke it; this one
62
+ * reaches every customer at once and no customer can see it. The window is the only thing that ends
63
+ * it early, so the unconsidered case gets the narrowest window a support interaction can still use.
64
+ */
65
+ export declare const APPLICATION_ACCESS_GRANT_DEFAULT_DURATION_MINUTES = 30;
66
+ /**
67
+ * The maximum life of an application-wide grant, whatever a request asks for.
68
+ *
69
+ * ONE HOUR against the tenant grant's four. A four-hour window is defended there as "a working
70
+ * session, not a working week" for an elevation into one tenant; the same reasoning gives a shorter
71
+ * answer for an elevation into all of them. An operator who genuinely needs longer re-requests, and
72
+ * a second administrator signs again — which is the record we want, and the reason a shorter ceiling
73
+ * here costs no security and buys a second signature per hour of the widest access the system grants.
74
+ */
75
+ export declare const APPLICATION_ACCESS_GRANT_MAXIMUM_DURATION_MINUTES = 60;
76
+ /**
77
+ * Custom verbs. Mirrors `PlatformAccessGrants_Operations` deliberately — the same lifecycle,
78
+ * so the same verbs, so a reader who knows one knows the other.
79
+ *
80
+ * There is no ordinary CREATE/UPDATE for the same reason: they would be a second, ungated path to the
81
+ * server-authored fields whose server authorship IS the control.
82
+ */
83
+ export declare enum ApplicationAccessGrants_Operations {
84
+ /**
85
+ * The bootstrap verb. Writes one row in `PENDING_APPROVAL` and NEVER in `ACTIVE` — see
86
+ * the `status` field below for why auto-approval has no member here.
87
+ */
88
+ REQUEST_ACCESS = "requestAccess",
89
+ /** The SECOND administrator's signature. Refuses the requester — {@link applicationAccessGrantApproverIsDistinct}. */
90
+ APPROVE = "approve",
91
+ DENY = "deny",
92
+ REVOKE = "revoke",
93
+ /** ACTIVE → EXPIRED, dispatched by the credential-expiry sweep and by nothing else. */
94
+ EXPIRE = "expire"
95
+ }
96
+ export declare const ApplicationAccessGrantSchema: z.ZodObject<{
97
+ _id: import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<z.ZodString>>;
98
+ applicationId: import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<z.ZodOptional<z.ZodString>>>>>;
99
+ operatorUserId: import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<z.ZodString>>>>>>;
100
+ justification: import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<z.ZodString>>;
101
+ status: import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<z.ZodDefault<import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<z.ZodEnum<typeof PlatformAccessGrantStatus>>>>>>>>;
102
+ expiresAt: import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<z.ZodDate>>>>>;
103
+ approvedByUserId: import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<z.ZodOptional<z.ZodString>>>>>>;
104
+ approvedAt: import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<z.ZodOptional<z.ZodDate>>>;
105
+ decisionReason: import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<z.ZodOptional<z.ZodString>>>>;
106
+ createdAt: z.ZodOptional<z.ZodDate>;
107
+ updatedAt: z.ZodOptional<z.ZodDate>;
108
+ }, z.core.$strip>;
109
+ export type ApplicationAccessGrant = z.infer<typeof ApplicationAccessGrantSchema>;
110
+ /**
111
+ * Clamp a requested duration to the application-wide ceiling.
112
+ *
113
+ * A deliberate near-copy of `resolvePlatformAccessGrantExpiry` rather than a shared function taking
114
+ * two constants: the two ceilings are two DECISIONS about two different acts, and a shared helper
115
+ * invites the next author to pass whichever constant is in scope. The behaviour that matters is
116
+ * identical and stated in both places — a longer ask is CLAMPED, never refused, because being told
117
+ * "ask again with a smaller number" during an incident is friction with no security benefit.
118
+ */
119
+ export declare function resolveApplicationAccessGrantExpiry(requestedDurationMinutes: number | undefined, now: Date): Date;
120
+ /**
121
+ * Is this approver a DIFFERENT person from the operator who asked?
122
+ *
123
+ * **This predicate is the two-person rule.** Everything else about an application-wide grant — the
124
+ * request, the window, the justification, the audit row — exists in the tenant grant too. What is new
125
+ * here is exactly this comparison, so it is named, exported, and asked in ONE place.
126
+ *
127
+ * ## Why it is a predicate and not an inline `!==`
128
+ *
129
+ * Three call sites would otherwise each write their own comparison, and two of the three ways to
130
+ * write it are wrong in the same direction:
131
+ *
132
+ * - an approver id that is ABSENT must NOT pass. An unauthenticated or system-context approval has
133
+ * no second person behind it, and `undefined !== 'operator'` is `true` — the inline form fails
134
+ * OPEN on precisely the input a broken context supplies;
135
+ * - an operator id that is absent must not pass either, for the mirror reason.
136
+ *
137
+ * So the predicate requires BOTH ids to be present and different. Fails closed on everything else.
138
+ */
139
+ export declare function applicationAccessGrantApproverIsDistinct(params: {
140
+ readonly operatorUserId: string | undefined | null;
141
+ readonly approverUserId: string | undefined | null;
142
+ }): boolean;
143
+ //# sourceMappingURL=application-access-grants.shared.schemas.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"application-access-grants.shared.schemas.d.ts","sourceRoot":"","sources":["../../../../src/security/authorizations/application-access-grants.shared.schemas.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAqDG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAIxB,OAAO,EAAE,yBAAyB,EAAE,MAAM,yCAAyC,CAAC;AAKpF;;;;;;;GAOG;AACH,eAAO,MAAM,iDAAiD,KAAK,CAAC;AAEpE;;;;;;;;GAQG;AACH,eAAO,MAAM,iDAAiD,KAAK,CAAC;AAEpE;;;;;;GAMG;AACH,oBAAY,kCAAkC;IAC5C;;;OAGG;IACH,cAAc,kBAAkB;IAChC,sHAAsH;IACtH,OAAO,YAAY;IACnB,IAAI,SAAS;IACb,MAAM,WAAW;IACjB,uFAAuF;IACvF,MAAM,WAAW;CAClB;AAED,eAAO,MAAM,4BAA4B;;;;;;;;;;;;iBAyFvC,CAAC;AAEH,MAAM,MAAM,sBAAsB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,4BAA4B,CAAC,CAAC;AAElF;;;;;;;;GAQG;AACH,wBAAgB,mCAAmC,CAAC,wBAAwB,EAAE,MAAM,GAAG,SAAS,EAAE,GAAG,EAAE,IAAI,GAAG,IAAI,CAMjH;AAED;;;;;;;;;;;;;;;;;;GAkBG;AACH,wBAAgB,wCAAwC,CAAC,MAAM,EAAE;IAC/D,QAAQ,CAAC,cAAc,EAAE,MAAM,GAAG,SAAS,GAAG,IAAI,CAAC;IACnD,QAAQ,CAAC,cAAc,EAAE,MAAM,GAAG,SAAS,GAAG,IAAI,CAAC;CACpD,GAAG,OAAO,CAKV"}
@@ -0,0 +1,219 @@
1
+ /**
2
+ * Application Access Grants — time-bound, justified, TWO-PERSON-APPROVED elevation for an operator
3
+ * act that names no single tenant.
4
+ *
5
+ * ## The asymmetry this closes
6
+ *
7
+ * `platformAccessGrants` governs the NARROW act: one operator, one named tenant, one window. It is
8
+ * the door `.claude/rules/administrative-continuity-floors.md` calls rungs 4–5 of the ladder, and it
9
+ * works.
10
+ *
11
+ * The WIDE act was ungoverned. Measured 2026-09-09 and recorded on
12
+ * `ScopeRootConfinementDisposition.UNCONFINED_APPLICATION_TIER_DIRECTORY`:
13
+ *
14
+ * | | per-row crossing | application-wide read |
15
+ * |---|---|---|
16
+ * | elevation required | a usable `platformAccessGrants` row | **none** |
17
+ * | role tier | `APP_ADMIN_SUPER_ADMIN` | `APP_ADMIN_VIEWER` / `ORG_MEMBER` |
18
+ * | evidence | `CROSS_TENANT_ADMINISTRATIVE_ACCESS`, naming the grant | an observation naming no elevation |
19
+ *
20
+ * So the narrow act carried elevation and expiry and the widest read did not — and the wide one sat
21
+ * at a strictly LOWER role tier. That is worse than "not symmetric"; it is the control inverted.
22
+ *
23
+ * ## Why a SEPARATE resource and not a `scope` field on the tenant grant
24
+ *
25
+ * Structural, not stylistic. A `platformAccessGrants` row is ORGANIZATIONS-scoped: its primary-scope
26
+ * relationship carries `isPrimaryScope: true` on `organizationId`, every route is
27
+ * `/organizations/{organizationId}/platform-access-grants/…`, and the tenant's ability to SEE and
28
+ * REVOKE the row is exactly what that scope buys. An application-wide elevation names no tenant, so
29
+ * the route has nothing to carry and the scope has nobody to serve. Adding a nullable
30
+ * `organizationId` to make one row shape serve both would weaken the field whose presence IS the
31
+ * tenant grant's control — which the finding explicitly refuses ("do not weaken the per-row model to
32
+ * make the two symmetric").
33
+ *
34
+ * The engine's own precedent for a second scope over one lifecycle is `applicationAuditLogs` beside
35
+ * `auditLogs`: a sibling resource type carrying ONE application parent, taking the route it needs and
36
+ * leaving the existing door byte-identical.
37
+ *
38
+ * ## Why TWO-PERSON, and what was rejected
39
+ *
40
+ * Tenant approval is the industry ceiling (Microsoft Customer Lockbox, Google Access Approval) and it
41
+ * is structurally unavailable here: there is no single customer to ask. `administrative-continuity-floors.md`
42
+ * names the next-strongest control in as many words — *"a second factor authenticates a session; only
43
+ * a second signature constrains an authenticated operator"* — and asks for a two-person rule on the
44
+ * widest acts.
45
+ *
46
+ * Auto-approval was rejected: it is the tenant grant's default posture precisely BECAUSE a tenant can
47
+ * opt in above it, and there is no such party here, so an auto-approved application-wide grant would
48
+ * be a standing privilege with a request form in front of it.
49
+ *
50
+ * Confining the read to tenants the caller holds a grant for was rejected on MEASUREMENT rather than
51
+ * cost: `users` rows carry no tenant column at all, so there is nothing for a tenant predicate to
52
+ * bind to, and any junction-based confinement would also remove the tenant-less user — the person who
53
+ * has just signed up and belongs to nobody — from the only surface that can find them.
54
+ */
55
+ import { z } from 'zod';
56
+ import { PersonalDataCategory } from '../../compliance/privacy/personal-data-category.shared.schemas.js';
57
+ import { RedactionType } from '../../compliance/privacy/redaction.shared.schemas.js';
58
+ import { addImpersonalizeWith } from '@wildo-ai/zod-decorators';
59
+ import { PlatformAccessGrantStatus } from './platform-access-grants.shared.schemas.js';
60
+ /** Fixed replacement for grant free-text that cannot be cleared (a `.min(1)` field). */
61
+ const ERASED_GRANT_TEXT = '[erased]';
62
+ /**
63
+ * The default life of an application-wide grant whose request names no duration.
64
+ *
65
+ * THIRTY minutes — half the tenant grant's default, and the halving is the point rather than a round
66
+ * number. A tenant grant reaches ONE customer and the customer can see and revoke it; this one
67
+ * reaches every customer at once and no customer can see it. The window is the only thing that ends
68
+ * it early, so the unconsidered case gets the narrowest window a support interaction can still use.
69
+ */
70
+ export const APPLICATION_ACCESS_GRANT_DEFAULT_DURATION_MINUTES = 30;
71
+ /**
72
+ * The maximum life of an application-wide grant, whatever a request asks for.
73
+ *
74
+ * ONE HOUR against the tenant grant's four. A four-hour window is defended there as "a working
75
+ * session, not a working week" for an elevation into one tenant; the same reasoning gives a shorter
76
+ * answer for an elevation into all of them. An operator who genuinely needs longer re-requests, and
77
+ * a second administrator signs again — which is the record we want, and the reason a shorter ceiling
78
+ * here costs no security and buys a second signature per hour of the widest access the system grants.
79
+ */
80
+ export const APPLICATION_ACCESS_GRANT_MAXIMUM_DURATION_MINUTES = 60;
81
+ /**
82
+ * Custom verbs. Mirrors `PlatformAccessGrants_Operations` deliberately — the same lifecycle,
83
+ * so the same verbs, so a reader who knows one knows the other.
84
+ *
85
+ * There is no ordinary CREATE/UPDATE for the same reason: they would be a second, ungated path to the
86
+ * server-authored fields whose server authorship IS the control.
87
+ */
88
+ export var ApplicationAccessGrants_Operations;
89
+ (function (ApplicationAccessGrants_Operations) {
90
+ /**
91
+ * The bootstrap verb. Writes one row in `PENDING_APPROVAL` and NEVER in `ACTIVE` — see
92
+ * the `status` field below for why auto-approval has no member here.
93
+ */
94
+ ApplicationAccessGrants_Operations["REQUEST_ACCESS"] = "requestAccess";
95
+ /** The SECOND administrator's signature. Refuses the requester — {@link applicationAccessGrantApproverIsDistinct}. */
96
+ ApplicationAccessGrants_Operations["APPROVE"] = "approve";
97
+ ApplicationAccessGrants_Operations["DENY"] = "deny";
98
+ ApplicationAccessGrants_Operations["REVOKE"] = "revoke";
99
+ /** ACTIVE → EXPIRED, dispatched by the credential-expiry sweep and by nothing else. */
100
+ ApplicationAccessGrants_Operations["EXPIRE"] = "expire";
101
+ })(ApplicationAccessGrants_Operations || (ApplicationAccessGrants_Operations = {}));
102
+ export const ApplicationAccessGrantSchema = z.object({
103
+ _id: z.string().min(1).isPrimaryKey().isSummaryField(),
104
+ /**
105
+ * The primary-scope parent — the deployment this elevation is inside.
106
+ *
107
+ * OPTIONAL, and that is a load-bearing copy of `applicationAuditLogs`' own shape rather than a
108
+ * looseness: declared MANDATORY the resource does not load at all on a Mongo-persisted deployment
109
+ * (the ZodToMongoose convertor refuses it and INIT dies on `zod_converter_schema_conversion_failed`).
110
+ * Addressing is carried by `isPrimaryScope` + `REQUIRES_CONTEXT` on the relationship, which is what
111
+ * the URL builder reads, so the route is identical either way.
112
+ */
113
+ applicationId: z.string().min(1).optional().isDBIndexed().isForeignKey().excludeFromUpdate().isAuditEvidence(),
114
+ /** The operator who requested the elevation. Server-authored from the session, never client-supplied. */
115
+ operatorUserId: z.string().min(1).isDBIndexed().isForeignKey().isSummaryField().excludeFromCreate().excludeFromUpdate().isAuditEvidence(),
116
+ /**
117
+ * Why the operator needs application-wide reach. REQUIRED, like its tenant sibling, and here it
118
+ * carries more weight: it is the ONLY thing the approving administrator has to decide on. A tenant
119
+ * grant's approver knows their own tenant and their own support case; this approver knows nothing
120
+ * but this sentence.
121
+ */
122
+ // USER_CONTENT — free prose an OPERATOR typed. MASK rather than REMOVE on erasure: `.min(1)` makes
123
+ // it non-clearable, so a null would be rejected by the strict update-DTO parse the impersonalize
124
+ // writer runs, and a fixed non-empty string is accepted.
125
+ justification: addImpersonalizeWith(z.string().min(1).max(1000).isSummaryField()
126
+ .dataCategories(PersonalDataCategory.USER_CONTENT), RedactionType.MASK, { maskValue: ERASED_GRANT_TEXT }),
127
+ /**
128
+ * Lifecycle position, sharing {@link PlatformAccessGrantStatus} rather than declaring a parallel
129
+ * vocabulary — the states really are the same states, and two enums holding the same five members
130
+ * is how a sweep, a predicate and a UI come to disagree about what `active` means.
131
+ *
132
+ * ## The member that is UNREACHABLE here, and why that is the control
133
+ *
134
+ * Every application-wide grant starts `PENDING_APPROVAL`. There is no auto-approval path and
135
+ * therefore no `autoApprovalReason` field: the tenant grant auto-approves when the tenant has not
136
+ * opted into approval, or cannot approve — both are statements about a NAMED tenant, and this row
137
+ * names none. A grant that could approve itself would make the two-person rule ceremonial, which is
138
+ * exactly the criticism `approve` on the tenant resource carries against platform self-approval.
139
+ */
140
+ status: z.enum(PlatformAccessGrantStatus)
141
+ .systemEnum('PlatformAccessGrantStatus')
142
+ .default(PlatformAccessGrantStatus.PENDING_APPROVAL)
143
+ .isDBIndexed()
144
+ .isSummaryField()
145
+ .excludeFromCreate()
146
+ .excludeFromUpdate()
147
+ .isAuditEvidence(),
148
+ /**
149
+ * When the elevation stops working.
150
+ *
151
+ * Server-authored from the requested duration, clamped to
152
+ * {@link APPLICATION_ACCESS_GRANT_MAXIMUM_DURATION_MINUTES}. The admission predicate reads THIS
153
+ * field and not `status`, so expiry needs no sweeper to take effect — the same separation the
154
+ * tenant grant keeps, and for the same reason: if admission ever starts reading the label, a
155
+ * lagging sweep becomes an authorization hole rather than a stale display.
156
+ */
157
+ expiresAt: z.date().isDBIndexed().isSummaryField().excludeFromCreate().excludeFromUpdate().isAuditEvidence(),
158
+ /**
159
+ * The SECOND administrator. Present on every `ACTIVE` row, by construction.
160
+ *
161
+ * Optional in the SCHEMA because it is unset while the request is pending and stays unset on a
162
+ * denied or revoked one. It is not optional in the LIFECYCLE: the only writer of
163
+ * `status = ACTIVE` is `approve`, and `approve` refuses when this would equal `operatorUserId`.
164
+ * That refusal is the two-person rule, and it lives in one predicate
165
+ * ({@link applicationAccessGrantApproverIsDistinct}) so no second call site can re-derive it
166
+ * more leniently.
167
+ */
168
+ approvedByUserId: z.string().min(1).optional().isForeignKey().isSummaryField().excludeFromCreate().excludeFromUpdate().isAuditEvidence(),
169
+ approvedAt: z.date().optional().excludeFromCreate().excludeFromUpdate(),
170
+ /** The approver's reason for refusing, or the revoker's reason for withdrawing. */
171
+ // REMOVE — free text again, and clearable (`.optional()`).
172
+ decisionReason: addImpersonalizeWith(z.string().max(1000).optional().excludeFromCreate().excludeFromUpdate()
173
+ .dataCategories(PersonalDataCategory.USER_CONTENT), RedactionType.REMOVE),
174
+ createdAt: z.date().optional(),
175
+ updatedAt: z.date().optional(),
176
+ });
177
+ /**
178
+ * Clamp a requested duration to the application-wide ceiling.
179
+ *
180
+ * A deliberate near-copy of `resolvePlatformAccessGrantExpiry` rather than a shared function taking
181
+ * two constants: the two ceilings are two DECISIONS about two different acts, and a shared helper
182
+ * invites the next author to pass whichever constant is in scope. The behaviour that matters is
183
+ * identical and stated in both places — a longer ask is CLAMPED, never refused, because being told
184
+ * "ask again with a smaller number" during an incident is friction with no security benefit.
185
+ */
186
+ export function resolveApplicationAccessGrantExpiry(requestedDurationMinutes, now) {
187
+ const requested = requestedDurationMinutes && requestedDurationMinutes > 0
188
+ ? requestedDurationMinutes
189
+ : APPLICATION_ACCESS_GRANT_DEFAULT_DURATION_MINUTES;
190
+ const minutes = Math.min(requested, APPLICATION_ACCESS_GRANT_MAXIMUM_DURATION_MINUTES);
191
+ return new Date(now.getTime() + minutes * 60_000);
192
+ }
193
+ /**
194
+ * Is this approver a DIFFERENT person from the operator who asked?
195
+ *
196
+ * **This predicate is the two-person rule.** Everything else about an application-wide grant — the
197
+ * request, the window, the justification, the audit row — exists in the tenant grant too. What is new
198
+ * here is exactly this comparison, so it is named, exported, and asked in ONE place.
199
+ *
200
+ * ## Why it is a predicate and not an inline `!==`
201
+ *
202
+ * Three call sites would otherwise each write their own comparison, and two of the three ways to
203
+ * write it are wrong in the same direction:
204
+ *
205
+ * - an approver id that is ABSENT must NOT pass. An unauthenticated or system-context approval has
206
+ * no second person behind it, and `undefined !== 'operator'` is `true` — the inline form fails
207
+ * OPEN on precisely the input a broken context supplies;
208
+ * - an operator id that is absent must not pass either, for the mirror reason.
209
+ *
210
+ * So the predicate requires BOTH ids to be present and different. Fails closed on everything else.
211
+ */
212
+ export function applicationAccessGrantApproverIsDistinct(params) {
213
+ const operator = String(params.operatorUserId ?? '');
214
+ const approver = String(params.approverUserId ?? '');
215
+ if (!operator || !approver)
216
+ return false;
217
+ return operator !== approver;
218
+ }
219
+ //# sourceMappingURL=application-access-grants.shared.schemas.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"application-access-grants.shared.schemas.js","sourceRoot":"","sources":["../../../../src/security/authorizations/application-access-grants.shared.schemas.ts"],"names":[],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M,EAAE,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC,QAAQ,EAAE,CAAC,iBAAiB,EAAE,CAAC,iBAAiB,EAAE;SACtE,cAAc,CAAC,oBAAoB,CAAC,YAAY,CAAC,EAClD,aAAa,CAAC,MAAM,CACrB;IAED,SAAS,EAAE,CAAC,CAAC,IAAI,EAAE,CAAC,QAAQ,EAAE;IAC9B,SAAS,EAAE,CAAC,CAAC,IAAI,EAAE,CAAC,QAAQ,EAAE;CAC/B,CAAC,CAAC;AAIH;;;;;;;;GAQG;AACH,MAAM,UAAU,mCAAmC,CAAC,wBAA4C,EAAE,GAAS;IACzG,MAAM,SAAS,GAAG,wBAAwB,IAAI,wBAAwB,GAAG,CAAC;QACxE,CAAC,CAAC,wBAAwB;QAC1B,CAAC,CAAC,iDAAiD,CAAC;IACtD,MAAM,OAAO,GAAG,IAAI,CAAC,GAAG,CAAC,SAAS,EAAE,iDAAiD,CAAC,CAAC;IACvF,OAAO,IAAI,IAAI,CAAC,GAAG,CAAC,OAAO,EAAE,GAAG,OAAO,GAAG,MAAM,CAAC,CAAC;AACpD,CAAC;AAED;;;;;;;;;;;;;;;;;;GAkBG;AACH,MAAM,UAAU,wCAAwC,CAAC,MAGxD;IACC,MAAM,QAAQ,GAAG,MAAM,CAAC,MAAM,CAAC,cAAc,IAAI,EAAE,CAAC,CAAC;IACrD,MAAM,QAAQ,GAAG,MAAM,CAAC,MAAM,CAAC,cAAc,IAAI,EAAE,CAAC,CAAC;IACrD,IAAI,CAAC,QAAQ,IAAI,CAAC,QAAQ;QAAE,OAAO,KAAK,CAAC;IACzC,OAAO,QAAQ,KAAK,QAAQ,CAAC;AAC/B,CAAC","sourcesContent":["/**\n * Application Access Grants — time-bound, justified, TWO-PERSON-APPROVED elevation for an operator\n * act that names no single tenant.\n *\n * ## The asymmetry this closes\n *\n * `platformAccessGrants` governs the NARROW act: one operator, one named tenant, one window. It is\n * the door `.claude/rules/administrative-continuity-floors.md` calls rungs 4–5 of the ladder, and it\n * works.\n *\n * The WIDE act was ungoverned. Measured 2026-09-09 and recorded on\n * `ScopeRootConfinementDisposition.UNCONFINED_APPLICATION_TIER_DIRECTORY`:\n *\n * | | per-row crossing | application-wide read |\n * |---|---|---|\n * | elevation required | a usable `platformAccessGrants` row | **none** |\n * | role tier | `APP_ADMIN_SUPER_ADMIN` | `APP_ADMIN_VIEWER` / `ORG_MEMBER` |\n * | evidence | `CROSS_TENANT_ADMINISTRATIVE_ACCESS`, naming the grant | an observation naming no elevation |\n *\n * So the narrow act carried elevation and expiry and the widest read did not — and the wide one sat\n * at a strictly LOWER role tier. That is worse than \"not symmetric\"; it is the control inverted.\n *\n * ## Why a SEPARATE resource and not a `scope` field on the tenant grant\n *\n * Structural, not stylistic. A `platformAccessGrants` row is ORGANIZATIONS-scoped: its primary-scope\n * relationship carries `isPrimaryScope: true` on `organizationId`, every route is\n * `/organizations/{organizationId}/platform-access-grants/…`, and the tenant's ability to SEE and\n * REVOKE the row is exactly what that scope buys. An application-wide elevation names no tenant, so\n * the route has nothing to carry and the scope has nobody to serve. Adding a nullable\n * `organizationId` to make one row shape serve both would weaken the field whose presence IS the\n * tenant grant's control — which the finding explicitly refuses (\"do not weaken the per-row model to\n * make the two symmetric\").\n *\n * The engine's own precedent for a second scope over one lifecycle is `applicationAuditLogs` beside\n * `auditLogs`: a sibling resource type carrying ONE application parent, taking the route it needs and\n * leaving the existing door byte-identical.\n *\n * ## Why TWO-PERSON, and what was rejected\n *\n * Tenant approval is the industry ceiling (Microsoft Customer Lockbox, Google Access Approval) and it\n * is structurally unavailable here: there is no single customer to ask. `administrative-continuity-floors.md`\n * names the next-strongest control in as many words — *\"a second factor authenticates a session; only\n * a second signature constrains an authenticated operator\"* — and asks for a two-person rule on the\n * widest acts.\n *\n * Auto-approval was rejected: it is the tenant grant's default posture precisely BECAUSE a tenant can\n * opt in above it, and there is no such party here, so an auto-approved application-wide grant would\n * be a standing privilege with a request form in front of it.\n *\n * Confining the read to tenants the caller holds a grant for was rejected on MEASUREMENT rather than\n * cost: `users` rows carry no tenant column at all, so there is nothing for a tenant predicate to\n * bind to, and any junction-based confinement would also remove the tenant-less user — the person who\n * has just signed up and belongs to nobody — from the only surface that can find them.\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';\nimport { PlatformAccessGrantStatus } from './platform-access-grants.shared.schemas';\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 an application-wide grant whose request names no duration.\n *\n * THIRTY minutes — half the tenant grant's default, and the halving is the point rather than a round\n * number. A tenant grant reaches ONE customer and the customer can see and revoke it; this one\n * reaches every customer at once and no customer can see it. The window is the only thing that ends\n * it early, so the unconsidered case gets the narrowest window a support interaction can still use.\n */\nexport const APPLICATION_ACCESS_GRANT_DEFAULT_DURATION_MINUTES = 30;\n\n/**\n * The maximum life of an application-wide grant, whatever a request asks for.\n *\n * ONE HOUR against the tenant grant's four. A four-hour window is defended there as \"a working\n * session, not a working week\" for an elevation into one tenant; the same reasoning gives a shorter\n * answer for an elevation into all of them. An operator who genuinely needs longer re-requests, and\n * a second administrator signs again — which is the record we want, and the reason a shorter ceiling\n * here costs no security and buys a second signature per hour of the widest access the system grants.\n */\nexport const APPLICATION_ACCESS_GRANT_MAXIMUM_DURATION_MINUTES = 60;\n\n/**\n * Custom verbs. Mirrors `PlatformAccessGrants_Operations` deliberately — the same lifecycle,\n * so the same verbs, so a reader who knows one knows the other.\n *\n * There is no ordinary CREATE/UPDATE for the same reason: they would be a second, ungated path to the\n * server-authored fields whose server authorship IS the control.\n */\nexport enum ApplicationAccessGrants_Operations {\n /**\n * The bootstrap verb. Writes one row in `PENDING_APPROVAL` and NEVER in `ACTIVE` — see\n * the `status` field below for why auto-approval has no member here.\n */\n REQUEST_ACCESS = 'requestAccess',\n /** The SECOND administrator's signature. Refuses the requester — {@link applicationAccessGrantApproverIsDistinct}. */\n APPROVE = 'approve',\n DENY = 'deny',\n REVOKE = 'revoke',\n /** ACTIVE → EXPIRED, dispatched by the credential-expiry sweep and by nothing else. */\n EXPIRE = 'expire',\n}\n\nexport const ApplicationAccessGrantSchema = z.object({\n _id: z.string().min(1).isPrimaryKey().isSummaryField(),\n\n /**\n * The primary-scope parent — the deployment this elevation is inside.\n *\n * OPTIONAL, and that is a load-bearing copy of `applicationAuditLogs`' own shape rather than a\n * looseness: declared MANDATORY the resource does not load at all on a Mongo-persisted deployment\n * (the ZodToMongoose convertor refuses it and INIT dies on `zod_converter_schema_conversion_failed`).\n * Addressing is carried by `isPrimaryScope` + `REQUIRES_CONTEXT` on the relationship, which is what\n * the URL builder reads, so the route is identical either way.\n */\n applicationId: z.string().min(1).optional().isDBIndexed().isForeignKey().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 application-wide reach. REQUIRED, like its tenant sibling, and here it\n * carries more weight: it is the ONLY thing the approving administrator has to decide on. A tenant\n * grant's approver knows their own tenant and their own support case; this approver knows nothing\n * but this sentence.\n */\n // USER_CONTENT — free prose an OPERATOR typed. MASK rather than REMOVE on erasure: `.min(1)` makes\n // it non-clearable, so a null would be rejected by the strict update-DTO parse the impersonalize\n // writer runs, and a fixed non-empty string is accepted.\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 /**\n * Lifecycle position, sharing {@link PlatformAccessGrantStatus} rather than declaring a parallel\n * vocabulary — the states really are the same states, and two enums holding the same five members\n * is how a sweep, a predicate and a UI come to disagree about what `active` means.\n *\n * ## The member that is UNREACHABLE here, and why that is the control\n *\n * Every application-wide grant starts `PENDING_APPROVAL`. There is no auto-approval path and\n * therefore no `autoApprovalReason` field: the tenant grant auto-approves when the tenant has not\n * opted into approval, or cannot approve — both are statements about a NAMED tenant, and this row\n * names none. A grant that could approve itself would make the two-person rule ceremonial, which is\n * exactly the criticism `approve` on the tenant resource carries against platform self-approval.\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 APPLICATION_ACCESS_GRANT_MAXIMUM_DURATION_MINUTES}. The admission predicate reads THIS\n * field and not `status`, so expiry needs no sweeper to take effect — the same separation the\n * tenant grant keeps, and for the same reason: if admission ever starts reading the label, a\n * lagging sweep becomes an authorization hole rather than a stale display.\n */\n expiresAt: z.date().isDBIndexed().isSummaryField().excludeFromCreate().excludeFromUpdate().isAuditEvidence(),\n\n /**\n * The SECOND administrator. Present on every `ACTIVE` row, by construction.\n *\n * Optional in the SCHEMA because it is unset while the request is pending and stays unset on a\n * denied or revoked one. It is not optional in the LIFECYCLE: the only writer of\n * `status = ACTIVE` is `approve`, and `approve` refuses when this would equal `operatorUserId`.\n * That refusal is the two-person rule, and it lives in one predicate\n * ({@link applicationAccessGrantApproverIsDistinct}) so no second call site can re-derive it\n * more leniently.\n */\n approvedByUserId: z.string().min(1).optional().isForeignKey().isSummaryField().excludeFromCreate().excludeFromUpdate().isAuditEvidence(),\n approvedAt: z.date().optional().excludeFromCreate().excludeFromUpdate(),\n\n /** The approver'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 ApplicationAccessGrant = z.infer<typeof ApplicationAccessGrantSchema>;\n\n/**\n * Clamp a requested duration to the application-wide ceiling.\n *\n * A deliberate near-copy of `resolvePlatformAccessGrantExpiry` rather than a shared function taking\n * two constants: the two ceilings are two DECISIONS about two different acts, and a shared helper\n * invites the next author to pass whichever constant is in scope. The behaviour that matters is\n * identical and stated in both places — a longer ask is CLAMPED, never refused, because being told\n * \"ask again with a smaller number\" during an incident is friction with no security benefit.\n */\nexport function resolveApplicationAccessGrantExpiry(requestedDurationMinutes: number | undefined, now: Date): Date {\n const requested = requestedDurationMinutes && requestedDurationMinutes > 0\n ? requestedDurationMinutes\n : APPLICATION_ACCESS_GRANT_DEFAULT_DURATION_MINUTES;\n const minutes = Math.min(requested, APPLICATION_ACCESS_GRANT_MAXIMUM_DURATION_MINUTES);\n return new Date(now.getTime() + minutes * 60_000);\n}\n\n/**\n * Is this approver a DIFFERENT person from the operator who asked?\n *\n * **This predicate is the two-person rule.** Everything else about an application-wide grant — the\n * request, the window, the justification, the audit row — exists in the tenant grant too. What is new\n * here is exactly this comparison, so it is named, exported, and asked in ONE place.\n *\n * ## Why it is a predicate and not an inline `!==`\n *\n * Three call sites would otherwise each write their own comparison, and two of the three ways to\n * write it are wrong in the same direction:\n *\n * - an approver id that is ABSENT must NOT pass. An unauthenticated or system-context approval has\n * no second person behind it, and `undefined !== 'operator'` is `true` — the inline form fails\n * OPEN on precisely the input a broken context supplies;\n * - an operator id that is absent must not pass either, for the mirror reason.\n *\n * So the predicate requires BOTH ids to be present and different. Fails closed on everything else.\n */\nexport function applicationAccessGrantApproverIsDistinct(params: {\n readonly operatorUserId: string | undefined | null;\n readonly approverUserId: string | undefined | null;\n}): boolean {\n const operator = String(params.operatorUserId ?? '');\n const approver = String(params.approverUserId ?? '');\n if (!operator || !approver) return false;\n return operator !== approver;\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"platform-access-grants.shared.resources-config.schemas.d.ts","sourceRoot":"","sources":["../../../../../src/security/authorizations/platform-access-grants.shared.resources-config.schemas.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAA6B,yBAAyB,EAAE,+BAA+B,EAAE,MAAM,yCAAyC,CAAC;AAChJ,OAAO,EAAE,qBAAqB,EAAwD,MAAM,mDAAmD,CAAC;AAChJ,OAAO,EAGL,KAAK,oBAAoB,EAC1B,MAAM,0CAA0C,CAAC;AAQlD,KAAK,kCAAkC,GACnC,qBAAqB,CAAC,IAAI,GAC1B,qBAAqB,CAAC,IAAI,GAC1B,qBAAqB,CAAC,KAAK,GAC3B,qBAAqB,CAAC,MAAM,GAE5B,qBAAqB,CAAC,WAAW,CAAC;AAEtC,eAAO,MAAM,+DAA+D,GAAI,wBAAwB,oBAAoB,EAAE;;;;;;;;;;;;;kBA2S1H,CAAC"}
1
+ {"version":3,"file":"platform-access-grants.shared.resources-config.schemas.d.ts","sourceRoot":"","sources":["../../../../src/security/authorizations/platform-access-grants.shared.resources-config.schemas.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAA6B,yBAAyB,EAAE,+BAA+B,EAAE,MAAM,yCAAyC,CAAC;AAChJ,OAAO,EAAE,qBAAqB,EAAwD,MAAM,mDAAmD,CAAC;AAChJ,OAAO,EAGL,KAAK,oBAAoB,EAC1B,MAAM,0CAA0C,CAAC;AAQlD,KAAK,kCAAkC,GACnC,qBAAqB,CAAC,IAAI,GAC1B,qBAAqB,CAAC,IAAI,GAC1B,qBAAqB,CAAC,KAAK,GAC3B,qBAAqB,CAAC,MAAM,GAE5B,qBAAqB,CAAC,WAAW,CAAC;AAEtC,eAAO,MAAM,+DAA+D,GAAI,wBAAwB,oBAAoB,EAAE;;;;;;;;;;;;;kBAuU1H,CAAC"}
@@ -269,6 +269,33 @@ export const platformAccessGrantsResourceConfiguration_InitializationFactory = (
269
269
  * Revoking is monotonic — it only ever removes authority — so admitting the platform side costs
270
270
  * nothing the reversibility test would object to.
271
271
  */
272
+ /**
273
+ * ACTIVE → EXPIRED once the window has elapsed, dispatched by the credential-expiry sweep and
274
+ * by nothing else (#413). INTERNAL_CALL: no route, no frontend affordance, and therefore no
275
+ * `admitsCrossTenantPlatformAdministration` — the tenant-boundary question does not arise for
276
+ * an operation no request can reach.
277
+ *
278
+ * The transition precondition lives in the paired implementation, which permits it only from
279
+ * ACTIVE: a grant the tenant DENIED or REVOKED must keep saying so, and relabelling a
280
+ * terminal grant would rewrite the decision history a customer audit reads.
281
+ */
282
+ [PlatformAccessGrants_Operations.EXPIRE]: {
283
+ variants: [
284
+ {
285
+ variantType: ResourceOperationVariantType.INTERNAL_CALL,
286
+ isDefault: true,
287
+ roles: [CORE_APP_ROLES.APP_ADMIN_SUPER_ADMIN],
288
+ riskLevel: ResourceOperationRiskLevel.LOW,
289
+ resourceOperationLike: CoreResourceOperation.UPDATE,
290
+ // EMPTY BY CONTRACT, not by omission. The credential-expiry sweep dispatches this verb with `{}`
291
+ // and the paired prefix implementation forces the status transition itself, so there is no field
292
+ // a caller may supply. Declaring nothing is NOT the same as declaring this: an operation without
293
+ // a `requestDto` inherits the resource's ENTIRE update contract, which would let an INTERNAL_CALL
294
+ // that accepts nothing advertise every field — `status` included, the one field this verb owns.
295
+ requestDto: z.object({}),
296
+ },
297
+ ],
298
+ },
272
299
  [PlatformAccessGrants_Operations.REVOKE]: {
273
300
  variants: [
274
301
  {
@@ -1 +1 @@
1
- {"version":3,"file":"platform-access-grants.shared.resources-config.schemas.js","sourceRoot":"","sources":["../../../../../src/security/authorizations/platform-access-grants.shared.resources-config.schemas.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAEH,OAAO,EAAE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AAqB,EAAE,qBAAqB,CAAC,MAAM;oBACnD,uCAAuC,EAAE,IAAI;oBAC7C,UAAU,EAAE,CAAC,CAAC,MAAM,CAAC;wBACnB,cAAc,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC,QAAQ,EAAE;qBAChD,CAAC;oBACF,gBAAgB,EAAE,CAAC,EAAE,aAAa,EAAE,EAAE,EAAE,CACtC,aAAa,CAAC,MAAM,KAAK,yBAAyB,CAAC,gBAAgB;2BAChE,aAAa,CAAC,MAAM,KAAK,yBAAyB,CAAC,MAAM;iBAC/D;aACF;SACF;KACF;IACD,8FAA8F;IAC9F,kGAAkG;IAClG,+FAA+F;IAC/F,wEAAwE;CACzE,CAAC,CAAC","sourcesContent":["/**\n * Platform Access Grants — resource configuration.\n *\n * The operation set is unusual and the asymmetry is the point: the PLATFORM requests, the TENANT\n * decides. No verb lets one side do the other's job.\n *\n * requestAccess — platform-tier, crosses the tenant boundary\n * approve / deny — the TARGET tenant's own administrators, never platform-tier\n * revoke — either side, because either may end an elevation early\n *\n * See `platform-access-grants.shared.schemas.ts` for why the resource exists at all (rungs 4–5 of\n * the operator-access ladder in `.claude/rules/administrative-continuity-floors.md`) and\n * `.claude/plans/platform-access-grants-jit-elevation.md` for the remaining steps.\n */\n\nimport { z } from 'zod';\nimport { PlatformAccessGrantSchema, PlatformAccessGrantStatus, PlatformAccessGrants_Operations } from './platform-access-grants.shared.schemas';\nimport { CoreResourceOperation, CoreResourceType, coreResourceShared_FieldIdentifier } from '../../resources/resources.shared.core.definitions';\nimport {\n ResourceOperationRiskLevel,\n ResourceOperationVariantType,\n type ResourceRelationship,\n} from '../../resources/resources.shared.schemas';\nimport { createResourceConfiguration_Initialization } from '../../resources/resources-config.shared.factory';\nimport { ResourceSystemAccessMode } from '../../resources/resources-config.shared.schemas';\nimport { CoreUserNotificationTarget, CoreUserNotificationChannel } from '../../notifications/notifications.shared.schemas';\nimport { CORE_APP_ROLES, CORE_ORG_ROLES } from './roles.shared.schemas';\nimport { ErasureRetentionMode, ResourceDataSubjectKind } from '../../compliance/privacy/impersonalization.shared.schemas';\n\n\ntype PlatformAccessGrantsCoreOperations =\n | CoreResourceOperation.READ\n | CoreResourceOperation.LIST\n | CoreResourceOperation.COUNT\n | CoreResourceOperation.DELETE\n // Route-less; `retentionPolicy` requires READ + LIST + UPDATE_MANY.\n | CoreResourceOperation.UPDATE_MANY;\n\nexport const platformAccessGrantsResourceConfiguration_InitializationFactory = (resourcesRelationships: ResourceRelationship[]) =>\n createResourceConfiguration_Initialization<\n typeof PlatformAccessGrants_Operations,\n PlatformAccessGrantsCoreOperations,\n typeof PlatformAccessGrantSchema\n >({\n mainSchema: PlatformAccessGrantSchema,\n resourceIdentifier: CoreResourceType.PLATFORM_ACCESS_GRANTS,\n resourceFieldIdentifier: coreResourceShared_FieldIdentifier[CoreResourceType.PLATFORM_ACCESS_GRANTS],\n resourceRelationships: resourcesRelationships,\n isSystemResource: true,\n\n /**\n * `read`/`list` are ALLOWED for the trusted path because the authorization layer itself has to\n * resolve a caller's usable grant before admitting a crossing, and it does so on a system context\n * — the caller is by definition not a member of the tenant whose grants are being read.\n *\n * No trusted `create`/`update`: every transition belongs to a custom implementation that applies\n * the tenant policy and the continuity-floor measurement. A system door around those would be a\n * second way to mint an elevation, which is the one thing this resource exists to prevent.\n */\n systemAccessPolicy: {\n read: ResourceSystemAccessMode.ALLOWED,\n list: ResourceSystemAccessMode.ALLOWED,\n\n /**\n * Subject-export disclosure — FORBIDDEN, and the declaration is REQUIRED rather than optional.\n *\n * `operatorUserId` and `approvedByUserId` are foreign keys back to USERS, so\n * `classifySubjectExportDisposition` puts these rows on a user's Art. 15 graph as\n * `INCLUDED_REFERENCES_SUBJECT` — personal data CONCERNING the subject even though the subject\n * does not own it. An included resource carrying NO declaration REFUSES the entire export, so\n * omitting this would trade a frontend boot failure for a broken disclosure right.\n *\n * FORBIDDEN for the reason AUDIT_LOGS is: this is a security/operational monitoring record, and\n * handing the monitoring trail to the person it monitors is self-defeating. It is also not only\n * about them — a grant names the TENANT's approver and carries the tenant's decision reason, so\n * disclosing it to the operator would expose another data subject's decision (Art. 15(4)).\n * FORBIDDEN rows are left OUT of the bundle and RECORDED with that reason, never silently\n * dropped, so the report still answers \"why is this missing?\".\n */\n exportSubject: ResourceSystemAccessMode.FORBIDDEN,\n },\n\n /**\n * Subject erasure RETAINS this row and scrubs its free text.\n *\n * Note this is a DIFFERENT question from the `exportSubject: FORBIDDEN` above, and the two answers\n * differ deliberately. That one asks whether the monitored operator may READ the monitoring trail —\n * no. This one asks what erasure DOES to the row, and nothing here says erasure must not reach it.\n *\n * The grant survives because its security value is WHO reached WHICH tenant, WHEN, and under whose\n * approval — none of which is scrubbed. What does not survive is `justification` and `decisionReason`:\n * operator- and approver-written prose, and the surface most likely to name a third party in passing.\n * That makes the erasure narrow rather than destructive of the record.\n *\n * Contrast `auditLogs`, which is exempt outright: it is the immutable ledger of what happened,\n * including this erasure, so scrubbing it would destroy the evidence the erasure was performed.\n */\n retentionPolicy: {\n mode: ErasureRetentionMode.RETAIN_AND_IMPERSONALIZE,\n },\n\n /**\n * Erasing one of these rows revokes NO session. The grant is a record ABOUT an operator's access, not\n * the operator; their session ends through the `USERS` row, which is `SELF_PRINCIPAL`.\n */\n dataSubjectPolicy: { kind: ResourceDataSubjectKind.NO_PRINCIPAL },\n\n coreOperations: [\n CoreResourceOperation.READ,\n CoreResourceOperation.LIST,\n CoreResourceOperation.COUNT,\n // Route-less; `retentionPolicy` requires READ + LIST + UPDATE_MANY.\n CoreResourceOperation.UPDATE_MANY,\n // Present for the tenant-purge cascade ONLY — see the operation's configuration below.\n CoreResourceOperation.DELETE,\n ],\n\n operationsConfiguration: {\n\n /*\n\n * Route-less retention plumbing — INTERNAL_CALL registers no route and must not be REPOSITORY_ONLY: the\n\n * retention primitives resolve through `getServiceOperationPathDefault`, which matches only\n\n * INTERNAL_CALL / API_CALL. CRITICAL — it is the verb the impersonalize writer uses to stamp markers.\n\n */\n\n [CoreResourceOperation.UPDATE_MANY]: {\n\n variants: [{\n\n variantType: ResourceOperationVariantType.INTERNAL_CALL,\n\n isDefault: true,\n\n roles: [CORE_APP_ROLES.APP_ADMIN_SUPER_ADMIN],\n\n riskLevel: ResourceOperationRiskLevel.CRITICAL,\n\n }],\n\n },\n\n [CoreResourceOperation.READ]: {\n variants: [\n {\n variantType: ResourceOperationVariantType.API_CALL,\n isDefault: true,\n // Both sides read the same row through the same door: a tenant admin sees elevations\n // raised against their tenant (the consent record is worthless if the consenting party\n // cannot see it), and the platform sees the ones it raised. The ORGANIZATIONS scope does\n // the tenant separation; the platform reaches it through the cross-tenant admission on\n // the verbs below.\n roles: [CORE_ORG_ROLES.ORG_ADMIN],\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 },\n ],\n },\n\n [CoreResourceOperation.COUNT]: {\n variants: [\n {\n variantType: ResourceOperationVariantType.API_CALL,\n isDefault: true,\n roles: [CORE_ORG_ROLES.ORG_ADMIN],\n riskLevel: ResourceOperationRiskLevel.LOW,\n },\n ],\n },\n\n /**\n * PURGE ONLY — there is deliberately no `API_CALL` variant, so no client can delete a grant.\n *\n * The verb exists because grants are a COMPOSITION child of ORGANIZATIONS with\n * `onParentDelete` enabled, and a cascade can only call an operation the child actually\n * declares. Without it the registry's composition-cascade-deletability guard fails — correctly:\n * the cascade would have been declared and then silently unable to run, leaving grant rows\n * behind after their tenant was purged.\n *\n * Route-less is the whole point of the shape. `INTERNAL_CALL` mirrors `organizations.delete`'s\n * own default: the tenant purge may remove these rows, and nobody else may. Erasing a consent\n * record through an API would let either party rewrite the history of an access decision, which\n * is exactly what this resource exists to make impossible.\n */\n [CoreResourceOperation.DELETE]: {\n variants: [\n {\n variantType: ResourceOperationVariantType.INTERNAL_CALL,\n isDefault: true,\n roles: [],\n riskLevel: ResourceOperationRiskLevel.CRITICAL,\n },\n ],\n },\n\n /**\n * The bootstrap verb, and the ONE operation here that must stay reachable without an existing\n * grant — otherwise the mechanism cannot start: an operator would need an elevation to request\n * an elevation. It therefore declares `admitsCrossTenantPlatformAdministration` and must be\n * explicitly exempted when the admission predicate later starts requiring a usable grant\n * (Step 4 of the plan). That exemption is load-bearing and gets its own pin.\n *\n * What keeps the exemption safe is that requesting is not accessing: this verb writes a row in\n * `PENDING_APPROVAL` (or `ACTIVE` when the tenant has not opted into approval) and touches\n * nothing else in the tenant. The blast radius of an abused request is a notification and an\n * audit row naming the operator.\n *\n * assurance-control: WILDO.ACCESS.CROSS_TENANT_ADMINISTRATION — elevation is requested, never assumed.\n * assurance-control: WILDO.ACCESS.PRIVILEGE_EVIDENCE\n */\n [PlatformAccessGrants_Operations.REQUEST_ACCESS]: {\n variants: [\n {\n variantType: ResourceOperationVariantType.API_CALL,\n isDefault: true,\n roles: [CORE_APP_ROLES.APP_ADMIN_SUPER_ADMIN],\n riskLevel: ResourceOperationRiskLevel.CRITICAL,\n resourceOperationLike: CoreResourceOperation.CREATE,\n admitsCrossTenantPlatformAdministration: true,\n /**\n * `organizationId` deliberately does NOT appear in this body DTO. The organization is\n * already the mandatory primary-scope path segment and the execution-context creator\n * validates that URL value before dispatch. Requiring it again in JSON made clients\n * author the same security-critical target twice and created an avoidable mismatch case.\n *\n * WHERE AN OPERATOR GETS the path id is still a deliberate product decision. There is\n * no in-product surface that lists organizations the operator does not belong to:\n * `organizations | LIST` is confined to the caller's own memberships. The id therefore\n * arrives with the customer support case, where it is also present in support URLs,\n * organization notifications and the audit trail.\n *\n * Do not widen `organizations | LIST` to make discovery convenient: a browsable\n * directory is the customer list and would restore the standing cross-tenant\n * visibility this workflow exists to avoid.\n */\n requestDto: z.object({\n justification: z.string().min(1).max(1000),\n /** Minutes. Clamped server-side to the 4h ceiling; a longer ask is not refused. */\n requestedDurationMinutes: z.number().int().positive().optional(),\n }),\n },\n ],\n userNotifications: [\n {\n // The tenant learns immediately that an operator asked for access — before it happens,\n // not after. Under the approval posture this notification IS the request; without it,\n // opting in would give a tenant a decision it never hears about.\n target: CoreUserNotificationTarget.ORGANIZATION_USERS,\n channel: CoreUserNotificationChannel.EMAIL,\n },\n ],\n },\n\n /**\n * The tenant's decision. Gated on the TENANT's own roles and deliberately NOT reachable by the\n * platform: an operator who could approve their own request would make the whole Lockbox\n * posture ceremonial. Note the absence of `admitsCrossTenantPlatformAdministration` here — that\n * absence is the control, so do not add it \"for symmetry\".\n */\n [PlatformAccessGrants_Operations.APPROVE]: {\n variants: [\n {\n variantType: ResourceOperationVariantType.API_CALL,\n isDefault: true,\n roles: [CORE_ORG_ROLES.ORG_ADMIN],\n riskLevel: ResourceOperationRiskLevel.HIGH,\n resourceOperationLike: CoreResourceOperation.UPDATE,\n requestDto: z.object({\n decisionReason: z.string().max(1000).optional(),\n }),\n // Only a request still awaiting a decision can be decided. Fails closed server-side, so a\n // replayed approval cannot revive a denied, revoked or expired grant.\n enabledCondition: ({ currentObject }) => currentObject.status === PlatformAccessGrantStatus.PENDING_APPROVAL,\n },\n ],\n },\n\n [PlatformAccessGrants_Operations.DENY]: {\n variants: [\n {\n variantType: ResourceOperationVariantType.API_CALL,\n isDefault: true,\n roles: [CORE_ORG_ROLES.ORG_ADMIN],\n riskLevel: ResourceOperationRiskLevel.MEDIUM,\n resourceOperationLike: CoreResourceOperation.UPDATE,\n requestDto: z.object({\n decisionReason: z.string().max(1000).optional(),\n }),\n enabledCondition: ({ currentObject }) => currentObject.status === PlatformAccessGrantStatus.PENDING_APPROVAL,\n },\n ],\n },\n\n /**\n * Ending an elevation early. Reachable by BOTH sides, which is why it carries the cross-tenant\n * admission while `approve`/`deny` do not: a tenant revokes access it granted, and an operator\n * closes out their own session rather than leaving a live window open until it lapses.\n *\n * Revoking is monotonic — it only ever removes authority — so admitting the platform side costs\n * nothing the reversibility test would object to.\n */\n [PlatformAccessGrants_Operations.REVOKE]: {\n variants: [\n {\n variantType: ResourceOperationVariantType.API_CALL,\n isDefault: true,\n roles: [CORE_ORG_ROLES.ORG_ADMIN],\n riskLevel: ResourceOperationRiskLevel.MEDIUM,\n resourceOperationLike: CoreResourceOperation.UPDATE,\n admitsCrossTenantPlatformAdministration: true,\n requestDto: z.object({\n decisionReason: z.string().max(1000).optional(),\n }),\n enabledCondition: ({ currentObject }) =>\n currentObject.status === PlatformAccessGrantStatus.PENDING_APPROVAL\n || currentObject.status === PlatformAccessGrantStatus.ACTIVE,\n },\n ],\n },\n },\n // NOTE: the ORGANIZATIONS primary scope is NOT declared here. It is derived from the registry\n // relationship carrying `isPrimaryScope: true` (ORGANIZATIONS → PLATFORM_ACCESS_GRANTS), which is\n // the single place scope is expressed for every resource. Declaring it twice would let the two\n // drift, and the relationship is the one the authorizer actually reads.\n });\n"]}
1
+ {"version":3,"file":"platform-access-grants.shared.resources-config.schemas.js","sourceRoot":"","sources":["../../../../src/security/authorizations/platform-access-grants.shared.resources-config.schemas.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,yBAAyB,EAAE,yBAAyB,EAAE,+BAA+B,EAAE,MAAM,yCAAyC,CAAC;AAChJ,OAAO,EAAE,qBAAqB,EAAE,gBAAgB,EAAE,kCAAkC,EAAE,MAAM,mDAAmD,CAAC;AAChJ,OAAO,EACL,0BAA0B,EAC1B,4BAA4B,GAE7B,MAAM,0CAA0C,CAAC;AAClD,OAAO,EAAE,0CAA0C,EAAE,MAAM,iDAAiD,CAAC;AAC7G,OAAO,EAAE,wBAAwB,EAAE,MAAM,iDAAiD,CAAC;AAC3F,OAAO,EAAE,0BAA0B,EAAE,2BAA2B,EAAE,MAAM,kDAAkD,CAAC;AAC3H,OAAO,EAAE,cAAc,EAAE,cAAc,EAAE,MAAM,wBA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;oBAC7C,UAAU,EAAE,CAAC,CAAC,MAAM,CAAC;wBACnB,cAAc,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC,QAAQ,EAAE;qBAChD,CAAC;oBACF,gBAAgB,EAAE,CAAC,EAAE,aAAa,EAAE,EAAE,EAAE,CACtC,aAAa,CAAC,MAAM,KAAK,yBAAyB,CAAC,gBAAgB;2BAChE,aAAa,CAAC,MAAM,KAAK,yBAAyB,CAAC,MAAM;iBAC/D;aACF;SACF;KACF;IACD,8FAA8F;IAC9F,kGAAkG;IAClG,+FAA+F;IAC/F,wEAAwE;CACzE,CAAC,CAAC","sourcesContent":["/**\n * Platform Access Grants — resource configuration.\n *\n * The operation set is unusual and the asymmetry is the point: the PLATFORM requests, the TENANT\n * decides. No verb lets one side do the other's job.\n *\n * requestAccess — platform-tier, crosses the tenant boundary\n * approve / deny — the TARGET tenant's own administrators, never platform-tier\n * revoke — either side, because either may end an elevation early\n *\n * See `platform-access-grants.shared.schemas.ts` for why the resource exists at all (rungs 4–5 of\n * the operator-access ladder in `.claude/rules/administrative-continuity-floors.md`) and\n * `.claude/plans/platform-access-grants-jit-elevation.md` for the remaining steps.\n */\n\nimport { z } from 'zod';\nimport { PlatformAccessGrantSchema, PlatformAccessGrantStatus, PlatformAccessGrants_Operations } from './platform-access-grants.shared.schemas';\nimport { CoreResourceOperation, CoreResourceType, coreResourceShared_FieldIdentifier } from '../../resources/resources.shared.core.definitions';\nimport {\n ResourceOperationRiskLevel,\n ResourceOperationVariantType,\n type ResourceRelationship,\n} from '../../resources/resources.shared.schemas';\nimport { createResourceConfiguration_Initialization } from '../../resources/resources-config.shared.factory';\nimport { ResourceSystemAccessMode } from '../../resources/resources-config.shared.schemas';\nimport { CoreUserNotificationTarget, CoreUserNotificationChannel } from '../../notifications/notifications.shared.schemas';\nimport { CORE_APP_ROLES, CORE_ORG_ROLES } from './roles.shared.schemas';\nimport { ErasureRetentionMode, ResourceDataSubjectKind } from '../../compliance/privacy/impersonalization.shared.schemas';\n\n\ntype PlatformAccessGrantsCoreOperations =\n | CoreResourceOperation.READ\n | CoreResourceOperation.LIST\n | CoreResourceOperation.COUNT\n | CoreResourceOperation.DELETE\n // Route-less; `retentionPolicy` requires READ + LIST + UPDATE_MANY.\n | CoreResourceOperation.UPDATE_MANY;\n\nexport const platformAccessGrantsResourceConfiguration_InitializationFactory = (resourcesRelationships: ResourceRelationship[]) =>\n createResourceConfiguration_Initialization<\n typeof PlatformAccessGrants_Operations,\n PlatformAccessGrantsCoreOperations,\n typeof PlatformAccessGrantSchema\n >({\n mainSchema: PlatformAccessGrantSchema,\n resourceIdentifier: CoreResourceType.PLATFORM_ACCESS_GRANTS,\n resourceFieldIdentifier: coreResourceShared_FieldIdentifier[CoreResourceType.PLATFORM_ACCESS_GRANTS],\n resourceRelationships: resourcesRelationships,\n isSystemResource: true,\n\n /**\n * `read`/`list` are ALLOWED for the trusted path because the authorization layer itself has to\n * resolve a caller's usable grant before admitting a crossing, and it does so on a system context\n * — the caller is by definition not a member of the tenant whose grants are being read.\n *\n * No trusted `create`/`update`: every transition belongs to a custom implementation that applies\n * the tenant policy and the continuity-floor measurement. A system door around those would be a\n * second way to mint an elevation, which is the one thing this resource exists to prevent.\n */\n systemAccessPolicy: {\n read: ResourceSystemAccessMode.ALLOWED,\n list: ResourceSystemAccessMode.ALLOWED,\n\n /**\n * Subject-export disclosure — FORBIDDEN, and the declaration is REQUIRED rather than optional.\n *\n * `operatorUserId` and `approvedByUserId` are foreign keys back to USERS, so\n * `classifySubjectExportDisposition` puts these rows on a user's Art. 15 graph as\n * `INCLUDED_REFERENCES_SUBJECT` — personal data CONCERNING the subject even though the subject\n * does not own it. An included resource carrying NO declaration REFUSES the entire export, so\n * omitting this would trade a frontend boot failure for a broken disclosure right.\n *\n * FORBIDDEN for the reason AUDIT_LOGS is: this is a security/operational monitoring record, and\n * handing the monitoring trail to the person it monitors is self-defeating. It is also not only\n * about them — a grant names the TENANT's approver and carries the tenant's decision reason, so\n * disclosing it to the operator would expose another data subject's decision (Art. 15(4)).\n * FORBIDDEN rows are left OUT of the bundle and RECORDED with that reason, never silently\n * dropped, so the report still answers \"why is this missing?\".\n */\n exportSubject: ResourceSystemAccessMode.FORBIDDEN,\n },\n\n /**\n * Subject erasure RETAINS this row and scrubs its free text.\n *\n * Note this is a DIFFERENT question from the `exportSubject: FORBIDDEN` above, and the two answers\n * differ deliberately. That one asks whether the monitored operator may READ the monitoring trail —\n * no. This one asks what erasure DOES to the row, and nothing here says erasure must not reach it.\n *\n * The grant survives because its security value is WHO reached WHICH tenant, WHEN, and under whose\n * approval — none of which is scrubbed. What does not survive is `justification` and `decisionReason`:\n * operator- and approver-written prose, and the surface most likely to name a third party in passing.\n * That makes the erasure narrow rather than destructive of the record.\n *\n * Contrast `auditLogs`, which is exempt outright: it is the immutable ledger of what happened,\n * including this erasure, so scrubbing it would destroy the evidence the erasure was performed.\n */\n retentionPolicy: {\n mode: ErasureRetentionMode.RETAIN_AND_IMPERSONALIZE,\n },\n\n /**\n * Erasing one of these rows revokes NO session. The grant is a record ABOUT an operator's access, not\n * the operator; their session ends through the `USERS` row, which is `SELF_PRINCIPAL`.\n */\n dataSubjectPolicy: { kind: ResourceDataSubjectKind.NO_PRINCIPAL },\n\n coreOperations: [\n CoreResourceOperation.READ,\n CoreResourceOperation.LIST,\n CoreResourceOperation.COUNT,\n // Route-less; `retentionPolicy` requires READ + LIST + UPDATE_MANY.\n CoreResourceOperation.UPDATE_MANY,\n // Present for the tenant-purge cascade ONLY — see the operation's configuration below.\n CoreResourceOperation.DELETE,\n ],\n\n operationsConfiguration: {\n\n /*\n\n * Route-less retention plumbing — INTERNAL_CALL registers no route and must not be REPOSITORY_ONLY: the\n\n * retention primitives resolve through `getServiceOperationPathDefault`, which matches only\n\n * INTERNAL_CALL / API_CALL. CRITICAL — it is the verb the impersonalize writer uses to stamp markers.\n\n */\n\n [CoreResourceOperation.UPDATE_MANY]: {\n\n variants: [{\n\n variantType: ResourceOperationVariantType.INTERNAL_CALL,\n\n isDefault: true,\n\n roles: [CORE_APP_ROLES.APP_ADMIN_SUPER_ADMIN],\n\n riskLevel: ResourceOperationRiskLevel.CRITICAL,\n\n }],\n\n },\n\n [CoreResourceOperation.READ]: {\n variants: [\n {\n variantType: ResourceOperationVariantType.API_CALL,\n isDefault: true,\n // Both sides read the same row through the same door: a tenant admin sees elevations\n // raised against their tenant (the consent record is worthless if the consenting party\n // cannot see it), and the platform sees the ones it raised. The ORGANIZATIONS scope does\n // the tenant separation; the platform reaches it through the cross-tenant admission on\n // the verbs below.\n roles: [CORE_ORG_ROLES.ORG_ADMIN],\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 },\n ],\n },\n\n [CoreResourceOperation.COUNT]: {\n variants: [\n {\n variantType: ResourceOperationVariantType.API_CALL,\n isDefault: true,\n roles: [CORE_ORG_ROLES.ORG_ADMIN],\n riskLevel: ResourceOperationRiskLevel.LOW,\n },\n ],\n },\n\n /**\n * PURGE ONLY — there is deliberately no `API_CALL` variant, so no client can delete a grant.\n *\n * The verb exists because grants are a COMPOSITION child of ORGANIZATIONS with\n * `onParentDelete` enabled, and a cascade can only call an operation the child actually\n * declares. Without it the registry's composition-cascade-deletability guard fails — correctly:\n * the cascade would have been declared and then silently unable to run, leaving grant rows\n * behind after their tenant was purged.\n *\n * Route-less is the whole point of the shape. `INTERNAL_CALL` mirrors `organizations.delete`'s\n * own default: the tenant purge may remove these rows, and nobody else may. Erasing a consent\n * record through an API would let either party rewrite the history of an access decision, which\n * is exactly what this resource exists to make impossible.\n */\n [CoreResourceOperation.DELETE]: {\n variants: [\n {\n variantType: ResourceOperationVariantType.INTERNAL_CALL,\n isDefault: true,\n roles: [],\n riskLevel: ResourceOperationRiskLevel.CRITICAL,\n },\n ],\n },\n\n /**\n * The bootstrap verb, and the ONE operation here that must stay reachable without an existing\n * grant — otherwise the mechanism cannot start: an operator would need an elevation to request\n * an elevation. It therefore declares `admitsCrossTenantPlatformAdministration` and must be\n * explicitly exempted when the admission predicate later starts requiring a usable grant\n * (Step 4 of the plan). That exemption is load-bearing and gets its own pin.\n *\n * What keeps the exemption safe is that requesting is not accessing: this verb writes a row in\n * `PENDING_APPROVAL` (or `ACTIVE` when the tenant has not opted into approval) and touches\n * nothing else in the tenant. The blast radius of an abused request is a notification and an\n * audit row naming the operator.\n *\n * assurance-control: WILDO.ACCESS.CROSS_TENANT_ADMINISTRATION — elevation is requested, never assumed.\n * assurance-control: WILDO.ACCESS.PRIVILEGE_EVIDENCE\n */\n [PlatformAccessGrants_Operations.REQUEST_ACCESS]: {\n variants: [\n {\n variantType: ResourceOperationVariantType.API_CALL,\n isDefault: true,\n roles: [CORE_APP_ROLES.APP_ADMIN_SUPER_ADMIN],\n riskLevel: ResourceOperationRiskLevel.CRITICAL,\n resourceOperationLike: CoreResourceOperation.CREATE,\n admitsCrossTenantPlatformAdministration: true,\n /**\n * `organizationId` deliberately does NOT appear in this body DTO. The organization is\n * already the mandatory primary-scope path segment and the execution-context creator\n * validates that URL value before dispatch. Requiring it again in JSON made clients\n * author the same security-critical target twice and created an avoidable mismatch case.\n *\n * WHERE AN OPERATOR GETS the path id is still a deliberate product decision. There is\n * no in-product surface that lists organizations the operator does not belong to:\n * `organizations | LIST` is confined to the caller's own memberships. The id therefore\n * arrives with the customer support case, where it is also present in support URLs,\n * organization notifications and the audit trail.\n *\n * Do not widen `organizations | LIST` to make discovery convenient: a browsable\n * directory is the customer list and would restore the standing cross-tenant\n * visibility this workflow exists to avoid.\n */\n requestDto: z.object({\n justification: z.string().min(1).max(1000),\n /** Minutes. Clamped server-side to the 4h ceiling; a longer ask is not refused. */\n requestedDurationMinutes: z.number().int().positive().optional(),\n }),\n },\n ],\n userNotifications: [\n {\n // The tenant learns immediately that an operator asked for access — before it happens,\n // not after. Under the approval posture this notification IS the request; without it,\n // opting in would give a tenant a decision it never hears about.\n target: CoreUserNotificationTarget.ORGANIZATION_USERS,\n channel: CoreUserNotificationChannel.EMAIL,\n },\n ],\n },\n\n /**\n * The tenant's decision. Gated on the TENANT's own roles and deliberately NOT reachable by the\n * platform: an operator who could approve their own request would make the whole Lockbox\n * posture ceremonial. Note the absence of `admitsCrossTenantPlatformAdministration` here — that\n * absence is the control, so do not add it \"for symmetry\".\n */\n [PlatformAccessGrants_Operations.APPROVE]: {\n variants: [\n {\n variantType: ResourceOperationVariantType.API_CALL,\n isDefault: true,\n roles: [CORE_ORG_ROLES.ORG_ADMIN],\n riskLevel: ResourceOperationRiskLevel.HIGH,\n resourceOperationLike: CoreResourceOperation.UPDATE,\n requestDto: z.object({\n decisionReason: z.string().max(1000).optional(),\n }),\n // Only a request still awaiting a decision can be decided. Fails closed server-side, so a\n // replayed approval cannot revive a denied, revoked or expired grant.\n enabledCondition: ({ currentObject }) => currentObject.status === PlatformAccessGrantStatus.PENDING_APPROVAL,\n },\n ],\n },\n\n [PlatformAccessGrants_Operations.DENY]: {\n variants: [\n {\n variantType: ResourceOperationVariantType.API_CALL,\n isDefault: true,\n roles: [CORE_ORG_ROLES.ORG_ADMIN],\n riskLevel: ResourceOperationRiskLevel.MEDIUM,\n resourceOperationLike: CoreResourceOperation.UPDATE,\n requestDto: z.object({\n decisionReason: z.string().max(1000).optional(),\n }),\n enabledCondition: ({ currentObject }) => currentObject.status === PlatformAccessGrantStatus.PENDING_APPROVAL,\n },\n ],\n },\n\n /**\n * Ending an elevation early. Reachable by BOTH sides, which is why it carries the cross-tenant\n * admission while `approve`/`deny` do not: a tenant revokes access it granted, and an operator\n * closes out their own session rather than leaving a live window open until it lapses.\n *\n * Revoking is monotonic — it only ever removes authority — so admitting the platform side costs\n * nothing the reversibility test would object to.\n */\n /**\n * ACTIVE → EXPIRED once the window has elapsed, dispatched by the credential-expiry sweep and\n * by nothing else (#413). INTERNAL_CALL: no route, no frontend affordance, and therefore no\n * `admitsCrossTenantPlatformAdministration` — the tenant-boundary question does not arise for\n * an operation no request can reach.\n *\n * The transition precondition lives in the paired implementation, which permits it only from\n * ACTIVE: a grant the tenant DENIED or REVOKED must keep saying so, and relabelling a\n * terminal grant would rewrite the decision history a customer audit reads.\n */\n [PlatformAccessGrants_Operations.EXPIRE]: {\n variants: [\n {\n variantType: ResourceOperationVariantType.INTERNAL_CALL,\n isDefault: true,\n roles: [CORE_APP_ROLES.APP_ADMIN_SUPER_ADMIN],\n riskLevel: ResourceOperationRiskLevel.LOW,\n resourceOperationLike: CoreResourceOperation.UPDATE,\n // EMPTY BY CONTRACT, not by omission. The credential-expiry sweep dispatches this verb with `{}`\n // and the paired prefix implementation forces the status transition itself, so there is no field\n // a caller may supply. Declaring nothing is NOT the same as declaring this: an operation without\n // a `requestDto` inherits the resource's ENTIRE update contract, which would let an INTERNAL_CALL\n // that accepts nothing advertise every field — `status` included, the one field this verb owns.\n requestDto: z.object({}),\n },\n ],\n },\n\n [PlatformAccessGrants_Operations.REVOKE]: {\n variants: [\n {\n variantType: ResourceOperationVariantType.API_CALL,\n isDefault: true,\n roles: [CORE_ORG_ROLES.ORG_ADMIN],\n riskLevel: ResourceOperationRiskLevel.MEDIUM,\n resourceOperationLike: CoreResourceOperation.UPDATE,\n admitsCrossTenantPlatformAdministration: true,\n requestDto: z.object({\n decisionReason: z.string().max(1000).optional(),\n }),\n enabledCondition: ({ currentObject }) =>\n currentObject.status === PlatformAccessGrantStatus.PENDING_APPROVAL\n || currentObject.status === PlatformAccessGrantStatus.ACTIVE,\n },\n ],\n },\n },\n // NOTE: the ORGANIZATIONS primary scope is NOT declared here. It is derived from the registry\n // relationship carrying `isPrimaryScope: true` (ORGANIZATIONS → PLATFORM_ACCESS_GRANTS), which is\n // the single place scope is expressed for every resource. Declaring it twice would let the two\n // drift, and the relationship is the one the authorizer actually reads.\n });\n"]}