@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
@@ -45,6 +45,29 @@
45
45
  * the condition either: stranding a tenant is exactly what the floors refuse.
46
46
  */
47
47
  import { z } from 'zod';
48
+ /**
49
+ * WHAT an elevation reaches, and therefore WHO can approve it.
50
+ *
51
+ * A closed two-member vocabulary with one named runtime source, because the two members answer a
52
+ * question no boolean can carry: approval AUTHORITY follows scope. A `TENANT` grant names one
53
+ * organization and is approved by that organization (the Lockbox posture); an `APPLICATION_WIDE`
54
+ * grant names none, so there is no customer to ask and approval falls to a SECOND platform
55
+ * administrator under the two-person rule.
56
+ *
57
+ * It exists as a vocabulary rather than being inferred from which resource a row came from because
58
+ * the AUDIT TRAIL needs it: `authorizingGrantId` on a crossing names a row id, and a reviewer given
59
+ * only an id cannot tell which of the two collections to look in. Carrying the scope beside the id
60
+ * is what makes the join mechanical instead of a guess.
61
+ */
62
+ export declare enum PlatformAccessGrantScope {
63
+ /** Scoped to ONE named organization. Approved by that organization, or auto-approved per its posture. */
64
+ TENANT = "tenant",
65
+ /**
66
+ * Application-wide: an unconfined directory read or a declared cross-tenant read that names no
67
+ * single tenant. Approved by a SECOND platform administrator — never the requester.
68
+ */
69
+ APPLICATION_WIDE = "application_wide"
70
+ }
48
71
  /**
49
72
  * Lifecycle of one elevation request.
50
73
  *
@@ -59,10 +82,14 @@ export declare enum PlatformAccessGrantStatus {
59
82
  /** The tenant refused. Terminal — a new request must be raised rather than this one retried. */
60
83
  DENIED = "denied",
61
84
  /**
62
- * The window elapsed. Terminal, and reached WITHOUT a writer: the admission predicate compares
63
- * `expiresAt` against now, so an expired grant stops working whether or not any sweeper has
64
- * relabelled it. A background transition to this status is bookkeeping for humans and reporting,
65
- * never the control.
85
+ * The window elapsed. Terminal, and written by the credential-expiry sweep since 2026-09-08
86
+ * (#413) before that it was reached by NO writer at all, so an elapsed grant read as ACTIVE
87
+ * forever in the customer-facing listing of its own resource.
88
+ *
89
+ * The label is still bookkeeping for humans and reporting, NEVER the control: the admission
90
+ * predicate compares `expiresAt` against now, so an expired grant stops working whether or not
91
+ * the sweep has run. That separation is deliberate and must survive — if admission ever starts
92
+ * reading this label, a lagging sweep becomes an authorization hole rather than a stale display.
66
93
  */
67
94
  EXPIRED = "expired",
68
95
  /** Withdrawn before expiry, by the tenant or by the platform. Terminal. */
@@ -80,7 +107,18 @@ export declare enum PlatformAccessGrantLifecycleTransition {
80
107
  REQUESTED = "requested",
81
108
  APPROVED = "approved",
82
109
  DENIED = "denied",
83
- REVOKED = "revoked"
110
+ REVOKED = "revoked",
111
+ /**
112
+ * The window elapsed and the sweep relabelled the grant (#413). The ONE transition with no human
113
+ * actor — every other member records a decision somebody made, so an audit row for this one
114
+ * carries no `decidedByUserId`, and that absence is the fact rather than a gap.
115
+ *
116
+ * It is recorded even though the label is bookkeeping and never the control: a customer reading
117
+ * the history of an operator's access to their tenant should see the access END, and a grant that
118
+ * simply stops appearing as ACTIVE with no corresponding row is the version of that history that
119
+ * raises questions.
120
+ */
121
+ EXPIRED = "expired"
84
122
  }
85
123
  /** Why a grant became {@link PlatformAccessGrantStatus.ACTIVE} without a tenant administrator acting. */
86
124
  export declare enum PlatformAccessGrantAutoApprovalReason {
@@ -94,7 +132,31 @@ export declare enum PlatformAccessGrantAutoApprovalReason {
94
132
  */
95
133
  TENANT_CANNOT_APPROVE = "tenant_cannot_approve"
96
134
  }
97
- export declare const PLATFORM_ACCESS_GRANT_DEFAULT_DURATION_MINUTES = 240;
135
+ /**
136
+ * The default life of a grant whose request names no duration.
137
+ *
138
+ * ONE HOUR, and deliberately far below the ceiling. A request that states no duration is the
139
+ * unconsidered case, and the unconsidered case should get the narrowest window that still works —
140
+ * not the widest the system allows. Until 2026-09-08 this was 240, equal to the maximum, so every
141
+ * grant that did not ask was issued a four-hour elevation; that is the opposite of what a
142
+ * just-in-time mechanism is for.
143
+ *
144
+ * Sixty rather than thirty, and the reasoning is the part worth keeping: the failure mode of a
145
+ * too-short default is not a security one, it is that an operator re-requesting mid-incident learns
146
+ * to ask for the maximum every time — which would restore the old behaviour through the front door
147
+ * and make the ceiling the effective default. An hour covers an ordinary support interaction
148
+ * without teaching that habit. An operator who genuinely needs longer asks, and that ask is the
149
+ * record we want.
150
+ */
151
+ export declare const PLATFORM_ACCESS_GRANT_DEFAULT_DURATION_MINUTES = 60;
152
+ /**
153
+ * The maximum life of a grant, whatever a request asks for.
154
+ *
155
+ * Four hours is a working session, not a working week: long enough that an operator is not
156
+ * re-requesting mid-incident, short enough that a forgotten grant is not a standing privilege by
157
+ * another name. Callers may request LESS; the ceiling is enforced server-side so a client cannot
158
+ * mint a long-lived elevation by asking for one.
159
+ */
98
160
  export declare const PLATFORM_ACCESS_GRANT_MAXIMUM_DURATION_MINUTES = 240;
99
161
  /** Statuses from which a grant can still be withdrawn. */
100
162
  export declare const PLATFORM_ACCESS_GRANT_REVOCABLE_STATUSES: readonly PlatformAccessGrantStatus[];
@@ -158,6 +220,12 @@ export declare enum PlatformAccessGrants_Operations {
158
220
  REQUEST_ACCESS = "requestAccess",
159
221
  APPROVE = "approve",
160
222
  DENY = "deny",
161
- REVOKE = "revoke"
223
+ REVOKE = "revoke",
224
+ /**
225
+ * ACTIVE → EXPIRED once the window has elapsed, dispatched by the credential-expiry sweep and by
226
+ * nothing else (#413). Not an operator verb: an operator who wants access to end early uses
227
+ * REVOKE, and nobody needs a button that declares a date has passed.
228
+ */
229
+ EXPIRE = "expire"
162
230
  }
163
231
  //# sourceMappingURL=platform-access-grants.shared.schemas.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"platform-access-grants.shared.schemas.d.ts","sourceRoot":"","sources":["../../../../../src/security/authorizations/platform-access-grants.shared.schemas.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6CG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAKxB;;;;;GAKG;AACH,oBAAY,yBAAyB;IACnC,wFAAwF;IACxF,gBAAgB,qBAAqB;IACrC,yFAAyF;IACzF,MAAM,WAAW;IACjB,gGAAgG;IAChG,MAAM,WAAW;IACjB;;;;;OAKG;IACH,OAAO,YAAY;IACnB,2EAA2E;IAC3E,OAAO,YAAY;CACpB;AAED;;;;;;;GAOG;AACH,oBAAY,sCAAsC;IAChD,SAAS,cAAc;IACvB,QAAQ,aAAa;IACrB,MAAM,WAAW;IACjB,OAAO,YAAY;CACpB;AAED,yGAAyG;AACzG,oBAAY,qCAAqC;IAC/C,kGAAkG;IAClG,4BAA4B,iCAAiC;IAC7D;;;;;OAKG;IACH,qBAAqB,0BAA0B;CAChD;AAaD,eAAO,MAAM,8CAA8C,MAAM,CAAC;AAClE,eAAO,MAAM,8CAA8C,MAAM,CAAC;AAElE,0DAA0D;AAC1D,eAAO,MAAM,wCAAwC,EAAE,SAAS,yBAAyB,EAGxF,CAAC;AAEF,eAAO,MAAM,yBAAyB;;;;;;;;;;;;;iBAiFpC,CAAC;AAEH,MAAM,MAAM,mBAAmB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,yBAAyB,CAAC,CAAC;AAE5E;;;;;;;;;;;GAWG;AACH,wBAAgB,2BAA2B,CACzC,KAAK,EAAE,IAAI,CAAC,mBAAmB,EAAE,QAAQ,GAAG,WAAW,CAAC,GAAG,SAAS,EACpE,GAAG,EAAE,IAAI,GACR,OAAO,CAMT;AAED;;;;;;GAMG;AACH,wBAAgB,gCAAgC,CAAC,wBAAwB,EAAE,MAAM,GAAG,SAAS,EAAE,GAAG,EAAE,IAAI,GAAG,IAAI,CAM9G;AAED;;;;;;;;;;GAUG;AACH;;;;;;;;GAQG;AACH,oBAAY,+BAA+B;IACzC,cAAc,kBAAkB;IAChC,OAAO,YAAY;IACnB,IAAI,SAAS;IACb,MAAM,WAAW;CAClB"}
1
+ {"version":3,"file":"platform-access-grants.shared.schemas.d.ts","sourceRoot":"","sources":["../../../../src/security/authorizations/platform-access-grants.shared.schemas.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6CG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAKxB;;;;;;;;;;;;;GAaG;AACH,oBAAY,wBAAwB;IAClC,yGAAyG;IACzG,MAAM,WAAW;IACjB;;;OAGG;IACH,gBAAgB,qBAAqB;CACtC;AAED;;;;;GAKG;AACH,oBAAY,yBAAyB;IACnC,wFAAw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WAAW;CAClB"}
@@ -48,6 +48,30 @@ import { z } from 'zod';
48
48
  import { PersonalDataCategory } from '../../compliance/privacy/personal-data-category.shared.schemas.js';
49
49
  import { RedactionType } from '../../compliance/privacy/redaction.shared.schemas.js';
50
50
  import { addImpersonalizeWith } from '@wildo-ai/zod-decorators';
51
+ /**
52
+ * WHAT an elevation reaches, and therefore WHO can approve it.
53
+ *
54
+ * A closed two-member vocabulary with one named runtime source, because the two members answer a
55
+ * question no boolean can carry: approval AUTHORITY follows scope. A `TENANT` grant names one
56
+ * organization and is approved by that organization (the Lockbox posture); an `APPLICATION_WIDE`
57
+ * grant names none, so there is no customer to ask and approval falls to a SECOND platform
58
+ * administrator under the two-person rule.
59
+ *
60
+ * It exists as a vocabulary rather than being inferred from which resource a row came from because
61
+ * the AUDIT TRAIL needs it: `authorizingGrantId` on a crossing names a row id, and a reviewer given
62
+ * only an id cannot tell which of the two collections to look in. Carrying the scope beside the id
63
+ * is what makes the join mechanical instead of a guess.
64
+ */
65
+ export var PlatformAccessGrantScope;
66
+ (function (PlatformAccessGrantScope) {
67
+ /** Scoped to ONE named organization. Approved by that organization, or auto-approved per its posture. */
68
+ PlatformAccessGrantScope["TENANT"] = "tenant";
69
+ /**
70
+ * Application-wide: an unconfined directory read or a declared cross-tenant read that names no
71
+ * single tenant. Approved by a SECOND platform administrator — never the requester.
72
+ */
73
+ PlatformAccessGrantScope["APPLICATION_WIDE"] = "application_wide";
74
+ })(PlatformAccessGrantScope || (PlatformAccessGrantScope = {}));
51
75
  /**
52
76
  * Lifecycle of one elevation request.
53
77
  *
@@ -63,10 +87,14 @@ export var PlatformAccessGrantStatus;
63
87
  /** The tenant refused. Terminal — a new request must be raised rather than this one retried. */
64
88
  PlatformAccessGrantStatus["DENIED"] = "denied";
65
89
  /**
66
- * The window elapsed. Terminal, and reached WITHOUT a writer: the admission predicate compares
67
- * `expiresAt` against now, so an expired grant stops working whether or not any sweeper has
68
- * relabelled it. A background transition to this status is bookkeeping for humans and reporting,
69
- * never the control.
90
+ * The window elapsed. Terminal, and written by the credential-expiry sweep since 2026-09-08
91
+ * (#413) before that it was reached by NO writer at all, so an elapsed grant read as ACTIVE
92
+ * forever in the customer-facing listing of its own resource.
93
+ *
94
+ * The label is still bookkeeping for humans and reporting, NEVER the control: the admission
95
+ * predicate compares `expiresAt` against now, so an expired grant stops working whether or not
96
+ * the sweep has run. That separation is deliberate and must survive — if admission ever starts
97
+ * reading this label, a lagging sweep becomes an authorization hole rather than a stale display.
70
98
  */
71
99
  PlatformAccessGrantStatus["EXPIRED"] = "expired";
72
100
  /** Withdrawn before expiry, by the tenant or by the platform. Terminal. */
@@ -86,6 +114,17 @@ export var PlatformAccessGrantLifecycleTransition;
86
114
  PlatformAccessGrantLifecycleTransition["APPROVED"] = "approved";
87
115
  PlatformAccessGrantLifecycleTransition["DENIED"] = "denied";
88
116
  PlatformAccessGrantLifecycleTransition["REVOKED"] = "revoked";
117
+ /**
118
+ * The window elapsed and the sweep relabelled the grant (#413). The ONE transition with no human
119
+ * actor — every other member records a decision somebody made, so an audit row for this one
120
+ * carries no `decidedByUserId`, and that absence is the fact rather than a gap.
121
+ *
122
+ * It is recorded even though the label is bookkeeping and never the control: a customer reading
123
+ * the history of an operator's access to their tenant should see the access END, and a grant that
124
+ * simply stops appearing as ACTIVE with no corresponding row is the version of that history that
125
+ * raises questions.
126
+ */
127
+ PlatformAccessGrantLifecycleTransition["EXPIRED"] = "expired";
89
128
  })(PlatformAccessGrantLifecycleTransition || (PlatformAccessGrantLifecycleTransition = {}));
90
129
  /** Why a grant became {@link PlatformAccessGrantStatus.ACTIVE} without a tenant administrator acting. */
91
130
  export var PlatformAccessGrantAutoApprovalReason;
@@ -100,17 +139,33 @@ export var PlatformAccessGrantAutoApprovalReason;
100
139
  */
101
140
  PlatformAccessGrantAutoApprovalReason["TENANT_CANNOT_APPROVE"] = "tenant_cannot_approve";
102
141
  })(PlatformAccessGrantAutoApprovalReason || (PlatformAccessGrantAutoApprovalReason = {}));
142
+ /** Fixed replacement for grant free-text that cannot be cleared (a `.min(1)` field). */
143
+ const ERASED_GRANT_TEXT = '[erased]';
144
+ /**
145
+ * The default life of a grant whose request names no duration.
146
+ *
147
+ * ONE HOUR, and deliberately far below the ceiling. A request that states no duration is the
148
+ * unconsidered case, and the unconsidered case should get the narrowest window that still works —
149
+ * not the widest the system allows. Until 2026-09-08 this was 240, equal to the maximum, so every
150
+ * grant that did not ask was issued a four-hour elevation; that is the opposite of what a
151
+ * just-in-time mechanism is for.
152
+ *
153
+ * Sixty rather than thirty, and the reasoning is the part worth keeping: the failure mode of a
154
+ * too-short default is not a security one, it is that an operator re-requesting mid-incident learns
155
+ * to ask for the maximum every time — which would restore the old behaviour through the front door
156
+ * and make the ceiling the effective default. An hour covers an ordinary support interaction
157
+ * without teaching that habit. An operator who genuinely needs longer asks, and that ask is the
158
+ * record we want.
159
+ */
160
+ export const PLATFORM_ACCESS_GRANT_DEFAULT_DURATION_MINUTES = 60;
103
161
  /**
104
- * The maximum life of a grant, and the default when a request names none.
162
+ * The maximum life of a grant, whatever a request asks for.
105
163
  *
106
164
  * Four hours is a working session, not a working week: long enough that an operator is not
107
165
  * re-requesting mid-incident, short enough that a forgotten grant is not a standing privilege by
108
166
  * another name. Callers may request LESS; the ceiling is enforced server-side so a client cannot
109
167
  * mint a long-lived elevation by asking for one.
110
168
  */
111
- /** Fixed replacement for grant free-text that cannot be cleared (a `.min(1)` field). */
112
- const ERASED_GRANT_TEXT = '[erased]';
113
- export const PLATFORM_ACCESS_GRANT_DEFAULT_DURATION_MINUTES = 240;
114
169
  export const PLATFORM_ACCESS_GRANT_MAXIMUM_DURATION_MINUTES = 240;
115
170
  /** Statuses from which a grant can still be withdrawn. */
116
171
  export const PLATFORM_ACCESS_GRANT_REVOCABLE_STATUSES = [
@@ -244,5 +299,11 @@ export var PlatformAccessGrants_Operations;
244
299
  PlatformAccessGrants_Operations["APPROVE"] = "approve";
245
300
  PlatformAccessGrants_Operations["DENY"] = "deny";
246
301
  PlatformAccessGrants_Operations["REVOKE"] = "revoke";
302
+ /**
303
+ * ACTIVE → EXPIRED once the window has elapsed, dispatched by the credential-expiry sweep and by
304
+ * nothing else (#413). Not an operator verb: an operator who wants access to end early uses
305
+ * REVOKE, and nobody needs a button that declares a date has passed.
306
+ */
307
+ PlatformAccessGrants_Operations["EXPIRE"] = "expire";
247
308
  })(PlatformAccessGrants_Operations || (PlatformAccessGrants_Operations = {}));
248
309
  //# sourceMappingURL=platform-access-grants.shared.schemas.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"platform-access-grants.shared.schemas.js","sourceRoot":"","sources":["../../../../../src/security/authorizations/platform-access-grants.shared.schemas.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6CG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,oBAAoB,EAAE,MAAM,gEAAgE,CAAC;AACtG,OAAO,EAAE,aAAa,EAAE,MAAM,mDAAmD,CAAC;AAClF,OAAO,EAAE,oBAAoB,EAAE,MAAM,0BAA0B,CAAC;AAEhE;;;;;GAKG;AACH,MAAM,CAAN,IAAY,yBAgBX;AAhBD,WAAY,yBAAyB;IACnC,wFAAwF;IACxF,kEAAqC,CAAA;IACrC,yFAAyF;IACzF,8CAAiB,CAAA;IACjB,gGAAgG;IAChG,8CAAiB,CAAA;IACjB;;;;;OAKG;IACH,gDAAmB,CAAA;IACnB,2EAA2E;IAC3E,gDAAmB,CAAA;AACrB,CAAC,EAhBW,yBAAyB,KAAzB,yBAAyB,QAgBpC;AAED;;;;;;;GAOG;AACH,MAAM,CAAN,IAAY,sCAKX;AALD,WAAY,sCAAsC;IAChD,iEAAuB,CAAA;IACvB,+DAAqB,CAAA;IACrB,2DAAiB,CAAA;IACjB,6DAAmB,CAAA;AACrB,CAAC,EALW,sCAAsC,KAAtC,sCAAsC,QAKjD;AAED,yGAAyG;AACzG,MAA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**\n * Platform Access Grants — time-bound, justified, optionally tenant-approved elevation that lets a\n * platform operator cross the tenant boundary.\n *\n * ## Where this sits\n *\n * Wildo's answer to \"may a platform super-administrator administer any tenant?\" is YES, as at most\n * B2B platforms. The question this resource answers is the narrower one that follows: *on what\n * terms?* The progression, recorded in `.claude/rules/administrative-continuity-floors.md`:\n *\n * ambient+unaudited → ambient+audited → declared, deny-by-default → **JIT/time-bound (here)**\n * → customer-approved (here, when the tenant opts in)\n *\n * Declaring a crossing per operation variant (`admitsCrossTenantPlatformAdministration`) removed\n * AMBIENT authority: a crossing must now be asked for in code, reviewed, and specified. It did not\n * remove STANDING authority — every platform administrator still held every declared crossing,\n * permanently, over every tenant. That is the shape zero-standing-privilege programmes exist to\n * eliminate, and what NIST SP 800-53 AC-2 / AC-6(1) mean by least privilege: privileged access is\n * requested, scoped, time-boxed, and expires on its own.\n *\n * A grant is therefore required IN ADDITION to the variant's declaration. The declaration says\n * \"this verb MAY cross\"; the grant says \"this operator MAY cross into THIS tenant, until THIS time,\n * for THIS reason\". Neither is sufficient alone.\n *\n * ## The tenant-approval half (Lockbox)\n *\n * Microsoft Customer Lockbox and Google Access Approval let the CUSTOMER approve provider access\n * before it happens. Wildo models that as {@link PlatformAccessGrantStatus.PENDING_APPROVAL}, gated\n * per tenant so it is an opt-in posture rather than a deployment-wide one — the same shape those\n * products ship, and for the same reason: a tenant that has not staffed an approver must not be\n * unable to receive support.\n *\n * ## ⚠️ The interaction that is easy to get wrong\n *\n * Tenant approval and the administrative-continuity floors are in direct tension. Approval requires\n * an administrator; the floors exist precisely because a tenant can end up WITHOUT one. Requiring a\n * stranded tenant to approve its own repair is circular — the tenant cannot approve, so the repair\n * cannot happen, so the tenant stays stranded.\n *\n * This is resolved by measurement, not by exception: when the target tenant has no administratively\n * usable owner, the grant is auto-approved with\n * {@link PlatformAccessGrantAutoApprovalReason.TENANT_CANNOT_APPROVE} and recorded loudly. The\n * condition is evaluated with the SAME predicate the owner floor uses to refuse writes, so the two\n * can never disagree about whether a tenant can administer itself. An operator cannot manufacture\n * the condition either: stranding a tenant is exactly what the floors refuse.\n */\n\nimport { z } from 'zod';\nimport { PersonalDataCategory } from '../../compliance/privacy/personal-data-category.shared.schemas';\nimport { RedactionType } from '../../compliance/privacy/redaction.shared.schemas';\nimport { addImpersonalizeWith } from '@wildo-ai/zod-decorators';\n\n/**\n * Lifecycle of one elevation request.\n *\n * A closed vocabulary with one named runtime source: schemas, guards, fixtures and comparisons all\n * derive from this enum rather than repeating literals.\n */\nexport enum PlatformAccessGrantStatus {\n /** Awaiting a decision from an administrator of the TARGET tenant (Lockbox posture). */\n PENDING_APPROVAL = 'pending_approval',\n /** Usable now. The admission predicate accepts this status, and only while unexpired. */\n ACTIVE = 'active',\n /** The tenant refused. Terminal — a new request must be raised rather than this one retried. */\n DENIED = 'denied',\n /**\n * The window elapsed. Terminal, and reached WITHOUT a writer: the admission predicate compares\n * `expiresAt` against now, so an expired grant stops working whether or not any sweeper has\n * relabelled it. A background transition to this status is bookkeeping for humans and reporting,\n * never the control.\n */\n EXPIRED = 'expired',\n /** Withdrawn before expiry, by the tenant or by the platform. Terminal. */\n REVOKED = 'revoked',\n}\n\n/**\n * Which step of a grant's life an audit row records.\n *\n * Distinct from {@link PlatformAccessGrantStatus}: a status is where the grant IS, a transition is\n * what just happened to it. They differ where it matters — an auto-approved grant lands in `ACTIVE`\n * through `REQUESTED`, never through `APPROVED`, and collapsing the two would erase exactly the\n * distinction a customer audit asks about.\n */\nexport enum PlatformAccessGrantLifecycleTransition {\n REQUESTED = 'requested',\n APPROVED = 'approved',\n DENIED = 'denied',\n REVOKED = 'revoked',\n}\n\n/** Why a grant became {@link PlatformAccessGrantStatus.ACTIVE} without a tenant administrator acting. */\nexport enum PlatformAccessGrantAutoApprovalReason {\n /** The tenant has not opted into approval. The default posture, matching Lockbox being opt-in. */\n TENANT_APPROVAL_NOT_REQUIRED = 'tenant_approval_not_required',\n /**\n * The tenant has NO administratively usable owner, so no principal exists who could approve.\n * Evaluated with the owner floor's own predicate — see this file's header for why the alternative\n * (refusing) is circular. Recorded at high severity: this is the one path where operator access\n * proceeds against a tenant that never consented and never could.\n */\n TENANT_CANNOT_APPROVE = 'tenant_cannot_approve',\n}\n\n/**\n * The maximum life of a grant, and the default when a request names none.\n *\n * Four hours is a working session, not a working week: long enough that an operator is not\n * re-requesting mid-incident, short enough that a forgotten grant is not a standing privilege by\n * another name. Callers may request LESS; the ceiling is enforced server-side so a client cannot\n * mint a long-lived elevation by asking for one.\n */\n/** Fixed replacement for grant free-text that cannot be cleared (a `.min(1)` field). */\nconst ERASED_GRANT_TEXT = '[erased]';\n\nexport const PLATFORM_ACCESS_GRANT_DEFAULT_DURATION_MINUTES = 240;\nexport const PLATFORM_ACCESS_GRANT_MAXIMUM_DURATION_MINUTES = 240;\n\n/** Statuses from which a grant can still be withdrawn. */\nexport const PLATFORM_ACCESS_GRANT_REVOCABLE_STATUSES: readonly PlatformAccessGrantStatus[] = [\n PlatformAccessGrantStatus.PENDING_APPROVAL,\n PlatformAccessGrantStatus.ACTIVE,\n];\n\nexport const PlatformAccessGrantSchema = z.object({\n _id: z.string().min(1).isPrimaryKey().isSummaryField(),\n\n /**\n * The TARGET tenant — the one being reached into, never the operator's own.\n *\n * This is the scope anchor: the grant is an organization-scoped row so the tenant can see, approve\n * and revoke elevations raised against it. A grant the tenant cannot see would defeat the point of\n * modelling consent at all.\n */\n organizationId: z.string().min(1).isDBIndexed().isForeignKey().isSummaryField().excludeFromUpdate().isAuditEvidence(),\n\n /** The operator who requested the elevation. Server-authored from the session, never client-supplied. */\n operatorUserId: z.string().min(1).isDBIndexed().isForeignKey().isSummaryField().excludeFromCreate().excludeFromUpdate().isAuditEvidence(),\n\n /**\n * Why the operator needs access. REQUIRED, and deliberately not optional anywhere in the flow.\n *\n * An elevation record without a reason answers \"who and when\" but not \"why\", which is the only\n * question a reviewer or a customer actually asks. `AC-2(7)` wants privileged assignment monitored;\n * an unexplained monitored assignment is a log line, not a control.\n */\n // USER_CONTENT — free prose an OPERATOR typed, about why they need to reach a customer tenant.\n // The data subject here is the operator, not the tenant's users; a notice covering staff must\n // enumerate it, and it is exactly the free-text surface that can name a third party in passing.\n // MASK on erasure, not REMOVE: `.min(1)` makes this non-clearable, so a null would be rejected by the\n // strict update-DTO parse the impersonalize writer runs. A fixed non-empty string is accepted.\n // It must be scrubbed at all because it is free text an operator wrote about why they needed\n // access — exactly the surface that names a third party in passing.\n justification: addImpersonalizeWith(\n z.string().min(1).max(1000).isSummaryField()\n .dataCategories(PersonalDataCategory.USER_CONTENT),\n RedactionType.MASK,\n { maskValue: ERASED_GRANT_TEXT },\n ),\n\n status: z.enum(PlatformAccessGrantStatus)\n .systemEnum('PlatformAccessGrantStatus')\n .default(PlatformAccessGrantStatus.PENDING_APPROVAL)\n .isDBIndexed()\n .isSummaryField()\n .excludeFromCreate()\n .excludeFromUpdate()\n .isAuditEvidence(),\n\n /**\n * When the elevation stops working.\n *\n * Server-authored from the requested duration, clamped to\n * {@link PLATFORM_ACCESS_GRANT_MAXIMUM_DURATION_MINUTES}. The admission predicate reads THIS field\n * rather than trusting `status`, so expiry needs no sweeper to take effect.\n */\n expiresAt: z.date().isDBIndexed().isSummaryField().excludeFromCreate().excludeFromUpdate().isAuditEvidence(),\n\n /** Set when a tenant administrator approved. Absent on an auto-approved grant — see {@link autoApprovalReason}. */\n approvedByUserId: z.string().min(1).optional().isForeignKey().excludeFromCreate().excludeFromUpdate().isAuditEvidence(),\n approvedAt: z.date().optional().excludeFromCreate().excludeFromUpdate(),\n\n /**\n * Present exactly when the grant became ACTIVE with no tenant administrator acting.\n *\n * Its absence on an ACTIVE grant is therefore meaningful: a human in the tenant approved it. That\n * distinction is what a customer audit needs and what a single `approved: true` boolean would erase.\n */\n autoApprovalReason: z.enum(PlatformAccessGrantAutoApprovalReason)\n .systemEnum('PlatformAccessGrantAutoApprovalReason')\n .optional()\n .excludeFromCreate()\n .excludeFromUpdate()\n .isAuditEvidence(),\n\n /** The tenant's reason for refusing, or the revoker's reason for withdrawing. */\n // REMOVE — free text again, and clearable (`.optional()`).\n decisionReason: addImpersonalizeWith(\n z.string().max(1000).optional().excludeFromCreate().excludeFromUpdate()\n .dataCategories(PersonalDataCategory.USER_CONTENT),\n RedactionType.REMOVE,\n ),\n\n createdAt: z.date().optional(),\n updatedAt: z.date().optional(),\n});\n\nexport type PlatformAccessGrant = z.infer<typeof PlatformAccessGrantSchema>;\n\n/**\n * Is this grant usable RIGHT NOW?\n *\n * The single predicate every consumer must use — the admission check, the tenant's UI, and any\n * report. Two independent conditions, and the expiry half is why this is a function rather than a\n * status comparison: a grant whose window elapsed is unusable the moment it elapses, with no writer\n * involved. Reading `status === ACTIVE` alone would honour a stale row for as long as no sweeper had\n * run, turning a time-bound elevation back into a standing one.\n *\n * `now` is injected so callers can evaluate a grant at a decision time they already fixed, and so\n * this stays testable without clock control.\n */\nexport function isPlatformAccessGrantUsable(\n grant: Pick<PlatformAccessGrant, 'status' | 'expiresAt'> | undefined,\n now: Date,\n): boolean {\n if (!grant) return false;\n if (grant.status !== PlatformAccessGrantStatus.ACTIVE) return false;\n return grant.expiresAt instanceof Date\n ? grant.expiresAt.getTime() > now.getTime()\n : new Date(grant.expiresAt).getTime() > now.getTime();\n}\n\n/**\n * Clamp a requested duration to the server-side ceiling.\n *\n * Applied to every request path, including trusted ones. A caller asking for a longer window is not\n * refused — being told \"no, ask again with a smaller number\" during an incident is friction with no\n * security benefit, since the ceiling is what actually binds. They simply get the ceiling.\n */\nexport function resolvePlatformAccessGrantExpiry(requestedDurationMinutes: number | undefined, now: Date): Date {\n const requested = requestedDurationMinutes && requestedDurationMinutes > 0\n ? requestedDurationMinutes\n : PLATFORM_ACCESS_GRANT_DEFAULT_DURATION_MINUTES;\n const minutes = Math.min(requested, PLATFORM_ACCESS_GRANT_MAXIMUM_DURATION_MINUTES);\n return new Date(now.getTime() + minutes * 60_000);\n}\n\n/**\n * NOTE ON PLACEMENT — this enum lives with the VOCABULARY, not with the resource configuration,\n * and moving it back would reintroduce a real defect.\n *\n * The authorization layer needs `REQUEST_ACCESS` by name (it is the bootstrap verb, exempt from the\n * grant requirement it bootstraps). Importing that value from the resources-config module dragged\n * resource-configuration evaluation into the authorizer's module graph, and schema construction that\n * runs before the Zod decorators are initialised loses decorator metadata — which surfaced, far from\n * here, as the ephemeral-disclosure catalogue losing an operation-level declaration. A vocabulary has\n * no such side effects.\n */\n/**\n * Custom verbs. Ordinary CREATE/UPDATE/DELETE are deliberately NOT exposed:\n *\n * - CREATE would let a caller author `status`, `expiresAt` and `operatorUserId` directly, which are\n * precisely the fields whose server authorship IS the control.\n * - UPDATE would be a second, ungated path to the status transitions `approve`/`deny`/`revoke` own.\n * - DELETE exists but has NO client door — see its configuration below. An elevation either side could\n * erase is not evidence; the terminal statuses (DENIED / EXPIRED / REVOKED) are how a grant ends.\n */\nexport enum PlatformAccessGrants_Operations {\n REQUEST_ACCESS = 'requestAccess',\n APPROVE = 'approve',\n DENY = 'deny',\n REVOKE = 'revoke',\n}\n"]}
1
+ {"version":3,"file":"platform-access-grants.shared.schemas.js","sourceRoot":"","sources":["../../../../src/security/authorizations/platform-access-grants.shared.schemas.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6CG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,oBAAoB,EAAE,MAAM,gEAAgE,CAAC;AACtG,OAAO,EAAE,aAAa,EAAE,MAAM,mDAAmD,CAAC;AAClF,OAAO,EAAE,oBAAoB,EAAE,MAAM,0BAA0B,CAAC;AAEhE;;;;;;;;;;;;;GAaG;AACH,MAAM,CAAN,IAAY,wBAQX;AARD,WAAY,wBAAwB;IAClC,yGAAyG;IACzG,6CAAiB,CAAA;IACjB;;;OAGG;IACH,iEAAqC,CAAA;AACvC,CAAC,EARW,wBAAwB,KAAxB,wBAAwB,QAQnC;AAED;;;;;GA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AACH,MAAM,UAAU,gCAAgC,CAAC,wBAA4C,EAAE,GAAS;IACtG,MAAM,SAAS,GAAG,wBAAwB,IAAI,wBAAwB,GAAG,CAAC;QACxE,CAAC,CAAC,wBAAwB;QAC1B,CAAC,CAAC,8CAA8C,CAAC;IACnD,MAAM,OAAO,GAAG,IAAI,CAAC,GAAG,CAAC,SAAS,EAAE,8CAA8C,CAAC,CAAC;IACpF,OAAO,IAAI,IAAI,CAAC,GAAG,CAAC,OAAO,EAAE,GAAG,OAAO,GAAG,MAAM,CAAC,CAAC;AACpD,CAAC;AAED;;;;;;;;;;GAUG;AACH;;;;;;;;GAQG;AACH,MAAM,CAAN,IAAY,+BAWX;AAXD,WAAY,+BAA+B;IACzC,mEAAgC,CAAA;IAChC,sDAAmB,CAAA;IACnB,gDAAa,CAAA;IACb,oDAAiB,CAAA;IACjB;;;;OAIG;IACH,oDAAiB,CAAA;AACnB,CAAC,EAXW,+BAA+B,KAA/B,+BAA+B,QAW1C","sourcesContent":["/**\n * Platform Access Grants — time-bound, justified, optionally tenant-approved elevation that lets a\n * platform operator cross the tenant boundary.\n *\n * ## Where this sits\n *\n * Wildo's answer to \"may a platform super-administrator administer any tenant?\" is YES, as at most\n * B2B platforms. The question this resource answers is the narrower one that follows: *on what\n * terms?* The progression, recorded in `.claude/rules/administrative-continuity-floors.md`:\n *\n * ambient+unaudited → ambient+audited → declared, deny-by-default → **JIT/time-bound (here)**\n * → customer-approved (here, when the tenant opts in)\n *\n * Declaring a crossing per operation variant (`admitsCrossTenantPlatformAdministration`) removed\n * AMBIENT authority: a crossing must now be asked for in code, reviewed, and specified. It did not\n * remove STANDING authority — every platform administrator still held every declared crossing,\n * permanently, over every tenant. That is the shape zero-standing-privilege programmes exist to\n * eliminate, and what NIST SP 800-53 AC-2 / AC-6(1) mean by least privilege: privileged access is\n * requested, scoped, time-boxed, and expires on its own.\n *\n * A grant is therefore required IN ADDITION to the variant's declaration. The declaration says\n * \"this verb MAY cross\"; the grant says \"this operator MAY cross into THIS tenant, until THIS time,\n * for THIS reason\". Neither is sufficient alone.\n *\n * ## The tenant-approval half (Lockbox)\n *\n * Microsoft Customer Lockbox and Google Access Approval let the CUSTOMER approve provider access\n * before it happens. Wildo models that as {@link PlatformAccessGrantStatus.PENDING_APPROVAL}, gated\n * per tenant so it is an opt-in posture rather than a deployment-wide one — the same shape those\n * products ship, and for the same reason: a tenant that has not staffed an approver must not be\n * unable to receive support.\n *\n * ## ⚠️ The interaction that is easy to get wrong\n *\n * Tenant approval and the administrative-continuity floors are in direct tension. Approval requires\n * an administrator; the floors exist precisely because a tenant can end up WITHOUT one. Requiring a\n * stranded tenant to approve its own repair is circular — the tenant cannot approve, so the repair\n * cannot happen, so the tenant stays stranded.\n *\n * This is resolved by measurement, not by exception: when the target tenant has no administratively\n * usable owner, the grant is auto-approved with\n * {@link PlatformAccessGrantAutoApprovalReason.TENANT_CANNOT_APPROVE} and recorded loudly. The\n * condition is evaluated with the SAME predicate the owner floor uses to refuse writes, so the two\n * can never disagree about whether a tenant can administer itself. An operator cannot manufacture\n * the condition either: stranding a tenant is exactly what the floors refuse.\n */\n\nimport { z } from 'zod';\nimport { PersonalDataCategory } from '../../compliance/privacy/personal-data-category.shared.schemas';\nimport { RedactionType } from '../../compliance/privacy/redaction.shared.schemas';\nimport { addImpersonalizeWith } from '@wildo-ai/zod-decorators';\n\n/**\n * WHAT an elevation reaches, and therefore WHO can approve it.\n *\n * A closed two-member vocabulary with one named runtime source, because the two members answer a\n * question no boolean can carry: approval AUTHORITY follows scope. A `TENANT` grant names one\n * organization and is approved by that organization (the Lockbox posture); an `APPLICATION_WIDE`\n * grant names none, so there is no customer to ask and approval falls to a SECOND platform\n * administrator under the two-person rule.\n *\n * It exists as a vocabulary rather than being inferred from which resource a row came from because\n * the AUDIT TRAIL needs it: `authorizingGrantId` on a crossing names a row id, and a reviewer given\n * only an id cannot tell which of the two collections to look in. Carrying the scope beside the id\n * is what makes the join mechanical instead of a guess.\n */\nexport enum PlatformAccessGrantScope {\n /** Scoped to ONE named organization. Approved by that organization, or auto-approved per its posture. */\n TENANT = 'tenant',\n /**\n * Application-wide: an unconfined directory read or a declared cross-tenant read that names no\n * single tenant. Approved by a SECOND platform administrator — never the requester.\n */\n APPLICATION_WIDE = 'application_wide',\n}\n\n/**\n * Lifecycle of one elevation request.\n *\n * A closed vocabulary with one named runtime source: schemas, guards, fixtures and comparisons all\n * derive from this enum rather than repeating literals.\n */\nexport enum PlatformAccessGrantStatus {\n /** Awaiting a decision from an administrator of the TARGET tenant (Lockbox posture). */\n PENDING_APPROVAL = 'pending_approval',\n /** Usable now. The admission predicate accepts this status, and only while unexpired. */\n ACTIVE = 'active',\n /** The tenant refused. Terminal — a new request must be raised rather than this one retried. */\n DENIED = 'denied',\n /**\n * The window elapsed. Terminal, and written by the credential-expiry sweep since 2026-09-08\n * (#413) — before that it was reached by NO writer at all, so an elapsed grant read as ACTIVE\n * forever in the customer-facing listing of its own resource.\n *\n * The label is still bookkeeping for humans and reporting, NEVER the control: the admission\n * predicate compares `expiresAt` against now, so an expired grant stops working whether or not\n * the sweep has run. That separation is deliberate and must survive — if admission ever starts\n * reading this label, a lagging sweep becomes an authorization hole rather than a stale display.\n */\n EXPIRED = 'expired',\n /** Withdrawn before expiry, by the tenant or by the platform. Terminal. */\n REVOKED = 'revoked',\n}\n\n/**\n * Which step of a grant's life an audit row records.\n *\n * Distinct from {@link PlatformAccessGrantStatus}: a status is where the grant IS, a transition is\n * what just happened to it. They differ where it matters — an auto-approved grant lands in `ACTIVE`\n * through `REQUESTED`, never through `APPROVED`, and collapsing the two would erase exactly the\n * distinction a customer audit asks about.\n */\nexport enum PlatformAccessGrantLifecycleTransition {\n REQUESTED = 'requested',\n APPROVED = 'approved',\n DENIED = 'denied',\n REVOKED = 'revoked',\n /**\n * The window elapsed and the sweep relabelled the grant (#413). The ONE transition with no human\n * actor — every other member records a decision somebody made, so an audit row for this one\n * carries no `decidedByUserId`, and that absence is the fact rather than a gap.\n *\n * It is recorded even though the label is bookkeeping and never the control: a customer reading\n * the history of an operator's access to their tenant should see the access END, and a grant that\n * simply stops appearing as ACTIVE with no corresponding row is the version of that history that\n * raises questions.\n */\n EXPIRED = 'expired',\n}\n\n/** Why a grant became {@link PlatformAccessGrantStatus.ACTIVE} without a tenant administrator acting. */\nexport enum PlatformAccessGrantAutoApprovalReason {\n /** The tenant has not opted into approval. The default posture, matching Lockbox being opt-in. */\n TENANT_APPROVAL_NOT_REQUIRED = 'tenant_approval_not_required',\n /**\n * The tenant has NO administratively usable owner, so no principal exists who could approve.\n * Evaluated with the owner floor's own predicate — see this file's header for why the alternative\n * (refusing) is circular. Recorded at high severity: this is the one path where operator access\n * proceeds against a tenant that never consented and never could.\n */\n TENANT_CANNOT_APPROVE = 'tenant_cannot_approve',\n}\n\n/** Fixed replacement for grant free-text that cannot be cleared (a `.min(1)` field). */\nconst ERASED_GRANT_TEXT = '[erased]';\n\n/**\n * The default life of a grant whose request names no duration.\n *\n * ONE HOUR, and deliberately far below the ceiling. A request that states no duration is the\n * unconsidered case, and the unconsidered case should get the narrowest window that still works —\n * not the widest the system allows. Until 2026-09-08 this was 240, equal to the maximum, so every\n * grant that did not ask was issued a four-hour elevation; that is the opposite of what a\n * just-in-time mechanism is for.\n *\n * Sixty rather than thirty, and the reasoning is the part worth keeping: the failure mode of a\n * too-short default is not a security one, it is that an operator re-requesting mid-incident learns\n * to ask for the maximum every time — which would restore the old behaviour through the front door\n * and make the ceiling the effective default. An hour covers an ordinary support interaction\n * without teaching that habit. An operator who genuinely needs longer asks, and that ask is the\n * record we want.\n */\nexport const PLATFORM_ACCESS_GRANT_DEFAULT_DURATION_MINUTES = 60;\n\n/**\n * The maximum life of a grant, whatever a request asks for.\n *\n * Four hours is a working session, not a working week: long enough that an operator is not\n * re-requesting mid-incident, short enough that a forgotten grant is not a standing privilege by\n * another name. Callers may request LESS; the ceiling is enforced server-side so a client cannot\n * mint a long-lived elevation by asking for one.\n */\nexport const PLATFORM_ACCESS_GRANT_MAXIMUM_DURATION_MINUTES = 240;\n\n/** Statuses from which a grant can still be withdrawn. */\nexport const PLATFORM_ACCESS_GRANT_REVOCABLE_STATUSES: readonly PlatformAccessGrantStatus[] = [\n PlatformAccessGrantStatus.PENDING_APPROVAL,\n PlatformAccessGrantStatus.ACTIVE,\n];\n\nexport const PlatformAccessGrantSchema = z.object({\n _id: z.string().min(1).isPrimaryKey().isSummaryField(),\n\n /**\n * The TARGET tenant — the one being reached into, never the operator's own.\n *\n * This is the scope anchor: the grant is an organization-scoped row so the tenant can see, approve\n * and revoke elevations raised against it. A grant the tenant cannot see would defeat the point of\n * modelling consent at all.\n */\n organizationId: z.string().min(1).isDBIndexed().isForeignKey().isSummaryField().excludeFromUpdate().isAuditEvidence(),\n\n /** The operator who requested the elevation. Server-authored from the session, never client-supplied. */\n operatorUserId: z.string().min(1).isDBIndexed().isForeignKey().isSummaryField().excludeFromCreate().excludeFromUpdate().isAuditEvidence(),\n\n /**\n * Why the operator needs access. REQUIRED, and deliberately not optional anywhere in the flow.\n *\n * An elevation record without a reason answers \"who and when\" but not \"why\", which is the only\n * question a reviewer or a customer actually asks. `AC-2(7)` wants privileged assignment monitored;\n * an unexplained monitored assignment is a log line, not a control.\n */\n // USER_CONTENT — free prose an OPERATOR typed, about why they need to reach a customer tenant.\n // The data subject here is the operator, not the tenant's users; a notice covering staff must\n // enumerate it, and it is exactly the free-text surface that can name a third party in passing.\n // MASK on erasure, not REMOVE: `.min(1)` makes this non-clearable, so a null would be rejected by the\n // strict update-DTO parse the impersonalize writer runs. A fixed non-empty string is accepted.\n // It must be scrubbed at all because it is free text an operator wrote about why they needed\n // access — exactly the surface that names a third party in passing.\n justification: addImpersonalizeWith(\n z.string().min(1).max(1000).isSummaryField()\n .dataCategories(PersonalDataCategory.USER_CONTENT),\n RedactionType.MASK,\n { maskValue: ERASED_GRANT_TEXT },\n ),\n\n status: z.enum(PlatformAccessGrantStatus)\n .systemEnum('PlatformAccessGrantStatus')\n .default(PlatformAccessGrantStatus.PENDING_APPROVAL)\n .isDBIndexed()\n .isSummaryField()\n .excludeFromCreate()\n .excludeFromUpdate()\n .isAuditEvidence(),\n\n /**\n * When the elevation stops working.\n *\n * Server-authored from the requested duration, clamped to\n * {@link PLATFORM_ACCESS_GRANT_MAXIMUM_DURATION_MINUTES}. The admission predicate reads THIS field\n * rather than trusting `status`, so expiry needs no sweeper to take effect.\n */\n expiresAt: z.date().isDBIndexed().isSummaryField().excludeFromCreate().excludeFromUpdate().isAuditEvidence(),\n\n /** Set when a tenant administrator approved. Absent on an auto-approved grant — see {@link autoApprovalReason}. */\n approvedByUserId: z.string().min(1).optional().isForeignKey().excludeFromCreate().excludeFromUpdate().isAuditEvidence(),\n approvedAt: z.date().optional().excludeFromCreate().excludeFromUpdate(),\n\n /**\n * Present exactly when the grant became ACTIVE with no tenant administrator acting.\n *\n * Its absence on an ACTIVE grant is therefore meaningful: a human in the tenant approved it. That\n * distinction is what a customer audit needs and what a single `approved: true` boolean would erase.\n */\n autoApprovalReason: z.enum(PlatformAccessGrantAutoApprovalReason)\n .systemEnum('PlatformAccessGrantAutoApprovalReason')\n .optional()\n .excludeFromCreate()\n .excludeFromUpdate()\n .isAuditEvidence(),\n\n /** The tenant's reason for refusing, or the revoker's reason for withdrawing. */\n // REMOVE — free text again, and clearable (`.optional()`).\n decisionReason: addImpersonalizeWith(\n z.string().max(1000).optional().excludeFromCreate().excludeFromUpdate()\n .dataCategories(PersonalDataCategory.USER_CONTENT),\n RedactionType.REMOVE,\n ),\n\n createdAt: z.date().optional(),\n updatedAt: z.date().optional(),\n});\n\nexport type PlatformAccessGrant = z.infer<typeof PlatformAccessGrantSchema>;\n\n/**\n * Is this grant usable RIGHT NOW?\n *\n * The single predicate every consumer must use — the admission check, the tenant's UI, and any\n * report. Two independent conditions, and the expiry half is why this is a function rather than a\n * status comparison: a grant whose window elapsed is unusable the moment it elapses, with no writer\n * involved. Reading `status === ACTIVE` alone would honour a stale row for as long as no sweeper had\n * run, turning a time-bound elevation back into a standing one.\n *\n * `now` is injected so callers can evaluate a grant at a decision time they already fixed, and so\n * this stays testable without clock control.\n */\nexport function isPlatformAccessGrantUsable(\n grant: Pick<PlatformAccessGrant, 'status' | 'expiresAt'> | undefined,\n now: Date,\n): boolean {\n if (!grant) return false;\n if (grant.status !== PlatformAccessGrantStatus.ACTIVE) return false;\n return grant.expiresAt instanceof Date\n ? grant.expiresAt.getTime() > now.getTime()\n : new Date(grant.expiresAt).getTime() > now.getTime();\n}\n\n/**\n * Clamp a requested duration to the server-side ceiling.\n *\n * Applied to every request path, including trusted ones. A caller asking for a longer window is not\n * refused — being told \"no, ask again with a smaller number\" during an incident is friction with no\n * security benefit, since the ceiling is what actually binds. They simply get the ceiling.\n */\nexport function resolvePlatformAccessGrantExpiry(requestedDurationMinutes: number | undefined, now: Date): Date {\n const requested = requestedDurationMinutes && requestedDurationMinutes > 0\n ? requestedDurationMinutes\n : PLATFORM_ACCESS_GRANT_DEFAULT_DURATION_MINUTES;\n const minutes = Math.min(requested, PLATFORM_ACCESS_GRANT_MAXIMUM_DURATION_MINUTES);\n return new Date(now.getTime() + minutes * 60_000);\n}\n\n/**\n * NOTE ON PLACEMENT — this enum lives with the VOCABULARY, not with the resource configuration,\n * and moving it back would reintroduce a real defect.\n *\n * The authorization layer needs `REQUEST_ACCESS` by name (it is the bootstrap verb, exempt from the\n * grant requirement it bootstraps). Importing that value from the resources-config module dragged\n * resource-configuration evaluation into the authorizer's module graph, and schema construction that\n * runs before the Zod decorators are initialised loses decorator metadata — which surfaced, far from\n * here, as the ephemeral-disclosure catalogue losing an operation-level declaration. A vocabulary has\n * no such side effects.\n */\n/**\n * Custom verbs. Ordinary CREATE/UPDATE/DELETE are deliberately NOT exposed:\n *\n * - CREATE would let a caller author `status`, `expiresAt` and `operatorUserId` directly, which are\n * precisely the fields whose server authorship IS the control.\n * - UPDATE would be a second, ungated path to the status transitions `approve`/`deny`/`revoke` own.\n * - DELETE exists but has NO client door — see its configuration below. An elevation either side could\n * erase is not evidence; the terminal statuses (DENIED / EXPIRED / REVOKED) are how a grant ends.\n */\nexport enum PlatformAccessGrants_Operations {\n REQUEST_ACCESS = 'requestAccess',\n APPROVE = 'approve',\n DENY = 'deny',\n REVOKE = 'revoke',\n /**\n * ACTIVE → EXPIRED once the window has elapsed, dispatched by the credential-expiry sweep and by\n * nothing else (#413). Not an operator verb: an operator who wants access to end early uses\n * REVOKE, and nobody needs a button that declares a date has passed.\n */\n EXPIRE = 'expire',\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"roles.shared.defaults.d.ts","sourceRoot":"","sources":["../../../../../src/security/authorizations/roles.shared.defaults.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAGH,OAAO,EAAkC,kBAAkB,EAAE,MAAM,wBAAwB,CAAC;AAE5F,eAAO,MAAM,8BAA8B,EAAE,kBAwC5C,CAAC;AAEF,eAAO,MAAM,0BAA0B,EAAE,kBA8BxC,CAAC"}
1
+ {"version":3,"file":"roles.shared.defaults.d.ts","sourceRoot":"","sources":["../../../../src/security/authorizations/roles.shared.defaults.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAGH,OAAO,EAAkC,kBAAkB,EAAE,MAAM,wBAAwB,CAAC;AAE5F,eAAO,MAAM,8BAA8B,EAAE,kBAwC5C,CAAC;AAEF,eAAO,MAAM,0BAA0B,EAAE,kBA8BxC,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"roles.shared.schemas.d.ts","sourceRoot":"","sources":["../../../../../src/security/authorizations/roles.shared.schemas.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,oBAAoB,EAAE,MAAM,0CAA0C,CAAC;AAEhF,oBAAY,cAAc;IACxB;;;;;;;;;;;;;;;OAeG;IACH,UAAU,eAAe;IACzB,qBAAqB,0BAA0B;IAC/C,yBAAyB,8BAA8B;IACvD,0BAA0B,+BAA+B;IACzD,gBAAgB,qBAAqB;IACrC,QAAQ,aAAa;IACrB,iGAAiG;IACjG,aAAa,kBAAkB;CAChC;AAED;;;;;;;GAOG;AACH,eAAO,MAAM,qCAAqC,EAAE,SAAS,cAAc,EAKzE,CAAC;AAEH,oBAAY,cAAc;IACxB,SAAS,cAAc;IACvB,SAAS,cAAc;IACvB,SAAS,cAAc;IACvB,WAAW,gBAAgB;IAC3B,UAAU,eAAe;CAC1B;AAGD,eAAO,MAAM,eAAe,2FAG1B,CAAC;AAEH,eAAO,MAAM,WAAW,wGAItB,CAAC;AAEH,eAAO,MAAM,cAAc,sEAGzB,CAAC;AAEH,eAAO,MAAM,cAAc,sEAGzB,CAAC;AAEH,eAAO,MAAM,oBAAoB;;;;;iBAK/B,CAAC;AAGH,MAAM,MAAM,cAAc,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,oBAAoB,CAAC,CAAC;AAElE,eAAO,MAAM,wBAAwB;;;;;kBAYpC,CAAC;AAEF,MAAM,MAAM,KAAK,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,WAAW,CAAC,CAAC;AAChD,MAAM,MAAM,SAAS,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,eAAe,CAAC,CAAC;AACxD,MAAM,MAAM,QAAQ,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,cAAc,CAAC,CAAC;AACtD,MAAM,MAAM,QAAQ,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,cAAc,CAAC,CAAC;AACtD,MAAM,MAAM,kBAAkB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,wBAAwB,CAAC,CAAC"}
1
+ {"version":3,"file":"roles.shared.schemas.d.ts","sourceRoot":"","sources":["../../../../src/security/authorizations/roles.shared.schemas.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,oBAAoB,EAAE,MAAM,0CAA0C,CAAC;AAEhF,oBAAY,cAAc;IACxB;;;;;;;;;;;;;;;OAeG;IACH,UAAU,eAAe;IACzB,qBAAqB,0BAA0B;IAC/C,yBAAyB,8BAA8B;IACvD,0BAA0B,+BAA+B;IACzD,gBAAgB,qBAAqB;IACrC,QAAQ,aAAa;IACrB,iGAAiG;IACjG,aAAa,kBAAkB;CAChC;AAED;;;;;;;GAOG;AACH,eAAO,MAAM,qCAAqC,EAAE,SAAS,cAAc,EAKzE,CAAC;AAEH,oBAAY,cAAc;IACxB,SAAS,cAAc;IACvB,SAAS,cAAc;IACvB,SAAS,cAAc;IACvB,WAAW,gBAAgB;IAC3B,UAAU,eAAe;CAC1B;AAGD,eAAO,MAAM,eAAe,2FAG1B,CAAC;AAEH,eAAO,MAAM,WAAW,wGAItB,CAAC;AAEH,eAAO,MAAM,cAAc,sEAGzB,CAAC;AAEH,eAAO,MAAM,cAAc,sEAGzB,CAAC;AAEH,eAAO,MAAM,oBAAoB;;;;;iBAK/B,CAAC;AAGH,MAAM,MAAM,cAAc,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,oBAAoB,CAAC,CAAC;AAElE,eAAO,MAAM,wBAAwB;;;;;kBAYpC,CAAC;AAEF,MAAM,MAAM,KAAK,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,WAAW,CAAC,CAAC;AAChD,MAAM,MAAM,SAAS,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,eAAe,CAAC,CAAC;AACxD,MAAM,MAAM,QAAQ,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,cAAc,CAAC,CAAC;AACtD,MAAM,MAAM,QAAQ,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,cAAc,CAAC,CAAC;AACtD,MAAM,MAAM,kBAAkB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,wBAAwB,CAAC,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"roles.shared.utils.d.ts","sourceRoot":"","sources":["../../../../../src/security/authorizations/roles.shared.utils.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;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;;;;;;;;GAmBG;AACH,wBAAgB,2BAA2B,CAAC,CAAC,SAAS,qBAAqB,EACzE,QAAQ,EAAE,SAAS,CAAC,EAAE,EACtB,cAAc,CAAC,EAAE,kBAAkB,EACnC,cAAc,CAAC,EAAE,kBAAkB,GAClC,CAAC,EAAE,CAQL"}
1
+ {"version":3,"file":"roles.shared.utils.d.ts","sourceRoot":"","sources":["../../../../src/security/authorizations/roles.shared.utils.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AAEH,OAAO,EAAkC,KAAK,kBAAkB,EAAE,MAAM,wBAAwB,CAAC;AAMjG;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,oBAAoB,CAAC,OAAO,EAAE,MAAM,EAAE,WAAW,EAAE,kBAAkB,GAAG,MAAM,EAAE,CAQ/F;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAoDG;AACH,wBAAgB,gCAAgC,CAAC,aAAa,EAAE,SAAS,MAAM,EAAE,GAAG,SAAS,GAAG,OAAO,CAEtG;AAeD,4DAA4D;AAC5D,MAAM,WAAW,mCAAmC;IAClD,qFAAqF;IACrF,aAAa,EAAE,SAAS,MAAM,EAAE,GAAG,SAAS,CAAC;IAC7C,wEAAwE;IACxE,YAAY,EAAE,SAAS,MAAM,EAAE,CAAC;IAChC,0GAA0G;IAC1G,YAAY,EAAE,SAAS,MAAM,EAAE,CAAC;IAChC,mFAAmF;IACnF,cAAc,CAAC,EAAE,kBAAkB,CAAC;IACpC,+EAA+E;IAC/E,cAAc,CAAC,EAAE,kBAAkB,CAAC;CACrC;AAED;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,wBAAgB,6BAA6B,CAAC,MAAM,EAAE,mCAAmC,GAAG,OAAO,CAoClG;AAsCD;;;;;;;;;;;;;;;;;;GAkBG;AACH,wBAAgB,wBAAwB,CACtC,IAAI,EAAE,MAAM,EACZ,cAAc,GAAE,kBAAmD,EACnE,cAAc,GAAE,kBAA+C,GAC9D,MAAM,CAMR;AAED,sFAAsF;AACtF,MAAM,WAAW,qBAAqB;IACpC,8FAA8F;IAC9F,KAAK,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;CAC3B;AAED;;;GAGG;AACH,wBAAgB,wBAAwB,CACtC,OAAO,EAAE,qBAAqB,EAC9B,cAAc,CAAC,EAAE,kBAAkB,EACnC,cAAc,CAAC,EAAE,kBAAkB,GAClC,MAAM,CAIR;AAED;;;;;;;;;;;;;;;;;;;GAmBG;AACH,wBAAgB,2BAA2B,CAAC,CAAC,SAAS,qBAAqB,EACzE,QAAQ,EAAE,SAAS,CAAC,EAAE,EACtB,cAAc,CAAC,EAAE,kBAAkB,EACnC,cAAc,CAAC,EAAE,kBAAkB,GAClC,CAAC,EAAE,CAQL"}
@@ -0,0 +1,31 @@
1
+ /**
2
+ * Organization Provider Credentials — resource configuration.
3
+ *
4
+ * The tenant-owned service credential toward a third-party provider. See
5
+ * `provider-credentials.shared.schemas.ts` for what the resource is and what it deliberately is not.
6
+ */
7
+ import { z } from 'zod';
8
+ import { ProviderCredentialValidationState } from './provider-credentials.shared.schemas';
9
+ import { CoreResourceOperation } from '../../resources/resources.shared.core.definitions';
10
+ import { ResourceRelationship } from '../../resources/resources.shared.schemas';
11
+ type OrgProviderCredentialsCoreOperations = CoreResourceOperation.READ | CoreResourceOperation.LIST | CoreResourceOperation.CREATE | CoreResourceOperation.UPDATE | CoreResourceOperation.DELETE | CoreResourceOperation.UPDATE_MANY;
12
+ export declare const orgProviderCredentialsResourceConfiguration_InitializationFactory: (resourcesRelationships: ResourceRelationship[]) => import("../..").ResourceConfiguration<undefined, OrgProviderCredentialsCoreOperations, import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<z.ZodObject<{
13
+ _id: import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<z.ZodString>>;
14
+ organizationId: 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>>>>;
15
+ providerRef: import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<z.ZodString>>>;
16
+ secretSlug: import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<z.ZodString>>>;
17
+ secretValue: import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<z.ZodString>;
18
+ enabled: import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<z.ZodDefault<z.ZodBoolean>>>;
19
+ validationState: import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<z.ZodDefault<z.ZodEnum<typeof ProviderCredentialValidationState>>>>;
20
+ validationError: import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<z.ZodOptional<z.ZodString>>>;
21
+ lastValidatedAt: import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<z.ZodOptional<z.ZodDate>>>;
22
+ lastUsedAt: import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<z.ZodOptional<z.ZodDate>>>>;
23
+ setByUserId: import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<z.ZodOptional<z.ZodString>>>>;
24
+ secretSetAt: import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<z.ZodOptional<z.ZodDate>>>;
25
+ connectionParameters: import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>>;
26
+ description: z.ZodOptional<z.ZodString>;
27
+ createdAt: 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<z.ZodDate>>>>>;
28
+ updatedAt: import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<z.ZodDefault<z.ZodDate>>>>;
29
+ }, z.core.$strip>>>;
30
+ export {};
31
+ //# sourceMappingURL=provider-credentials-organization.shared.resources-config.schemas.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"provider-credentials-organization.shared.resources-config.schemas.d.ts","sourceRoot":"","sources":["../../../../src/security/connected-accounts/provider-credentials-organization.shared.resources-config.schemas.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EAEL,iCAAiC,EAClC,MAAM,uCAAuC,CAAC;AAK/C,OAAO,EAAE,qBAAqB,EAAwD,MAAM,mDAAmD,CAAC;AAChJ,OAAO,EAA4D,oBAAoB,EAAE,MAAM,0CAA0C,CAAC;AAY1I,KAAK,oCAAoC,GACrC,qBAAqB,CAAC,IAAI,GAC1B,qBAAqB,CAAC,IAAI,GAC1B,qBAAqB,CAAC,MAAM,GAC5B,qBAAqB,CAAC,MAAM,GAC5B,qBAAqB,CAAC,MAAM,GAC5B,qBAAqB,CAAC,WAAW,CAAC;AAEtC,eAAO,MAAM,iEAAiE,GAC5E,wBAAwB,oBAAoB,EAAE;;;;;;;;;;;;;;;;;mBA8L9C,CAAC"}
@@ -0,0 +1,198 @@
1
+ /**
2
+ * Organization Provider Credentials — resource configuration.
3
+ *
4
+ * The tenant-owned service credential toward a third-party provider. See
5
+ * `provider-credentials.shared.schemas.ts` for what the resource is and what it deliberately is not.
6
+ */
7
+ import { z } from 'zod';
8
+ import { OrganizationProviderCredentialSchema, ProviderCredentialValidationState, } from './provider-credentials.shared.schemas.js';
9
+ import { ErasureRetentionMode, ResourceDataSubjectKind } from '../../compliance/privacy/impersonalization.shared.schemas.js';
10
+ import { createResourceConfiguration_Initialization } from '../../resources/resources-config.shared.factory.js';
11
+ import { ResourceSystemAccessMode } from '../../resources/resources-config.shared.schemas.js';
12
+ import { CoreResourceOperation, CoreResourceType, coreResourceShared_FieldIdentifier } from '../../resources/resources.shared.core.definitions.js';
13
+ import { ResourceOperationRiskLevel, ResourceOperationVariantType } from '../../resources/resources.shared.schemas.js';
14
+ import { CORE_APP_ROLES, CORE_ORG_ROLES } from '../authorizations/roles.shared.schemas.js';
15
+ const ORG_PROVIDER_CREDENTIALS_SORT_FIELDS = ['createdAt', 'updatedAt', 'providerRef', 'lastUsedAt'];
16
+ const ORG_PROVIDER_CREDENTIALS_FILTER_FIELDS = {
17
+ providerRef: z.string(),
18
+ secretSlug: z.string(),
19
+ enabled: z.boolean(),
20
+ validationState: z.enum(ProviderCredentialValidationState),
21
+ };
22
+ export const orgProviderCredentialsResourceConfiguration_InitializationFactory = (resourcesRelationships) => createResourceConfiguration_Initialization({
23
+ mainSchema: OrganizationProviderCredentialSchema,
24
+ resourceIdentifier: CoreResourceType.ORG_PROVIDER_CREDENTIALS,
25
+ resourceFieldIdentifier: coreResourceShared_FieldIdentifier[CoreResourceType.ORG_PROVIDER_CREDENTIALS],
26
+ resourceRelationships: resourcesRelationships,
27
+ isSystemResource: true,
28
+ /**
29
+ * ## `read` / `list` — the RESOLVER's door
30
+ *
31
+ * A provider call happens on whatever execution context the caller holds: a batch, a queue
32
+ * consumer, an anonymous webhook return leg. None of those carry an ORG_ADMIN role, and the
33
+ * resolution must still work — so the resolver reads through `readAsSystem`, which is fail-closed
34
+ * on this opt-in. The scope is supplied as the organization FK in the system context map, so the
35
+ * bypass is of the ROLE check only, never of the tenant boundary.
36
+ *
37
+ * ## `update` — the resolver's WRITE-BACK door
38
+ *
39
+ * `lastUsedAt`, `validationState`, `validationError` and `lastValidatedAt` are all
40
+ * `.excludeFromUpdate()`, so the strict re-parse on the ordinary update path strips them. The
41
+ * trusted `updateAsSystem` path is the only one that re-attaches them, which is why it is opted
42
+ * into here and why those fields are not client-writable: a tenant administrator must not be able
43
+ * to declare their own credential `VALID`.
44
+ *
45
+ * ## `create` — deliberately NOT opted in
46
+ *
47
+ * A credential comes into existence only when a human supplies one. There is no seed, no
48
+ * provisioning step and no import that should mint one on a tenant's behalf, so the system create
49
+ * door stays shut.
50
+ *
51
+ * ## `exportSubject: FORBIDDEN`
52
+ *
53
+ * The reserved class. This row is a live credential toward a third party; a subject export that
54
+ * carried one would hand a working secret to whoever requested the export.
55
+ */
56
+ /**
57
+ * `create` is open for the reason its user-owned sibling documents at length: a credential a
58
+ * vendor MINTS has no HTTP write that could carry it. An OAuth2 grant arrives through a redirect
59
+ * after a tenant administrator authorized it on the vendor's consent screen, so the exchange —
60
+ * engine code, never a request payload — is the only thing that can store it.
61
+ */
62
+ systemAccessPolicy: {
63
+ exportSubject: ResourceSystemAccessMode.FORBIDDEN,
64
+ read: ResourceSystemAccessMode.ALLOWED,
65
+ list: ResourceSystemAccessMode.ALLOWED,
66
+ update: ResourceSystemAccessMode.ALLOWED,
67
+ create: ResourceSystemAccessMode.ALLOWED,
68
+ },
69
+ /**
70
+ * Subject erasure RETAINS this row and scrubs nothing, because there is nothing here that belongs
71
+ * to a person.
72
+ *
73
+ * The row is a TENANT's credential. `setByUserId` names an ACTOR — the administrator who typed it
74
+ * — which is the first population `NO_PRINCIPAL` describes, and it is exactly the field an
75
+ * erasure must not use as a reason to destroy the row: a tenant losing its Slack integration
76
+ * because the admin who configured it left the company is a bug, not a privacy guarantee.
77
+ *
78
+ * The erasure walk cannot reach this resource in any case, because no `USERS` relationship is
79
+ * registered for `setByUserId` — withheld deliberately, since that edge would also put a
80
+ * credential on the Art. 15 export graph. `RETAIN_ONLY` is therefore a statement of what WOULD
81
+ * happen rather than a path that runs today, and it is worth declaring for that reason: the next
82
+ * author who registers a USERS edge inherits the correct answer instead of the default.
83
+ *
84
+ * The assertion is checked in both directions by the factory — `RETAIN_ONLY` is refused if any
85
+ * field carries an impersonalize treatment or declares a personal-data category.
86
+ */
87
+ retentionPolicy: {
88
+ mode: ErasureRetentionMode.RETAIN_ONLY,
89
+ },
90
+ dataSubjectPolicy: { kind: ResourceDataSubjectKind.NO_PRINCIPAL },
91
+ coreOperations: [
92
+ CoreResourceOperation.READ,
93
+ CoreResourceOperation.LIST,
94
+ CoreResourceOperation.CREATE,
95
+ CoreResourceOperation.UPDATE,
96
+ // Required by the ORGANIZATIONS cascade: `onParentDelete` dispatches the child's DELETE, and a
97
+ // relationship declaring the cascade against a resource with no DELETE core operation throws at
98
+ // config build. It is also the tenant's own "remove this credential" door.
99
+ CoreResourceOperation.DELETE,
100
+ // Route-less; `retentionPolicy` requires READ + LIST + UPDATE_MANY.
101
+ CoreResourceOperation.UPDATE_MANY,
102
+ ],
103
+ operationsConfiguration: {
104
+ /*
105
+ * ORG_ADMIN everywhere, and NO super-administrator variant anywhere — a deliberate refusal, not
106
+ * an omission.
107
+ *
108
+ * Every sibling security resource (org API keys, org OAuth clients) carries an `admin` variant
109
+ * so a platform operator can support a tenant. This one does not, because the thing being
110
+ * supported is a live credential toward a THIRD PARTY: an operator who can list, rotate or spend
111
+ * a tenant's Slack token can act as that tenant toward Slack, and no audit event afterwards
112
+ * makes that reversible. `administrative-continuity-floors.md` asks for the reversibility test
113
+ * before crossing a tenant boundary, and this verb fails it in both directions — reading is
114
+ * masked but LISTing reveals which vendors a tenant integrates with, and rotating locks the
115
+ * tenant out of its own integration.
116
+ *
117
+ * The cost is real and accepted: a tenant that loses every ORG_ADMIN cannot have its credentials
118
+ * repaired by support. That is what `organizationMembers.grantOwnership` exists for — restore an
119
+ * administrator to the tenant, and the tenant repairs its own credentials. The repair path runs
120
+ * through identity, where it is audited and reversible, rather than through the credential
121
+ * store, where it would not be.
122
+ */
123
+ [CoreResourceOperation.READ]: {
124
+ variants: [
125
+ {
126
+ variantType: ResourceOperationVariantType.API_CALL,
127
+ isDefault: true,
128
+ roles: [CORE_ORG_ROLES.ORG_ADMIN],
129
+ // LOW because the value never leaves: `.isWriteOnlySecret()` redacts it at the client
130
+ // boundary, so a READ returns metadata and a placeholder.
131
+ riskLevel: ResourceOperationRiskLevel.LOW,
132
+ },
133
+ ],
134
+ },
135
+ [CoreResourceOperation.LIST]: {
136
+ variants: [
137
+ {
138
+ variantType: ResourceOperationVariantType.API_CALL,
139
+ isDefault: true,
140
+ roles: [CORE_ORG_ROLES.ORG_ADMIN],
141
+ riskLevel: ResourceOperationRiskLevel.LOW,
142
+ filterFields: ORG_PROVIDER_CREDENTIALS_FILTER_FIELDS,
143
+ sortFields: ORG_PROVIDER_CREDENTIALS_SORT_FIELDS,
144
+ maxPaginatedResultPerPageLimit: 100,
145
+ },
146
+ ],
147
+ },
148
+ [CoreResourceOperation.CREATE]: {
149
+ variants: [
150
+ {
151
+ variantType: ResourceOperationVariantType.API_CALL,
152
+ isDefault: true,
153
+ roles: [CORE_ORG_ROLES.ORG_ADMIN],
154
+ // CRITICAL: this is the act of granting the application authority to act as the tenant
155
+ // toward a third party.
156
+ riskLevel: ResourceOperationRiskLevel.CRITICAL,
157
+ },
158
+ ],
159
+ },
160
+ [CoreResourceOperation.UPDATE]: {
161
+ variants: [
162
+ {
163
+ variantType: ResourceOperationVariantType.API_CALL,
164
+ isDefault: true,
165
+ roles: [CORE_ORG_ROLES.ORG_ADMIN],
166
+ riskLevel: ResourceOperationRiskLevel.CRITICAL,
167
+ },
168
+ ],
169
+ },
170
+ [CoreResourceOperation.DELETE]: {
171
+ variants: [
172
+ {
173
+ variantType: ResourceOperationVariantType.API_CALL,
174
+ isDefault: true,
175
+ roles: [CORE_ORG_ROLES.ORG_ADMIN],
176
+ riskLevel: ResourceOperationRiskLevel.CRITICAL,
177
+ },
178
+ ],
179
+ },
180
+ /*
181
+ * Route-less retention plumbing. INTERNAL_CALL registers NO route, and must not be
182
+ * REPOSITORY_ONLY: that satisfies the factory's boot-time presence guard and then fails to
183
+ * resolve when an erasure actually runs, because the retention primitives resolve through
184
+ * `getServiceOperationPathDefault`, which excludes REPOSITORY_ONLY.
185
+ */
186
+ [CoreResourceOperation.UPDATE_MANY]: {
187
+ variants: [
188
+ {
189
+ variantType: ResourceOperationVariantType.INTERNAL_CALL,
190
+ isDefault: true,
191
+ roles: [CORE_APP_ROLES.APP_ADMIN_SUPER_ADMIN],
192
+ riskLevel: ResourceOperationRiskLevel.CRITICAL,
193
+ },
194
+ ],
195
+ },
196
+ },
197
+ });
198
+ //# sourceMappingURL=provider-credentials-organization.shared.resources-config.schemas.js.map