@wildo-ai/saas-models 1.1.3 → 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 (496) 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.map +1 -1
  7. package/dist/esm/applications/applications.shared.resources-config.schemas.d.ts.map +1 -1
  8. package/dist/esm/applications/applications.shared.resources-config.schemas.js.map +1 -1
  9. package/dist/esm/applications/applications.shared.schemas.d.ts.map +1 -1
  10. package/dist/esm/billing/billing-account.shared.resources-config.schemas.d.ts.map +1 -1
  11. package/dist/esm/billing/billing-account.shared.schemas.d.ts.map +1 -1
  12. package/dist/esm/billing/billing-configuration.shared.schemas.d.ts.map +1 -1
  13. package/dist/esm/billing/billing-configuration.shared.schemas.js.map +1 -1
  14. package/dist/esm/billing/billing-enums.shared.schemas.d.ts.map +1 -1
  15. package/dist/esm/billing/billing-enums.shared.schemas.js.map +1 -1
  16. package/dist/esm/billing/billing-types.shared.schemas.d.ts +1 -0
  17. package/dist/esm/billing/billing-types.shared.schemas.d.ts.map +1 -1
  18. package/dist/esm/billing/billing-types.shared.schemas.js +45 -0
  19. package/dist/esm/billing/billing-types.shared.schemas.js.map +1 -1
  20. package/dist/esm/billing/credit-pool.shared.resources-config.schemas.d.ts.map +1 -1
  21. package/dist/esm/billing/credit-pool.shared.schemas.d.ts.map +1 -1
  22. package/dist/esm/billing/invoice-ref.shared.resources-config.schemas.d.ts.map +1 -1
  23. package/dist/esm/billing/invoice-ref.shared.schemas.d.ts.map +1 -1
  24. package/dist/esm/billing/price.shared.resources-config.schemas.d.ts.map +1 -1
  25. package/dist/esm/billing/price.shared.schemas.d.ts.map +1 -1
  26. package/dist/esm/billing/price.shared.schemas.js.map +1 -1
  27. package/dist/esm/billing/product-behavior-policy.shared.schemas.d.ts.map +1 -1
  28. package/dist/esm/billing/product-behavior-policy.shared.schemas.js.map +1 -1
  29. package/dist/esm/billing/product-definition.shared.schemas.d.ts.map +1 -1
  30. package/dist/esm/billing/product.shared.resources-config.schemas.d.ts.map +1 -1
  31. package/dist/esm/billing/product.shared.schemas.d.ts.map +1 -1
  32. package/dist/esm/billing/product.shared.schemas.js.map +1 -1
  33. package/dist/esm/billing/promotions.shared.resources-config.schemas.d.ts.map +1 -1
  34. package/dist/esm/billing/promotions.shared.schemas.d.ts.map +1 -1
  35. package/dist/esm/billing/referral.shared.resources-config.schemas.d.ts.map +1 -1
  36. package/dist/esm/billing/referral.shared.schemas.d.ts.map +1 -1
  37. package/dist/esm/billing/subscription.shared.resources-config.schemas.d.ts.map +1 -1
  38. package/dist/esm/billing/subscription.shared.resources-config.schemas.js.map +1 -1
  39. package/dist/esm/billing/subscription.shared.schemas.d.ts.map +1 -1
  40. package/dist/esm/billing/usage-record.shared.resources-config.schemas.d.ts.map +1 -1
  41. package/dist/esm/billing/usage-record.shared.schemas.d.ts.map +1 -1
  42. package/dist/esm/billing/usage-record.shared.schemas.js.map +1 -1
  43. package/dist/esm/charts/aggregation-query.shared.schemas.d.ts.map +1 -1
  44. package/dist/esm/charts/chart-definition-builder.shared.d.ts.map +1 -1
  45. package/dist/esm/companion/provider-discovery.shared.schemas.d.ts +2 -0
  46. package/dist/esm/companion/provider-discovery.shared.schemas.d.ts.map +1 -1
  47. package/dist/esm/companion/provider-discovery.shared.schemas.js.map +1 -1
  48. package/dist/esm/companion/shared-library-companion.shared.definitions.d.ts.map +1 -1
  49. package/dist/esm/companion-exports.d.ts.map +1 -1
  50. package/dist/esm/compliance/audit-trails/application-audit-logs.shared.resources-config.schemas.d.ts.map +1 -1
  51. package/dist/esm/compliance/audit-trails/application-audit-logs.shared.resources-config.schemas.js.map +1 -1
  52. package/dist/esm/compliance/audit-trails/audit-log-sink.shared.schemas.d.ts.map +1 -1
  53. package/dist/esm/compliance/audit-trails/audit-logs.shared.resources-config.schemas.d.ts.map +1 -1
  54. package/dist/esm/compliance/audit-trails/audit-trail-config.shared.schemas.d.ts.map +1 -1
  55. package/dist/esm/compliance/audit-trails/audit-trail-config.shared.schemas.js.map +1 -1
  56. package/dist/esm/compliance/audit-trails/auditable-events.shared.schema.d.ts +178 -6
  57. package/dist/esm/compliance/audit-trails/auditable-events.shared.schema.d.ts.map +1 -1
  58. package/dist/esm/compliance/audit-trails/auditable-events.shared.schema.js +326 -4
  59. package/dist/esm/compliance/audit-trails/auditable-events.shared.schema.js.map +1 -1
  60. package/dist/esm/compliance/audit-trails/security-audit-event-envelope.shared.schema.d.ts.map +1 -1
  61. package/dist/esm/compliance/audit-trails/security-audit-event-envelope.shared.schema.js +22 -0
  62. package/dist/esm/compliance/audit-trails/security-audit-event-envelope.shared.schema.js.map +1 -1
  63. package/dist/esm/compliance/documents/governed-documents.shared.schemas.d.ts.map +1 -1
  64. package/dist/esm/compliance/privacy/ai-use-posture.shared.schemas.d.ts.map +1 -1
  65. package/dist/esm/compliance/privacy/client-storage.shared.schemas.d.ts.map +1 -1
  66. package/dist/esm/compliance/privacy/data-retention.shared.schemas.d.ts.map +1 -1
  67. package/dist/esm/compliance/privacy/impersonalization-scrub.shared.utils.d.ts.map +1 -1
  68. package/dist/esm/compliance/privacy/impersonalization.shared.schemas.d.ts.map +1 -1
  69. package/dist/esm/compliance/privacy/operating-jurisdictions.shared.schemas.d.ts +27 -0
  70. package/dist/esm/compliance/privacy/operating-jurisdictions.shared.schemas.d.ts.map +1 -1
  71. package/dist/esm/compliance/privacy/operating-jurisdictions.shared.schemas.js +36 -2
  72. package/dist/esm/compliance/privacy/operating-jurisdictions.shared.schemas.js.map +1 -1
  73. package/dist/esm/compliance/privacy/operator-compliance-identity.shared.schemas.d.ts.map +1 -1
  74. package/dist/esm/compliance/privacy/personal-data-category.shared.schemas.d.ts.map +1 -1
  75. package/dist/esm/compliance/privacy/personal-data-declaration.shared.utils.d.ts.map +1 -1
  76. package/dist/esm/compliance/privacy/privacy.shared.schemas.d.ts.map +1 -1
  77. package/dist/esm/compliance/privacy/privacy.shared.schemas.js.map +1 -1
  78. package/dist/esm/compliance/privacy/redaction.shared.schemas.d.ts.map +1 -1
  79. package/dist/esm/compliance/privacy/redaction.shared.schemas.js.map +1 -1
  80. package/dist/esm/compliance/privacy/retention-schedule.shared.schemas.d.ts.map +1 -1
  81. package/dist/esm/compliance/privacy/subject-erasure.shared.schemas.d.ts.map +1 -1
  82. package/dist/esm/compliance/privacy/subject-export-render.shared.utils.d.ts.map +1 -1
  83. package/dist/esm/compliance/privacy/subject-export.shared.schemas.d.ts.map +1 -1
  84. package/dist/esm/compliance/privacy/subject-export.shared.schemas.js.map +1 -1
  85. package/dist/esm/config/analytics-value-moments.shared.schemas.d.ts.map +1 -1
  86. package/dist/esm/config/analytics-value-moments.shared.schemas.js.map +1 -1
  87. package/dist/esm/config/app-configuration-shared.shared.schemas.d.ts.map +1 -1
  88. package/dist/esm/config/auth-config-resolution.shared.utils.d.ts.map +1 -1
  89. package/dist/esm/config/auth-config-resolution.shared.utils.js.map +1 -1
  90. package/dist/esm/config/brand-assets.shared.schemas.d.ts.map +1 -1
  91. package/dist/esm/config/entity-identity-config.shared.schemas.d.ts.map +1 -1
  92. package/dist/esm/config/entity-identity-config.shared.schemas.js.map +1 -1
  93. package/dist/esm/config/frontend/chart-definition.shared.schemas.d.ts +14 -14
  94. package/dist/esm/config/frontend/chart-definition.shared.schemas.d.ts.map +1 -1
  95. package/dist/esm/config/frontend/chart-registration-alignment.shared.d.ts +139 -3
  96. package/dist/esm/config/frontend/chart-registration-alignment.shared.d.ts.map +1 -1
  97. package/dist/esm/config/frontend/chart-registration-alignment.shared.js +151 -4
  98. package/dist/esm/config/frontend/chart-registration-alignment.shared.js.map +1 -1
  99. package/dist/esm/config/frontend/navigation.shared.schemas.d.ts.map +1 -1
  100. package/dist/esm/config/frontend/onboarding.shared.schemas.d.ts.map +1 -1
  101. package/dist/esm/config/registration-acquisition-policy.shared.utils.d.ts.map +1 -1
  102. package/dist/esm/config-authoring.entry.d.ts.map +1 -1
  103. package/dist/esm/crdt/crdt-merge.shared.utils.d.ts.map +1 -1
  104. package/dist/esm/data-seeding/data-seeding-config.shared.schemas.d.ts.map +1 -1
  105. package/dist/esm/errors/errors.custom-message-ref.shared.definitions.d.ts +6 -0
  106. package/dist/esm/errors/errors.custom-message-ref.shared.definitions.d.ts.map +1 -1
  107. package/dist/esm/errors/errors.custom-message-ref.shared.definitions.js +6 -0
  108. package/dist/esm/errors/errors.custom-message-ref.shared.definitions.js.map +1 -1
  109. package/dist/esm/errors/errors.shared.definitions.d.ts.map +1 -1
  110. package/dist/esm/errors/errors.shared.schemas.d.ts.map +1 -1
  111. package/dist/esm/errors/errors.shared.utils.d.ts.map +1 -1
  112. package/dist/esm/external-data/external-data-pipeline.shared.schemas.d.ts.map +1 -1
  113. package/dist/esm/external-data/external-data-pipeline.shared.schemas.js.map +1 -1
  114. package/dist/esm/external-data.exports.d.ts.map +1 -1
  115. package/dist/esm/external-providers/compose-provider-registry.shared.d.ts.map +1 -1
  116. package/dist/esm/external-providers/engine-capabilities.shared.schemas.d.ts +7 -0
  117. package/dist/esm/external-providers/engine-capabilities.shared.schemas.d.ts.map +1 -1
  118. package/dist/esm/external-providers/engine-capabilities.shared.schemas.js +7 -0
  119. package/dist/esm/external-providers/engine-capabilities.shared.schemas.js.map +1 -1
  120. package/dist/esm/external-providers/engine-capability-resolution-mode.shared.d.ts.map +1 -1
  121. package/dist/esm/external-providers/engine-capability-resolution-mode.shared.js.map +1 -1
  122. package/dist/esm/external-providers/external-providers.shared.schemas.d.ts.map +1 -1
  123. package/dist/esm/external-providers/frontend-bootstrap.shared.schemas.d.ts +4 -0
  124. package/dist/esm/external-providers/frontend-bootstrap.shared.schemas.d.ts.map +1 -1
  125. package/dist/esm/external-providers/frontend-capability-public-config.shared.schemas.d.ts.map +1 -1
  126. package/dist/esm/external-providers/frontend-capability-public-config.shared.schemas.js.map +1 -1
  127. package/dist/esm/external-providers/frontend-capability-runtime.shared.types.d.ts.map +1 -1
  128. package/dist/esm/external-providers/frontend-capability-runtime.shared.types.js.map +1 -1
  129. package/dist/esm/external-providers/frontend-provider-entry.shared.schemas.d.ts +57 -0
  130. package/dist/esm/external-providers/frontend-provider-entry.shared.schemas.d.ts.map +1 -1
  131. package/dist/esm/external-providers/frontend-provider-entry.shared.schemas.js +29 -0
  132. package/dist/esm/external-providers/frontend-provider-entry.shared.schemas.js.map +1 -1
  133. package/dist/esm/external-providers/frontend-provider-public-config.shared.d.ts +175 -0
  134. package/dist/esm/external-providers/frontend-provider-public-config.shared.d.ts.map +1 -0
  135. package/dist/esm/external-providers/frontend-provider-public-config.shared.js +207 -0
  136. package/dist/esm/external-providers/frontend-provider-public-config.shared.js.map +1 -0
  137. package/dist/esm/external-providers/provider-capability.shared.schemas.d.ts.map +1 -1
  138. package/dist/esm/external-providers/provider-capability.shared.schemas.js.map +1 -1
  139. package/dist/esm/external-providers/provider-compliance-profile.shared.schemas.d.ts +18 -8
  140. package/dist/esm/external-providers/provider-compliance-profile.shared.schemas.d.ts.map +1 -1
  141. package/dist/esm/external-providers/provider-compliance-profile.shared.schemas.js +10 -4
  142. package/dist/esm/external-providers/provider-compliance-profile.shared.schemas.js.map +1 -1
  143. package/dist/esm/external-providers/provider-frontend-component-contract.shared.types.d.ts +165 -0
  144. package/dist/esm/external-providers/provider-frontend-component-contract.shared.types.d.ts.map +1 -0
  145. package/dist/esm/external-providers/provider-frontend-component-contract.shared.types.js +39 -0
  146. package/dist/esm/external-providers/provider-frontend-component-contract.shared.types.js.map +1 -0
  147. package/dist/esm/external-providers/provider-frontend-surface.shared.schemas.d.ts.map +1 -1
  148. package/dist/esm/external-providers/provider-frontend-surface.shared.schemas.js.map +1 -1
  149. package/dist/esm/external-providers/provider-metadata.shared.schemas.d.ts.map +1 -1
  150. package/dist/esm/external-providers/provider-metadata.shared.schemas.js.map +1 -1
  151. package/dist/esm/external-providers/provider-protocol.shared.schemas.d.ts.map +1 -1
  152. package/dist/esm/external-providers/provider-protocol.shared.schemas.js.map +1 -1
  153. package/dist/esm/external-providers/provider-tier-rule.shared.utils.d.ts.map +1 -1
  154. package/dist/esm/external-providers/provider-tier-rule.shared.utils.js.map +1 -1
  155. package/dist/esm/external-providers/provider-usage-pricing.shared.schemas.d.ts.map +1 -1
  156. package/dist/esm/features/application-features.shared.resources-config.schemas.d.ts.map +1 -1
  157. package/dist/esm/features/application-features.shared.resources-config.schemas.js +12 -0
  158. package/dist/esm/features/application-features.shared.resources-config.schemas.js.map +1 -1
  159. package/dist/esm/features/core-feature-definitions.shared.d.ts.map +1 -1
  160. package/dist/esm/features/core-feature-definitions.shared.js.map +1 -1
  161. package/dist/esm/features/feature-builders.shared.d.ts.map +1 -1
  162. package/dist/esm/features/feature-builders.shared.js.map +1 -1
  163. package/dist/esm/features/feature-definition.shared.schemas.d.ts.map +1 -1
  164. package/dist/esm/features/feature-registry.shared.d.ts.map +1 -1
  165. package/dist/esm/features/feature-resolution.shared.schemas.d.ts.map +1 -1
  166. package/dist/esm/features/scope-features.shared.schemas.d.ts.map +1 -1
  167. package/dist/esm/features/user-features.shared.resources-config.schemas.d.ts.map +1 -1
  168. package/dist/esm/features/user-features.shared.resources-config.schemas.js +12 -0
  169. package/dist/esm/features/user-features.shared.resources-config.schemas.js.map +1 -1
  170. package/dist/esm/files/file-remote-reference-link.shared.schemas.d.ts +73 -0
  171. package/dist/esm/files/file-remote-reference-link.shared.schemas.d.ts.map +1 -0
  172. package/dist/esm/files/file-remote-reference-link.shared.schemas.js +62 -0
  173. package/dist/esm/files/file-remote-reference-link.shared.schemas.js.map +1 -0
  174. package/dist/esm/files/file-upload-grant.shared.schemas.d.ts.map +1 -1
  175. package/dist/esm/files/file-upload-grant.shared.schemas.js.map +1 -1
  176. package/dist/esm/files/files.shared.resources-config.schemas.d.ts.map +1 -1
  177. package/dist/esm/files/files.shared.schemas.d.ts.map +1 -1
  178. package/dist/esm/files/files.shared.schemas.js.map +1 -1
  179. package/dist/esm/files/files.shared.utils.d.ts.map +1 -1
  180. package/dist/esm/flows-actors/a2a-push-delivery-log.shared.resources-config.schemas.d.ts.map +1 -1
  181. package/dist/esm/flows-actors/a2a-push-delivery-log.shared.schemas.d.ts.map +1 -1
  182. package/dist/esm/flows-actors/a2a-token-budget-state.shared.resources-config.schemas.d.ts.map +1 -1
  183. package/dist/esm/flows-actors/a2a-token-budget-state.shared.schemas.d.ts.map +1 -1
  184. package/dist/esm/flows-actors/actors.shared.schemas.d.ts.map +1 -1
  185. package/dist/esm/flows-actors/actors.shared.schemas.js.map +1 -1
  186. package/dist/esm/flows-actors/agent-traceability.shared.schemas.d.ts.map +1 -1
  187. package/dist/esm/flows-actors/agents.shared.schemas.d.ts.map +1 -1
  188. package/dist/esm/flows-actors/agents.shared.schemas.js.map +1 -1
  189. package/dist/esm/flows-actors/apps-blueprint/apps-blueprint.shared.schemas.d.ts +6 -6
  190. package/dist/esm/flows-actors/apps-blueprint/apps-blueprint.shared.schemas.d.ts.map +1 -1
  191. package/dist/esm/flows-actors/apps-blueprint/artifacts.apps-blueprint.shared.schemas.d.ts.map +1 -1
  192. package/dist/esm/flows-actors/deliberation.shared.schemas.d.ts.map +1 -1
  193. package/dist/esm/flows-actors/deliberation.shared.schemas.js.map +1 -1
  194. package/dist/esm/flows-actors/flows-actors-execution.shared.resources-config.schemas.d.ts.map +1 -1
  195. package/dist/esm/flows-actors/flows-actors-execution.shared.schemas.d.ts.map +1 -1
  196. package/dist/esm/flows-actors/flows-actors-execution.shared.schemas.js.map +1 -1
  197. package/dist/esm/flows-actors/flows-actors-task.shared.resources-config.schemas.d.ts.map +1 -1
  198. package/dist/esm/flows-actors/flows-actors-task.shared.schemas.d.ts.map +1 -1
  199. package/dist/esm/flows-actors/flows-actors.commons.shared.schemas.d.ts.map +1 -1
  200. package/dist/esm/flows-actors/flows-actors.commons.shared.schemas.js.map +1 -1
  201. package/dist/esm/flows-actors/flows-actors.configuration.shared.schemas.d.ts.map +1 -1
  202. package/dist/esm/flows-actors/flows-actors.frontend.shared.schemas.d.ts.map +1 -1
  203. package/dist/esm/flows-actors/flows-actors.io.shared.schemas.d.ts.map +1 -1
  204. package/dist/esm/flows-actors/flows-actors.io.shared.schemas.js.map +1 -1
  205. package/dist/esm/flows-actors/flows-actors.system.shared.definitions.d.ts.map +1 -1
  206. package/dist/esm/flows-actors/flows-actors.system.shared.schemas.d.ts.map +1 -1
  207. package/dist/esm/flows-actors/flows-actors.system.shared.schemas.js.map +1 -1
  208. package/dist/esm/flows-actors/flows.shared.schemas.d.ts.map +1 -1
  209. package/dist/esm/flows-actors/flows.shared.schemas.js.map +1 -1
  210. package/dist/esm/flows-actors/mcp-servers.shared.schemas.d.ts +2 -0
  211. package/dist/esm/flows-actors/mcp-servers.shared.schemas.d.ts.map +1 -1
  212. package/dist/esm/flows-actors/mcp-servers.shared.schemas.js +11 -0
  213. package/dist/esm/flows-actors/mcp-servers.shared.schemas.js.map +1 -1
  214. package/dist/esm/flows-actors/meta-workflows/actions.meta-workflows.shared.schemas.d.ts.map +1 -1
  215. package/dist/esm/flows-actors/meta-workflows/budget-authority.meta-workflows.shared.schemas.d.ts.map +1 -1
  216. package/dist/esm/flows-actors/meta-workflows/budget-authority.meta-workflows.shared.schemas.js.map +1 -1
  217. package/dist/esm/flows-actors/meta-workflows/catalog.meta-workflows.shared.schemas.d.ts.map +1 -1
  218. package/dist/esm/flows-actors/meta-workflows/context-selection.meta-workflows.shared.schemas.d.ts.map +1 -1
  219. package/dist/esm/flows-actors/meta-workflows/context-selection.meta-workflows.shared.schemas.js.map +1 -1
  220. package/dist/esm/flows-actors/meta-workflows/continuity-identifiers.meta-workflows.shared.schemas.d.ts.map +1 -1
  221. package/dist/esm/flows-actors/meta-workflows/decisions.meta-workflows.shared.schemas.d.ts.map +1 -1
  222. package/dist/esm/flows-actors/meta-workflows/decisions.meta-workflows.shared.schemas.js.map +1 -1
  223. package/dist/esm/flows-actors/meta-workflows/execution-binding-common.meta-workflows.shared.schemas.d.ts.map +1 -1
  224. package/dist/esm/flows-actors/meta-workflows/execution-binding-common.meta-workflows.shared.schemas.js.map +1 -1
  225. package/dist/esm/flows-actors/meta-workflows/portable-primitives.meta-workflows.shared.schemas.d.ts.map +1 -1
  226. package/dist/esm/flows-actors/prompt-ir.shared.schemas.d.ts.map +1 -1
  227. package/dist/esm/flows-actors/task-continuity-binding.actors.shared.schemas.d.ts.map +1 -1
  228. package/dist/esm/flows-actors/tasks.actors.shared.schemas.d.ts.map +1 -1
  229. package/dist/esm/frontend-definitions/settings-destination-ref.definitions.d.ts +112 -0
  230. package/dist/esm/frontend-definitions/settings-destination-ref.definitions.d.ts.map +1 -0
  231. package/dist/esm/frontend-definitions/settings-destination-ref.definitions.js +113 -0
  232. package/dist/esm/frontend-definitions/settings-destination-ref.definitions.js.map +1 -0
  233. package/dist/esm/guidance/guidance-flow.shared.schemas.d.ts.map +1 -1
  234. package/dist/esm/guidance/guidance-state.shared.resources-config.schemas.d.ts.map +1 -1
  235. package/dist/esm/guidance/guidance-state.shared.schemas.d.ts.map +1 -1
  236. package/dist/esm/guidance/guidance-state.shared.utils.d.ts.map +1 -1
  237. package/dist/esm/guidance/guidance-state.shared.utils.js.map +1 -1
  238. package/dist/esm/guidance/lifecycle-config.shared.schemas.d.ts.map +1 -1
  239. package/dist/esm/guidance/lifecycle-state.shared.resources-config.schemas.d.ts.map +1 -1
  240. package/dist/esm/guidance/lifecycle-state.shared.schemas.d.ts.map +1 -1
  241. package/dist/esm/guidance/milestone-builders.shared.d.ts.map +1 -1
  242. package/dist/esm/guidance/milestone-definition.shared.schemas.d.ts.map +1 -1
  243. package/dist/esm/guidance/progression-state.shared.resources-config.schemas.d.ts.map +1 -1
  244. package/dist/esm/guidance/progression-state.shared.schemas.d.ts.map +1 -1
  245. package/dist/esm/guidance/progression-state.shared.schemas.js.map +1 -1
  246. package/dist/esm/http-api-binding/http-api-binding-id.shared.utils.d.ts.map +1 -1
  247. package/dist/esm/http-api-binding/http-api-binding.shared.schemas.d.ts.map +1 -1
  248. package/dist/esm/http-api-binding/http-api-binding.shared.schemas.js.map +1 -1
  249. package/dist/esm/i18n/labelling.dto.shared.schemas.d.ts.map +1 -1
  250. package/dist/esm/index.d.ts +6 -0
  251. package/dist/esm/index.d.ts.map +1 -1
  252. package/dist/esm/index.js +6 -0
  253. package/dist/esm/index.js.map +1 -1
  254. package/dist/esm/meta-workflows.exports.d.ts.map +1 -1
  255. package/dist/esm/monitoring/monitoring.shared.schemas.d.ts.map +1 -1
  256. package/dist/esm/notifications/email/email-context.shared.schemas.d.ts.map +1 -1
  257. package/dist/esm/notifications/email/email-template-registry.shared.schemas.d.ts.map +1 -1
  258. package/dist/esm/notifications/email/email-template-registry.shared.schemas.js.map +1 -1
  259. package/dist/esm/notifications/email/email-template.shared.enums.d.ts.map +1 -1
  260. package/dist/esm/notifications/email/email-template.shared.enums.js.map +1 -1
  261. package/dist/esm/notifications/m2m/m2m-webhook-delivery-contract.shared.d.ts.map +1 -1
  262. package/dist/esm/notifications/m2m/m2m-webhook-delivery-log.shared.resources-config.schemas.d.ts.map +1 -1
  263. package/dist/esm/notifications/m2m/m2m-webhook-delivery-log.shared.schemas.d.ts.map +1 -1
  264. package/dist/esm/notifications/m2m/webhook-config.shared.resources-config.schemas.d.ts.map +1 -1
  265. package/dist/esm/notifications/m2m/webhook-config.shared.resources-config.schemas.js.map +1 -1
  266. package/dist/esm/notifications/m2m/webhook-config.shared.schemas.d.ts.map +1 -1
  267. package/dist/esm/notifications/m2m/webhook-config.shared.schemas.js.map +1 -1
  268. package/dist/esm/notifications/notification-badges.core.definitions.d.ts.map +1 -1
  269. package/dist/esm/notifications/notification-badges.core.definitions.js.map +1 -1
  270. package/dist/esm/notifications/notification-badges.schemas.d.ts.map +1 -1
  271. package/dist/esm/notifications/notification-badges.schemas.js.map +1 -1
  272. package/dist/esm/notifications/notification-badges.shared.resources-config.schemas.d.ts.map +1 -1
  273. package/dist/esm/notifications/notifications.shared.schemas.d.ts +51 -0
  274. package/dist/esm/notifications/notifications.shared.schemas.d.ts.map +1 -1
  275. package/dist/esm/notifications/notifications.shared.schemas.js +51 -0
  276. package/dist/esm/notifications/notifications.shared.schemas.js.map +1 -1
  277. package/dist/esm/organizations/organization-features.shared.resources-config.schemas.d.ts.map +1 -1
  278. package/dist/esm/organizations/organization-features.shared.resources-config.schemas.js +13 -0
  279. package/dist/esm/organizations/organization-features.shared.resources-config.schemas.js.map +1 -1
  280. package/dist/esm/organizations/organization-members.shared.resources-config.schemas.d.ts.map +1 -1
  281. package/dist/esm/organizations/organization-members.shared.schemas.d.ts.map +1 -1
  282. package/dist/esm/organizations/organization-notifications.shared.resources-config.schemas.d.ts.map +1 -1
  283. package/dist/esm/organizations/organization-notifications.shared.schemas.d.ts.map +1 -1
  284. package/dist/esm/organizations/organization-notifications.shared.schemas.js.map +1 -1
  285. package/dist/esm/organizations/organization-preferences.shared.resources-config.schemas.d.ts.map +1 -1
  286. package/dist/esm/organizations/organization-preferences.shared.schemas.d.ts.map +1 -1
  287. package/dist/esm/organizations/organization-preferences.shared.schemas.js.map +1 -1
  288. package/dist/esm/organizations/organization-profile.shared.resources-config.schemas.d.ts.map +1 -1
  289. package/dist/esm/organizations/organization-profile.shared.schemas.d.ts.map +1 -1
  290. package/dist/esm/organizations/organization-profile.shared.schemas.js.map +1 -1
  291. package/dist/esm/organizations/organization-unit-inheritance.shared.d.ts.map +1 -1
  292. package/dist/esm/organizations/organization-unit-members.shared.resources-config.schemas.d.ts.map +1 -1
  293. package/dist/esm/organizations/organization-unit-members.shared.schemas.d.ts.map +1 -1
  294. package/dist/esm/organizations/organization-unit-narrowing-decision.shared.d.ts.map +1 -1
  295. package/dist/esm/organizations/organization-unit-narrowing.example.d.ts.map +1 -1
  296. package/dist/esm/organizations/organization-unit-narrowing.shared.d.ts.map +1 -1
  297. package/dist/esm/organizations/organization-unit-narrowing.shared.js.map +1 -1
  298. package/dist/esm/organizations/organization-units.shared.resources-config.schemas.d.ts.map +1 -1
  299. package/dist/esm/organizations/organization-units.shared.schemas.d.ts.map +1 -1
  300. package/dist/esm/organizations/organizations.shared.resources-config.schemas.d.ts.map +1 -1
  301. package/dist/esm/organizations/organizations.shared.resources-config.schemas.js.map +1 -1
  302. package/dist/esm/organizations/organizations.shared.schemas.d.ts.map +1 -1
  303. package/dist/esm/organizations/tenant-teardown-config.shared.schemas.d.ts +13 -0
  304. package/dist/esm/organizations/tenant-teardown-config.shared.schemas.d.ts.map +1 -1
  305. package/dist/esm/organizations/tenant-teardown-config.shared.schemas.js +13 -0
  306. package/dist/esm/organizations/tenant-teardown-config.shared.schemas.js.map +1 -1
  307. package/dist/esm/provider-registration-runtime.exports.d.ts.map +1 -1
  308. package/dist/esm/public-runtime/index.d.ts +22 -0
  309. package/dist/esm/public-runtime/index.d.ts.map +1 -1
  310. package/dist/esm/public-runtime/index.js +14 -0
  311. package/dist/esm/public-runtime/index.js.map +1 -1
  312. package/dist/esm/queue/jobs.shared.resources-config.schemas.d.ts.map +1 -1
  313. package/dist/esm/queue/jobs.shared.resources-config.schemas.js.map +1 -1
  314. package/dist/esm/queue/jobs.shared.schemas.d.ts.map +1 -1
  315. package/dist/esm/queue/jobs.shared.schemas.js.map +1 -1
  316. package/dist/esm/queue/jobs.shared.utils.d.ts.map +1 -1
  317. package/dist/esm/queue/queues.shared.schemas.d.ts.map +1 -1
  318. package/dist/esm/queue/queues.shared.utils.d.ts.map +1 -1
  319. package/dist/esm/requests/manual-controllers-routes-documentation.d.ts.map +1 -1
  320. package/dist/esm/requests/manual-controllers-routes-documentation.js +57 -3
  321. package/dist/esm/requests/manual-controllers-routes-documentation.js.map +1 -1
  322. package/dist/esm/requests/manual-controllers-routes-urls.d.ts +47 -0
  323. package/dist/esm/requests/manual-controllers-routes-urls.d.ts.map +1 -1
  324. package/dist/esm/requests/manual-controllers-routes-urls.js +51 -0
  325. package/dist/esm/requests/manual-controllers-routes-urls.js.map +1 -1
  326. package/dist/esm/requests/rate-limits.shared.schemas.d.ts.map +1 -1
  327. package/dist/esm/requests/rate-limits.shared.schemas.js.map +1 -1
  328. package/dist/esm/requests/websocket.shared.schemas.d.ts +9 -7
  329. package/dist/esm/requests/websocket.shared.schemas.d.ts.map +1 -1
  330. package/dist/esm/requests/websocket.shared.schemas.js +17 -0
  331. package/dist/esm/requests/websocket.shared.schemas.js.map +1 -1
  332. package/dist/esm/resources/child-operations.shared.schemas.d.ts.map +1 -1
  333. package/dist/esm/resources/context-policy.shared.schemas.d.ts.map +1 -1
  334. package/dist/esm/resources/relationship-display.shared.schemas.d.ts.map +1 -1
  335. package/dist/esm/resources/resources-config.shared.factory.d.ts.map +1 -1
  336. package/dist/esm/resources/resources-config.shared.factory.js +98 -5
  337. package/dist/esm/resources/resources-config.shared.factory.js.map +1 -1
  338. package/dist/esm/resources/resources-config.shared.schemas.d.ts +48 -1
  339. package/dist/esm/resources/resources-config.shared.schemas.d.ts.map +1 -1
  340. package/dist/esm/resources/resources-config.shared.schemas.js.map +1 -1
  341. package/dist/esm/resources/resources-registry.shared.core.definitions.d.ts.map +1 -1
  342. package/dist/esm/resources/resources-registry.shared.core.definitions.js +54 -0
  343. package/dist/esm/resources/resources-registry.shared.core.definitions.js.map +1 -1
  344. package/dist/esm/resources/resources-relationships.shared.factory.d.ts.map +1 -1
  345. package/dist/esm/resources/resources-relationships.shared.factory.js.map +1 -1
  346. package/dist/esm/resources/resources-serialization.shared.schemas.d.ts.map +1 -1
  347. package/dist/esm/resources/resources.shared.core.definitions.d.ts +17 -0
  348. package/dist/esm/resources/resources.shared.core.definitions.d.ts.map +1 -1
  349. package/dist/esm/resources/resources.shared.core.definitions.js +18 -0
  350. package/dist/esm/resources/resources.shared.core.definitions.js.map +1 -1
  351. package/dist/esm/resources/resources.shared.schemas.d.ts.map +1 -1
  352. package/dist/esm/resources/resources.shared.schemas.js.map +1 -1
  353. package/dist/esm/resources/resources.shared.utils.d.ts +32 -7
  354. package/dist/esm/resources/resources.shared.utils.d.ts.map +1 -1
  355. package/dist/esm/resources/resources.shared.utils.js +32 -7
  356. package/dist/esm/resources/resources.shared.utils.js.map +1 -1
  357. package/dist/esm/resources/utils/collection-export.shared.utils.d.ts.map +1 -1
  358. package/dist/esm/resources/utils/composition-cascade-deletability.validation.d.ts.map +1 -1
  359. package/dist/esm/resources/utils/composition-seedability.validation.d.ts.map +1 -1
  360. package/dist/esm/resources/utils/context-addressed-composition-singleton.shared.utils.d.ts.map +1 -1
  361. package/dist/esm/resources/utils/duplicate-relationship-registration.validation.d.ts.map +1 -1
  362. package/dist/esm/resources/utils/field-value-disclosure.utils.d.ts.map +1 -1
  363. package/dist/esm/resources/utils/field-value-disclosure.utils.js.map +1 -1
  364. package/dist/esm/resources/utils/persistence-adapter-discrimination.shared.utils.d.ts.map +1 -1
  365. package/dist/esm/resources/utils/repository-dto-builder.utils.d.ts.map +1 -1
  366. package/dist/esm/resources/utils/required-fk-fillability.validation.d.ts.map +1 -1
  367. package/dist/esm/resources/utils/resource-operation-type-guards.utils.d.ts.map +1 -1
  368. package/dist/esm/resources/utils/resource-polymorphism.factory.d.ts.map +1 -1
  369. package/dist/esm/resources/utils/resource-polymorphism.relationships.d.ts.map +1 -1
  370. package/dist/esm/resources/utils/resource-polymorphism.schemas.d.ts.map +1 -1
  371. package/dist/esm/resources/utils/resource-polymorphism.utils.d.ts.map +1 -1
  372. package/dist/esm/resources/utils/resource-subtree.utils.d.ts.map +1 -1
  373. package/dist/esm/resources/utils/resources-config-context-needs.utils.d.ts.map +1 -1
  374. package/dist/esm/resources/utils/resources-config-operations.dtos-builder.utils.d.ts.map +1 -1
  375. package/dist/esm/resources/utils/resources-config-operations.path.utils.d.ts.map +1 -1
  376. package/dist/esm/resources/utils/resources-config-operations.urls-builder.utils.d.ts.map +1 -1
  377. package/dist/esm/resources/utils/resources-config-operations.utils.d.ts.map +1 -1
  378. package/dist/esm/resources/utils/resources-serialization.utils.d.ts.map +1 -1
  379. package/dist/esm/resources/utils/resources-summary.utils.d.ts.map +1 -1
  380. package/dist/esm/resources/utils/resources-summary.utils.js.map +1 -1
  381. package/dist/esm/resources/utils/schema-family-builder.utils.d.ts.map +1 -1
  382. package/dist/esm/resources/utils/schema-type-inference.utils.d.ts.map +1 -1
  383. package/dist/esm/resources/utils/schema-type-utils.d.ts.map +1 -1
  384. package/dist/esm/resources/utils/schema-variant-resolver.utils.d.ts.map +1 -1
  385. package/dist/esm/resources/utils/shared-persistence-collection.utils.d.ts.map +1 -1
  386. package/dist/esm/resources/utils/shared-persistence-collection.utils.js.map +1 -1
  387. package/dist/esm/resources/utils/templatable-file-fields.shared.utils.d.ts.map +1 -1
  388. package/dist/esm/runtime/domain-module.shared.definitions.d.ts.map +1 -1
  389. package/dist/esm/runtime/domain-module.shared.definitions.js.map +1 -1
  390. package/dist/esm/runtime/execution-context.shared.schemas.d.ts.map +1 -1
  391. package/dist/esm/security/api-keys/api-keys-application.shared.resources-config.schemas.d.ts.map +1 -1
  392. package/dist/esm/security/api-keys/api-keys-application.shared.resources-config.schemas.js.map +1 -1
  393. package/dist/esm/security/api-keys/api-keys-organization.shared.resources-config.schemas.d.ts.map +1 -1
  394. package/dist/esm/security/api-keys/api-keys-organization.shared.resources-config.schemas.js.map +1 -1
  395. package/dist/esm/security/api-keys/api-keys.shared.schemas.d.ts.map +1 -1
  396. package/dist/esm/security/authentications/anonymous-session/anonymous-session.shared.contract.d.ts.map +1 -1
  397. package/dist/esm/security/authentications/authentication.shared.dto.schemas.d.ts +1 -1
  398. package/dist/esm/security/authentications/authentication.shared.dto.schemas.d.ts.map +1 -1
  399. package/dist/esm/security/authentications/authentication.shared.dto.schemas.js.map +1 -1
  400. package/dist/esm/security/authentications/authentication.shared.schemas.d.ts.map +1 -1
  401. package/dist/esm/security/authentications/authentication.shared.schemas.js.map +1 -1
  402. package/dist/esm/security/authentications/authentication.shared.utils.d.ts.map +1 -1
  403. package/dist/esm/security/authentications/consumable-token.shared.schemas.d.ts.map +1 -1
  404. package/dist/esm/security/authentications/consumable-token.shared.schemas.js.map +1 -1
  405. package/dist/esm/security/authentications/cross-frontend-handoff.shared.dto.schemas.d.ts.map +1 -1
  406. package/dist/esm/security/authentications/password-reset.shared.dto.schemas.d.ts.map +1 -1
  407. package/dist/esm/security/authentications/registration.shared.dto.schemas.d.ts.map +1 -1
  408. package/dist/esm/security/authentications/registration.shared.dto.schemas.js.map +1 -1
  409. package/dist/esm/security/authentications/scim/scim-organization-unit-mapping.shared.d.ts.map +1 -1
  410. package/dist/esm/security/authentications/scim/scim-provisioning-config.shared.resources-config.schemas.d.ts.map +1 -1
  411. package/dist/esm/security/authentications/scim/scim-provisioning-config.shared.schemas.d.ts.map +1 -1
  412. package/dist/esm/security/authentications/scim/scim-provisioning-config.shared.schemas.js.map +1 -1
  413. package/dist/esm/security/authentications/scim/scim-tokens.shared.resources-config.schemas.d.ts.map +1 -1
  414. package/dist/esm/security/authentications/scim/scim-tokens.shared.schemas.d.ts.map +1 -1
  415. package/dist/esm/security/authentications/siem/siem-delivery-dlq.shared.resources-config.schemas.d.ts.map +1 -1
  416. package/dist/esm/security/authentications/siem/siem-delivery-dlq.shared.schemas.d.ts.map +1 -1
  417. package/dist/esm/security/authentications/siem/siem-delivery-reliability-contract.shared.d.ts.map +1 -1
  418. package/dist/esm/security/authentications/siem/siem-delivery-reliability-contract.shared.js.map +1 -1
  419. package/dist/esm/security/authentications/siem/siem-export-config.shared.resources-config.schemas.d.ts.map +1 -1
  420. package/dist/esm/security/authentications/siem/siem-export-config.shared.schemas.d.ts.map +1 -1
  421. package/dist/esm/security/authentications/sso/sso-config.shared.resources-config.schemas.d.ts +3 -3
  422. package/dist/esm/security/authentications/sso/sso-config.shared.resources-config.schemas.d.ts.map +1 -1
  423. package/dist/esm/security/authentications/sso/sso-config.shared.resources-config.schemas.js +35 -5
  424. package/dist/esm/security/authentications/sso/sso-config.shared.resources-config.schemas.js.map +1 -1
  425. package/dist/esm/security/authentications/sso/sso-config.shared.schemas.d.ts.map +1 -1
  426. package/dist/esm/security/authentications/sso/sso-config.shared.schemas.js.map +1 -1
  427. package/dist/esm/security/authentications/sso/sso-connection.shared.resources-config.schemas.d.ts.map +1 -1
  428. package/dist/esm/security/authentications/sso/sso-connection.shared.schemas.d.ts +2 -0
  429. package/dist/esm/security/authentications/sso/sso-connection.shared.schemas.d.ts.map +1 -1
  430. package/dist/esm/security/authentications/sso/sso-connection.shared.schemas.js +15 -0
  431. package/dist/esm/security/authentications/sso/sso-connection.shared.schemas.js.map +1 -1
  432. package/dist/esm/security/authorizations/administrative-continuity.shared.schemas.d.ts +45 -2
  433. package/dist/esm/security/authorizations/administrative-continuity.shared.schemas.d.ts.map +1 -1
  434. package/dist/esm/security/authorizations/administrative-continuity.shared.schemas.js +45 -2
  435. package/dist/esm/security/authorizations/administrative-continuity.shared.schemas.js.map +1 -1
  436. package/dist/esm/security/authorizations/application-access-grants.shared.resources-config.schemas.d.ts +35 -0
  437. package/dist/esm/security/authorizations/application-access-grants.shared.resources-config.schemas.d.ts.map +1 -0
  438. package/dist/esm/security/authorizations/application-access-grants.shared.resources-config.schemas.js +257 -0
  439. package/dist/esm/security/authorizations/application-access-grants.shared.resources-config.schemas.js.map +1 -0
  440. package/dist/esm/security/authorizations/application-access-grants.shared.schemas.d.ts +143 -0
  441. package/dist/esm/security/authorizations/application-access-grants.shared.schemas.d.ts.map +1 -0
  442. package/dist/esm/security/authorizations/application-access-grants.shared.schemas.js +219 -0
  443. package/dist/esm/security/authorizations/application-access-grants.shared.schemas.js.map +1 -0
  444. package/dist/esm/security/authorizations/platform-access-grants.shared.resources-config.schemas.d.ts.map +1 -1
  445. package/dist/esm/security/authorizations/platform-access-grants.shared.resources-config.schemas.js.map +1 -1
  446. package/dist/esm/security/authorizations/platform-access-grants.shared.schemas.d.ts +23 -0
  447. package/dist/esm/security/authorizations/platform-access-grants.shared.schemas.d.ts.map +1 -1
  448. package/dist/esm/security/authorizations/platform-access-grants.shared.schemas.js +24 -0
  449. package/dist/esm/security/authorizations/platform-access-grants.shared.schemas.js.map +1 -1
  450. package/dist/esm/security/authorizations/roles.shared.defaults.d.ts.map +1 -1
  451. package/dist/esm/security/authorizations/roles.shared.schemas.d.ts.map +1 -1
  452. package/dist/esm/security/authorizations/roles.shared.utils.d.ts.map +1 -1
  453. package/dist/esm/security/connected-accounts/provider-credentials-organization.shared.resources-config.schemas.d.ts.map +1 -1
  454. package/dist/esm/security/connected-accounts/provider-credentials-organization.shared.resources-config.schemas.js.map +1 -1
  455. package/dist/esm/security/connected-accounts/provider-credentials-user.shared.resources-config.schemas.d.ts.map +1 -1
  456. package/dist/esm/security/connected-accounts/provider-credentials-user.shared.resources-config.schemas.js.map +1 -1
  457. package/dist/esm/security/connected-accounts/provider-credentials.shared.schemas.d.ts +57 -0
  458. package/dist/esm/security/connected-accounts/provider-credentials.shared.schemas.d.ts.map +1 -1
  459. package/dist/esm/security/connected-accounts/provider-credentials.shared.schemas.js +44 -0
  460. package/dist/esm/security/connected-accounts/provider-credentials.shared.schemas.js.map +1 -1
  461. package/dist/esm/security/oauth-clients/oauth-clients-application.shared.resources-config.schemas.d.ts.map +1 -1
  462. package/dist/esm/security/oauth-clients/oauth-clients-application.shared.resources-config.schemas.js.map +1 -1
  463. package/dist/esm/security/oauth-clients/oauth-clients-organization.shared.resources-config.schemas.d.ts.map +1 -1
  464. package/dist/esm/security/oauth-clients/oauth-clients-organization.shared.resources-config.schemas.js.map +1 -1
  465. package/dist/esm/security/oauth-clients/oauth-clients.shared.schemas.d.ts.map +1 -1
  466. package/dist/esm/security/oauth-clients/oauth-clients.shared.schemas.js.map +1 -1
  467. package/dist/esm/security/oauth-clients/oauth-consent-grants.shared.resources-config.schemas.d.ts.map +1 -1
  468. package/dist/esm/security/oauth-clients/oauth-consent-grants.shared.schemas.d.ts.map +1 -1
  469. package/dist/esm/security/oauth-clients/oauth-consent-grants.shared.schemas.js.map +1 -1
  470. package/dist/esm/security/oauth-clients/oauth-resource-server.shared.schemas.d.ts.map +1 -1
  471. package/dist/esm/testing/resource-config-builders.d.ts.map +1 -1
  472. package/dist/esm/testing.d.ts.map +1 -1
  473. package/dist/esm/users/anonymous-user-marketing-metadata.shared.schemas.d.ts.map +1 -1
  474. package/dist/esm/users/anonymous-users.shared.resources-config.schemas.d.ts.map +1 -1
  475. package/dist/esm/users/anonymous-users.shared.schema.d.ts.map +1 -1
  476. package/dist/esm/users/inbound-contacts.shared.resources-config.schemas.d.ts.map +1 -1
  477. package/dist/esm/users/inbound-contacts.shared.schemas.d.ts.map +1 -1
  478. package/dist/esm/users/user-credentials.shared.resources-config.schemas.d.ts.map +1 -1
  479. package/dist/esm/users/user-credentials.shared.schemas.d.ts.map +1 -1
  480. package/dist/esm/users/user-identity-links.shared.resources-config.schemas.d.ts.map +1 -1
  481. package/dist/esm/users/user-identity-links.shared.schemas.d.ts.map +1 -1
  482. package/dist/esm/users/user-preferences-reset.shared.utils.d.ts.map +1 -1
  483. package/dist/esm/users/user-preferences.shared.resources-config.schemas.d.ts.map +1 -1
  484. package/dist/esm/users/user-profiles.shared.resources-config.schemas.d.ts.map +1 -1
  485. package/dist/esm/users/user-self-preferences.shared.resources-config.schemas.d.ts.map +1 -1
  486. package/dist/esm/users/user-self-profiles.shared.resources-config.schemas.d.ts.map +1 -1
  487. package/dist/esm/users/user-self.shared.resources-config.schemas.d.ts.map +1 -1
  488. package/dist/esm/users/user-self.shared.resources-config.schemas.js.map +1 -1
  489. package/dist/esm/users/users.shared.resources-config.schemas.d.ts.map +1 -1
  490. package/dist/esm/users/users.shared.resources-config.schemas.js.map +1 -1
  491. package/dist/esm/users/users.shared.schemas.d.ts +17 -1
  492. package/dist/esm/users/users.shared.schemas.d.ts.map +1 -1
  493. package/dist/esm/users/users.shared.schemas.js +18 -2
  494. package/dist/esm/users/users.shared.schemas.js.map +1 -1
  495. package/dist/tsconfig.build.tsbuildinfo +1 -1
  496. package/package.json +4 -4
@@ -1 +1 @@
1
- {"version":3,"file":"oauth-clients-application.shared.resources-config.schemas.d.ts","sourceRoot":"","sources":["../../../../../src/security/oauth-clients/oauth-clients-application.shared.resources-config.schemas.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAEL,iBAAiB,EAClB,MAAM,gCAAgC,CAAC;AACxC,OAAO,EAAE,qBAAqB,EAAE,MAAM,mDAAmD,CAAC;AAC1F,OAAO,EAAoD,oBAAoB,EAAE,MAAM,0CAA0C,CAAC;AAOlI,OAAO,EAAE,cAAc,EAAE,MAAM,wCAAwC,CAAC;AAgBxE,oBAAY,0BAA0B;IACpC,MAAM,WAAW,CAAE,6CAA6C;IAChE,UAAU,eAAe,CAAE,mDAAmD;IAC9E,MAAM,WAAW;CAClB;AAED,KAAK,6BAA6B,GAC9B,qBAAqB,CAAC,IAAI,GAC1B,qBAAqB,CAAC,IAAI,GAC1B,qBAAqB,CAAC,MAAM,GAC5B,qBAAqB,CAAC,MAAM,GAC5B,qBAAqB,CAAC,MAAM,CAAC;AAKjC,eAAO,MAAM,0DAA0D,GAAI,wBAAwB,oBAAoB,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;kBAsOvH,CAAC"}
1
+ {"version":3,"file":"oauth-clients-application.shared.resources-config.schemas.d.ts","sourceRoot":"","sources":["../../../../src/security/oauth-clients/oauth-clients-application.shared.resources-config.schemas.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAEL,iBAAiB,EAClB,MAAM,gCAAgC,CAAC;AACxC,OAAO,EAAE,qBAAqB,EAAE,MAAM,mDAAmD,CAAC;AAC1F,OAAO,EAAoD,oBAAoB,EAAE,MAAM,0CAA0C,CAAC;AAOlI,OAAO,EAAE,cAAc,EAAE,MAAM,wCAAwC,CAAC;AAgBxE,oBAAY,0BAA0B;IACpC,MAAM,WAAW,CAAE,6CAA6C;IAChE,UAAU,eAAe,CAAE,mDAAmD;IAC9E,MAAM,WAAW;CAClB;AAED,KAAK,6BAA6B,GAC9B,qBAAqB,CAAC,IAAI,GAC1B,qBAAqB,CAAC,IAAI,GAC1B,qBAAqB,CAAC,MAAM,GAC5B,qBAAqB,CAAC,MAAM,GAC5B,qBAAqB,CAAC,MAAM,CAAC;AAKjC,eAAO,MAAM,0DAA0D,GAAI,wBAAwB,oBAAoB,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;kBAsOvH,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"oauth-clients-application.shared.resources-config.schemas.js","sourceRoot":"","sources":["../../../../../src/security/oauth-clients/oauth-clients-application.shared.resources-config.schemas.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EACL,4BAA4B,EAC5B,iBAAiB,GAClB,MAAM,gCAAgC,CAAC;AACxC,OAAO,EAAE,qBAAqB,EAAE,MAAM,mDAAmD,CAAC;AAC1F,OAAO,EAAE,0BAA0B,EAA8C,MAAM,0CAA0C,CAAC;AAClI,OAAO,EAAE,wBAAwB,EAAE,MAAM,iDAAiD,CAAC;AAC3F,OAAO,EAAE,gBAAgB,EAAE,kCAAkC,EAAE,MAAM,mDAAmD,CAAC;AACzH,OAAO,EAAE,4BAA4B,EAAE,MAAM,0CAA0C,CAAC;AACxF,OAAO,EAAE,0BAA0B,EAAE,2BAA2B,EAAE,MAAM,kDAAkD,CAAC;AAE3H,OAAO,EAAE,0CAA0C,EAAE,MAAM,iDAAiD,CAAC;AAC7G,OAAO,EAAE,cAAc,EAAE,MAAM,wCAAwC,CAAC;AAExE,uDAAuD;AAEvD,qEAAqE;AACrE,MAAM,qCAAqC,GAAG;IAC5C,MAAM,E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ACnE,2FAA2F;oBAC3F,cAAc,EAAE,EAAE,mBAAmB,EAAE,IAAI,EAAE;oBAC7C,6EAA6E;oBAC7E,iFAAiF;oBACjF,uEAAuE;oBACvE,iFAAiF;oBACjF,qFAAqF;oBACrF,mFAAmF;oBACnF,uEAAuE;oBACvE,+EAA+E;oBAC/E,wEAAwE;oBACxE,0BAA0B;oBAC1B,2FAA2F;oBAC3F,UAAU,EAAE,CAAC,CAAC,MAAM,CAAC,EAAE,CAAC;oBACxB,iBAAiB,EAAE,4BAA4B,CAAC,MAAM,CAAC;wBACrD,WAAW,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,WAAW,EAAE;qBAC7C,CAAC;iBACH;aACF;YACD,iBAAiB,EAAE;gBACjB;oBACE,MAAM,EAAE,0BAA0B,CAAC,yBAAyB;oBAC5D,OAAO,EAAE,2BAA2B,CAAC,KAAK;iBAC3C;aACF;SACF;KACF;CACF,CAAC,CAAC","sourcesContent":["/**\n * Application OAuth Clients Shared Resource Configuration\n *\n * Resource configuration for managing application-scoped registered OAuth\n * clients. FAITHFUL MIRROR of `api-keys-application.shared.resources-config.schemas.ts`\n * with a FOCUSED operation set: core READ/LIST/SEARCH/CREATE plus a REPOSITORY_ONLY\n * DELETE (onParentDelete cascade) and custom ROTATE/REGENERATE. The\n * DEACTIVATE/REACTIVATE/EXTEND_EXPIRY/USAGE_STATS custom ops from api-keys are\n * intentionally deferred to the OIDC branch.\n */\n\nimport { z } from 'zod';\nimport {\n OAuthClientApplicationSchema,\n OAuthClientStatus,\n} from './oauth-clients.shared.schemas';\nimport { CoreResourceOperation } from '../../resources/resources.shared.core.definitions';\nimport { ResourceOperationRiskLevel, ResourcePrimaryScope, ResourceRelationship } from '../../resources/resources.shared.schemas';\nimport { ResourceSystemAccessMode } from '../../resources/resources-config.shared.schemas';\nimport { CoreResourceType, coreResourceShared_FieldIdentifier } from '../../resources/resources.shared.core.definitions';\nimport { ResourceOperationVariantType } from '../../resources/resources.shared.schemas';\nimport { CoreUserNotificationTarget, CoreUserNotificationChannel } from '../../notifications/notifications.shared.schemas';\n\nimport { createResourceConfiguration_Initialization } from '../../resources/resources-config.shared.factory';\nimport { CORE_APP_ROLES } from '../authorizations/roles.shared.schemas';\n\n// Sort and filter fields for application OAuth clients\n\n// App Admin gets enhanced filter fields with additional capabilities\nconst APP_OAUTH_CLIENTS_ADMIN_FILTER_FIELDS = {\n status: z.enum(OAuthClientStatus),\n hasExpiration: z.boolean(),\n lastUsedAt: z.date(), // Admin can filter by last usage\n expiresAt: z.date(), // Admin can filter by expiration\n};\n\n// App Admin gets additional sorting capabilities\nconst APP_OAUTH_CLIENTS_ADMIN_SORT_FIELDS = ['createdAt', 'updatedAt', 'lastUsedAt', 'expiresAt', 'status'] as const;\n\n// Custom operations enum for application OAuth clients\nexport enum AppOAuthClients_Operations {\n ROTATE = 'rotate', // Generate new secret and invalidate old one\n REGENERATE = 'regenerate', // Generate new secret without invalidating old one\n EXPIRE = 'expire', // ACTIVE → EXPIRED once `expiresAt` has passed (dispatched by the sweep, not by an operator)\n}\n\ntype AppOAuthClientsCoreOperations =\n | CoreResourceOperation.READ\n | CoreResourceOperation.LIST\n | CoreResourceOperation.SEARCH\n | CoreResourceOperation.CREATE\n | CoreResourceOperation.DELETE;\n\n/*\nApplication OAuth Clients Resource Configuration Factory\n*/\nexport const appOAuthClientsResourceConfiguration_InitializationFactory = (resourcesRelationships: ResourceRelationship[]) => createResourceConfiguration_Initialization<\n typeof AppOAuthClients_Operations,\n AppOAuthClientsCoreOperations,\n typeof OAuthClientApplicationSchema\n>({\n mainSchema: OAuthClientApplicationSchema,\n resourceIdentifier: CoreResourceType.OAUTH_CLIENTS_APPLICATION,\n resourceFieldIdentifier: coreResourceShared_FieldIdentifier[CoreResourceType.OAUTH_CLIENTS_APPLICATION],\n resourceRelationships: resourcesRelationships,\n isSystemResource: true, // Application OAuth clients are a core system resource\n\n /**\n * CREATE only, and opened for exactly one caller: RFC 7591 dynamic client registration\n * (`POST /oauth/register`), which has no principal to act as and therefore cannot go through the\n * ordinary API_CALL path.\n *\n * Modelled on `anonymousUsers`, the closest analogue in the framework — another resource whose rows\n * are created for an unauthenticated caller through a server-side door, and which opts into\n * `create` and nothing else. READ / UPDATE / DELETE stay refused: a system door on a\n * credential-bearing resource should be exactly as wide as its one use.\n *\n * ⚠️ KNOWN CONSEQUENCE, stated rather than discovered later: the role-ceiling gate in\n * `buildOAuthClientMintHandlers` lives on the API_CALL CREATE variant, so it does NOT run on this\n * door. The registration endpoint therefore carries that duty itself — it REFUSES a request that\n * mentions `roles` and writes `roles: []` explicitly. Any FUTURE `createAsSystem` caller on this\n * resource inherits the same obligation and gets no help from the framework in remembering it.\n */\n systemAccessPolicy: { create: ResourceSystemAccessMode.ALLOWED },\n\n coreOperations: [\n CoreResourceOperation.READ,\n CoreResourceOperation.LIST,\n CoreResourceOperation.SEARCH,\n CoreResourceOperation.CREATE,\n // DELETE is REPOSITORY_ONLY (no HTTP route): powers the composition\n // onParentDelete cascade so client rows are physically removed when their\n // owning application is deleted. Without it the cascade throws\n // ErrorType.CONFIGURATION on any application that still has OAuth-client rows.\n CoreResourceOperation.DELETE\n ],\n\n customOperation: AppOAuthClients_Operations,\n\n operationsConfiguration: {\n [CoreResourceOperation.READ]: {\n variants: [\n {\n variantType: ResourceOperationVariantType.API_CALL,\n isDefault: true,\n roles: [CORE_APP_ROLES.APP_ADMIN_SUPER_ADMIN], // Admin-only operation\n riskLevel: ResourceOperationRiskLevel.LOW,\n }\n ]\n },\n\n [CoreResourceOperation.LIST]: {\n variants: [\n {\n variantType: ResourceOperationVariantType.API_CALL,\n isDefault: true,\n roles: [CORE_APP_ROLES.APP_ADMIN_SUPER_ADMIN], // Admin-only operation\n riskLevel: ResourceOperationRiskLevel.LOW,\n }\n ]\n },\n\n [CoreResourceOperation.SEARCH]: {\n variants: [\n {\n variantType: ResourceOperationVariantType.API_CALL,\n isDefault: true,\n roles: [CORE_APP_ROLES.APP_ADMIN_SUPER_ADMIN],\n riskLevel: ResourceOperationRiskLevel.LOW,\n isSearchable: false,\n searchableFields: [],\n searchableOptions: { caseSensitive: false, fullMatchOnly: false },\n filterFields: APP_OAUTH_CLIENTS_ADMIN_FILTER_FIELDS,\n sortFields: APP_OAUTH_CLIENTS_ADMIN_SORT_FIELDS,\n maxPaginatedResultPerPageLimit: 100,\n }\n ],\n },\n\n [CoreResourceOperation.CREATE]: {\n variants: [\n {\n variantType: ResourceOperationVariantType.API_CALL,\n isDefault: true,\n roles: [CORE_APP_ROLES.APP_ADMIN_SUPER_ADMIN], // Admin-only operation\n riskLevel: ResourceOperationRiskLevel.HIGH,\n // requestDto auto-derived from decorators\n customResponseDto: OAuthClientApplicationSchema.extend({\n plainSecret: z.string().min(1).isEphemeral()\n }),\n }\n ],\n userNotifications: [\n {\n target: CoreUserNotificationTarget.APPLICATION_ADMINISTRATOR,\n channel: CoreUserNotificationChannel.EMAIL,\n }\n ]\n },\n\n // Internal-only (REPOSITORY_ONLY, no HTTP route): powers the composition\n // onParentDelete cascade so OAuth-client rows are physically removed when their\n // owning application is deleted. Without a DELETE op the cascade\n // (deleteChildrenImmediate) throws ErrorType.CONFIGURATION on any application\n // that still has client rows. Super-admin/HIGH: the app OAuth-client admin tier.\n [CoreResourceOperation.DELETE]: {\n variants: [\n {\n variantType: ResourceOperationVariantType.REPOSITORY_ONLY,\n isDefault: true,\n roles: [CORE_APP_ROLES.APP_ADMIN_SUPER_ADMIN],\n riskLevel: ResourceOperationRiskLevel.HIGH,\n }\n ],\n },\n\n /**\n * ACTIVE → EXPIRED, dispatched by the credential-expiry sweep once `expiresAt` has passed\n * (#413). INTERNAL_CALL, so no HTTP route is mounted and no frontend affordance is offered:\n * the sweep is the only caller, and there is no reason for a human to declare that a date has\n * passed.\n *\n * It exists so the sweep writes through a guarded door rather than setting `status` directly.\n * The ACTIVE-only precondition lives in the paired prefix implementation\n * (`oauth-clients.custom-impl.backend.service.ts`) — an INACTIVE client was retired by an\n * administrator, and relabelling it EXPIRED would erase who ended it.\n */\n [AppOAuthClients_Operations.EXPIRE]: {\n variants: [\n {\n variantType: ResourceOperationVariantType.INTERNAL_CALL,\n isDefault: true,\n roles: [CORE_APP_ROLES.APP_ADMIN_SUPER_ADMIN],\n riskLevel: ResourceOperationRiskLevel.LOW,\n resourceOperationLike: CoreResourceOperation.UPDATE,\n // EMPTY BY CONTRACT, not by omission. The credential-expiry sweep dispatches this verb with `{}`\n // and the paired prefix implementation forces the status transition itself, so there is no field\n // a caller may supply. Declaring nothing is NOT the same as declaring this: an operation without\n // a `requestDto` inherits the resource's ENTIRE update contract, which would let an INTERNAL_CALL\n // that accepts nothing advertise every field — `status` included, the one field this verb owns.\n requestDto: z.object({}),\n }\n ],\n },\n\n [AppOAuthClients_Operations.ROTATE]: {\n variants: [\n {\n variantType: ResourceOperationVariantType.API_CALL,\n isDefault: true,\n roles: [CORE_APP_ROLES.APP_ADMIN_SUPER_ADMIN], // Admin-only operation\n riskLevel: ResourceOperationRiskLevel.HIGH,\n // ROTATE is a secret handback plus a caller-chosen cutover. The default\n // invalidation boundary is now, while a future boundary creates a bounded\n // overlap. Once that boundary passes, the previous secret cannot be\n // restored. An unauthorized caller also walks away with the replacement\n // credential, so a live session alone is deliberately insufficient.\n //\n // Its sibling REGENERATE is NOT gated, and the difference is the whole criterion: a\n // regenerate \"keeps the prior secret working\" (see its own declaration), so it is additive\n // and recoverable. Gate the irreversible, not merely the sensitive.\n //\n // assurance-control: WILDO.IDENTITY.STEP_UP_AUTHENTICATION — re-proof of identity before a\n // high-impact action.\n requiresStepUpAuthentication: true,\n resourceOperationLike: CoreResourceOperation.UPDATE,\n requestDto: z.object({\n oldSecretInvalidationDate: z.date().min(new Date(), 'Invalidation date must be in the future or now').default(() => new Date())\n }),\n customResponseDto: OAuthClientApplicationSchema.extend({\n plainSecret: z.string().min(1).isEphemeral(),\n oldClientId: z.string(),\n oldSecretInvalidationDate: z.date()\n }),\n }\n ],\n userNotifications: [\n {\n target: CoreUserNotificationTarget.APPLICATION_ADMINISTRATOR,\n channel: CoreUserNotificationChannel.EMAIL,\n }\n ]\n },\n\n [AppOAuthClients_Operations.REGENERATE]: {\n variants: [\n {\n variantType: ResourceOperationVariantType.API_CALL,\n isDefault: true,\n roles: [CORE_APP_ROLES.APP_ADMIN_SUPER_ADMIN], // Admin-only operation\n riskLevel: ResourceOperationRiskLevel.MEDIUM,\n resourceOperationLike: CoreResourceOperation.UPDATE,\n // REGENERATE mints and hands over a LIVE credential, so it needs an audit row — but its\n // MEDIUM risk sits below the automatic HIGH/CRITICAL floor, which is why it previously\n // recorded nothing on either axis while its HIGH sibling ROTATE recorded the operation.\n // MEDIUM is correct on the UI axis (no danger-zone affordance for a reissue that keeps\n // the prior secret working) and wrong on the evidence axis; this declaration is exactly\n // that divergence. Raising `riskLevel` instead would buy the row by mis-declaring the\n // verb's danger. Same reasoning as `organizationMembers | UPDATE`.\n // assurance-control: WILDO.SECRETS.DISCLOSURE_AUDIT — credential issuance is attributable.\n auditableEvent: { auditBelowRiskFloor: true },\n // REGENERATE reissues the secret and nothing else — it takes no caller input\n // (contrast ROTATE, which accepts `oldSecretInvalidationDate`). Without this the\n // auto-derived UPDATE contract would apply: the reissue prefix returns\n // `{ ...input, hashedSecret, … }` and the dispatcher MERGES that onto the caller\n // payload, so `redirectUris`, `allowedScopes`, `allowedGrants` and `roles` would all\n // be writable through \"regenerate\". This resource exposes NO core UPDATE, so those\n // fields are meant to be immutable after minting, and the ceiling gate\n // (`assertRequestedRolesWithinCallerCeiling`) runs in the CREATE handler only.\n // A rewritable `redirectUris` on a secret-reissue route is an auth-code\n // exfiltration primitive.\n // assurance-control: WILDO.ACCESS.LEAST_PRIVILEGE — least-privilege on client credentials.\n requestDto: z.object({}),\n customResponseDto: OAuthClientApplicationSchema.extend({\n plainSecret: z.string().min(1).isEphemeral(),\n }),\n }\n ],\n userNotifications: [\n {\n target: CoreUserNotificationTarget.APPLICATION_ADMINISTRATOR,\n channel: CoreUserNotificationChannel.EMAIL,\n }\n ]\n }\n },\n});\n"]}
1
+ {"version":3,"file":"oauth-clients-application.shared.resources-config.schemas.js","sourceRoot":"","sources":["../../../../src/security/oauth-clients/oauth-clients-application.shared.resources-config.schemas.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EACL,4BAA4B,EAC5B,iBAAiB,GAClB,MAAM,gCAAgC,CAAC;AACxC,OAAO,EAAE,qBAAqB,EAAE,MAAM,mDAAmD,CAAC;AAC1F,OAAO,EAAE,0BAA0B,EAA8C,MAAM,0CAA0C,CAAC;AAClI,OAAO,EAAE,wBAAwB,EAAE,MAAM,iDAAiD,CAAC;AAC3F,OAAO,EAAE,gBAAgB,EAAE,kCAAkC,EAAE,MAAM,mDAAmD,CAAC;AACzH,OAAO,EAAE,4BAA4B,EAAE,MAAM,0CAA0C,CAAC;AACxF,OAAO,EAAE,0BAA0B,EAAE,2BAA2B,EAAE,MAAM,kDAAkD,CAAC;AAE3H,OAAO,EAAE,0CAA0C,EAAE,MAAM,iDAAiD,CAAC;AAC7G,OAAO,EAAE,cAAc,EAAE,MAAM,wCAAwC,CAAC;AAExE,uDAAuD;AAEvD,qEAAqE;AACrE,MAAM,qCAAqC,GAAG;IAC5C,MAAM,EAAE,CAAC,CAAC,IAAI,CAAC,iBAAiB,CAAC;IACjC,aAAa,EAAE,CAAC,CAAC,OAAO,EAAE;IAC1B,UAAU,EAAE,CAAC,CAAC,IAAI,EAAE,EAAE,iCAAiC;IACvD,SAAS,EAAE,CAAC,CAAC,IAAI,EAAE,EAAE,iCAAiC;CACvD,CAAC;AAEF,iDAAiD;AACjD,MAAM,mCAAmC,GAAG,CAAC,WAAW,EAAE,WAAW,EAAE,YAAY,EAAE,WAAW,EAAE,QAAQ,CAAU,CAAC;AAErH,uDAAuD;AACvD,MAAM,CAAN,IAAY,0BAIX;AAJD,WAAY,0BAA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E,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,WAAW,EAAE;qBAC7C,CAAC;iBACH;aACF;YACD,iBAAiB,EAAE;gBACjB;oBACE,MAAM,EAAE,0BAA0B,CAAC,yBAAyB;oBAC5D,OAAO,EAAE,2BAA2B,CAAC,KAAK;iBAC3C;aACF;SACF;KACF;CACF,CAAC,CAAC","sourcesContent":["/**\n * Application OAuth Clients Shared Resource Configuration\n *\n * Resource configuration for managing application-scoped registered OAuth\n * clients. FAITHFUL MIRROR of `api-keys-application.shared.resources-config.schemas.ts`\n * with a FOCUSED operation set: core READ/LIST/SEARCH/CREATE plus a REPOSITORY_ONLY\n * DELETE (onParentDelete cascade) and custom ROTATE/REGENERATE. The\n * DEACTIVATE/REACTIVATE/EXTEND_EXPIRY/USAGE_STATS custom ops from api-keys are\n * intentionally deferred to the OIDC branch.\n */\n\nimport { z } from 'zod';\nimport {\n OAuthClientApplicationSchema,\n OAuthClientStatus,\n} from './oauth-clients.shared.schemas';\nimport { CoreResourceOperation } from '../../resources/resources.shared.core.definitions';\nimport { ResourceOperationRiskLevel, ResourcePrimaryScope, ResourceRelationship } from '../../resources/resources.shared.schemas';\nimport { ResourceSystemAccessMode } from '../../resources/resources-config.shared.schemas';\nimport { CoreResourceType, coreResourceShared_FieldIdentifier } from '../../resources/resources.shared.core.definitions';\nimport { ResourceOperationVariantType } from '../../resources/resources.shared.schemas';\nimport { CoreUserNotificationTarget, CoreUserNotificationChannel } from '../../notifications/notifications.shared.schemas';\n\nimport { createResourceConfiguration_Initialization } from '../../resources/resources-config.shared.factory';\nimport { CORE_APP_ROLES } from '../authorizations/roles.shared.schemas';\n\n// Sort and filter fields for application OAuth clients\n\n// App Admin gets enhanced filter fields with additional capabilities\nconst APP_OAUTH_CLIENTS_ADMIN_FILTER_FIELDS = {\n status: z.enum(OAuthClientStatus),\n hasExpiration: z.boolean(),\n lastUsedAt: z.date(), // Admin can filter by last usage\n expiresAt: z.date(), // Admin can filter by expiration\n};\n\n// App Admin gets additional sorting capabilities\nconst APP_OAUTH_CLIENTS_ADMIN_SORT_FIELDS = ['createdAt', 'updatedAt', 'lastUsedAt', 'expiresAt', 'status'] as const;\n\n// Custom operations enum for application OAuth clients\nexport enum AppOAuthClients_Operations {\n ROTATE = 'rotate', // Generate new secret and invalidate old one\n REGENERATE = 'regenerate', // Generate new secret without invalidating old one\n EXPIRE = 'expire', // ACTIVE → EXPIRED once `expiresAt` has passed (dispatched by the sweep, not by an operator)\n}\n\ntype AppOAuthClientsCoreOperations =\n | CoreResourceOperation.READ\n | CoreResourceOperation.LIST\n | CoreResourceOperation.SEARCH\n | CoreResourceOperation.CREATE\n | CoreResourceOperation.DELETE;\n\n/*\nApplication OAuth Clients Resource Configuration Factory\n*/\nexport const appOAuthClientsResourceConfiguration_InitializationFactory = (resourcesRelationships: ResourceRelationship[]) => createResourceConfiguration_Initialization<\n typeof AppOAuthClients_Operations,\n AppOAuthClientsCoreOperations,\n typeof OAuthClientApplicationSchema\n>({\n mainSchema: OAuthClientApplicationSchema,\n resourceIdentifier: CoreResourceType.OAUTH_CLIENTS_APPLICATION,\n resourceFieldIdentifier: coreResourceShared_FieldIdentifier[CoreResourceType.OAUTH_CLIENTS_APPLICATION],\n resourceRelationships: resourcesRelationships,\n isSystemResource: true, // Application OAuth clients are a core system resource\n\n /**\n * CREATE only, and opened for exactly one caller: RFC 7591 dynamic client registration\n * (`POST /oauth/register`), which has no principal to act as and therefore cannot go through the\n * ordinary API_CALL path.\n *\n * Modelled on `anonymousUsers`, the closest analogue in the framework — another resource whose rows\n * are created for an unauthenticated caller through a server-side door, and which opts into\n * `create` and nothing else. READ / UPDATE / DELETE stay refused: a system door on a\n * credential-bearing resource should be exactly as wide as its one use.\n *\n * ⚠️ KNOWN CONSEQUENCE, stated rather than discovered later: the role-ceiling gate in\n * `buildOAuthClientMintHandlers` lives on the API_CALL CREATE variant, so it does NOT run on this\n * door. The registration endpoint therefore carries that duty itself — it REFUSES a request that\n * mentions `roles` and writes `roles: []` explicitly. Any FUTURE `createAsSystem` caller on this\n * resource inherits the same obligation and gets no help from the framework in remembering it.\n */\n systemAccessPolicy: { create: ResourceSystemAccessMode.ALLOWED },\n\n coreOperations: [\n CoreResourceOperation.READ,\n CoreResourceOperation.LIST,\n CoreResourceOperation.SEARCH,\n CoreResourceOperation.CREATE,\n // DELETE is REPOSITORY_ONLY (no HTTP route): powers the composition\n // onParentDelete cascade so client rows are physically removed when their\n // owning application is deleted. Without it the cascade throws\n // ErrorType.CONFIGURATION on any application that still has OAuth-client rows.\n CoreResourceOperation.DELETE\n ],\n\n customOperation: AppOAuthClients_Operations,\n\n operationsConfiguration: {\n [CoreResourceOperation.READ]: {\n variants: [\n {\n variantType: ResourceOperationVariantType.API_CALL,\n isDefault: true,\n roles: [CORE_APP_ROLES.APP_ADMIN_SUPER_ADMIN], // Admin-only operation\n riskLevel: ResourceOperationRiskLevel.LOW,\n }\n ]\n },\n\n [CoreResourceOperation.LIST]: {\n variants: [\n {\n variantType: ResourceOperationVariantType.API_CALL,\n isDefault: true,\n roles: [CORE_APP_ROLES.APP_ADMIN_SUPER_ADMIN], // Admin-only operation\n riskLevel: ResourceOperationRiskLevel.LOW,\n }\n ]\n },\n\n [CoreResourceOperation.SEARCH]: {\n variants: [\n {\n variantType: ResourceOperationVariantType.API_CALL,\n isDefault: true,\n roles: [CORE_APP_ROLES.APP_ADMIN_SUPER_ADMIN],\n riskLevel: ResourceOperationRiskLevel.LOW,\n isSearchable: false,\n searchableFields: [],\n searchableOptions: { caseSensitive: false, fullMatchOnly: false },\n filterFields: APP_OAUTH_CLIENTS_ADMIN_FILTER_FIELDS,\n sortFields: APP_OAUTH_CLIENTS_ADMIN_SORT_FIELDS,\n maxPaginatedResultPerPageLimit: 100,\n }\n ],\n },\n\n [CoreResourceOperation.CREATE]: {\n variants: [\n {\n variantType: ResourceOperationVariantType.API_CALL,\n isDefault: true,\n roles: [CORE_APP_ROLES.APP_ADMIN_SUPER_ADMIN], // Admin-only operation\n riskLevel: ResourceOperationRiskLevel.HIGH,\n // requestDto auto-derived from decorators\n customResponseDto: OAuthClientApplicationSchema.extend({\n plainSecret: z.string().min(1).isEphemeral()\n }),\n }\n ],\n userNotifications: [\n {\n target: CoreUserNotificationTarget.APPLICATION_ADMINISTRATOR,\n channel: CoreUserNotificationChannel.EMAIL,\n }\n ]\n },\n\n // Internal-only (REPOSITORY_ONLY, no HTTP route): powers the composition\n // onParentDelete cascade so OAuth-client rows are physically removed when their\n // owning application is deleted. Without a DELETE op the cascade\n // (deleteChildrenImmediate) throws ErrorType.CONFIGURATION on any application\n // that still has client rows. Super-admin/HIGH: the app OAuth-client admin tier.\n [CoreResourceOperation.DELETE]: {\n variants: [\n {\n variantType: ResourceOperationVariantType.REPOSITORY_ONLY,\n isDefault: true,\n roles: [CORE_APP_ROLES.APP_ADMIN_SUPER_ADMIN],\n riskLevel: ResourceOperationRiskLevel.HIGH,\n }\n ],\n },\n\n /**\n * ACTIVE → EXPIRED, dispatched by the credential-expiry sweep once `expiresAt` has passed\n * (#413). INTERNAL_CALL, so no HTTP route is mounted and no frontend affordance is offered:\n * the sweep is the only caller, and there is no reason for a human to declare that a date has\n * passed.\n *\n * It exists so the sweep writes through a guarded door rather than setting `status` directly.\n * The ACTIVE-only precondition lives in the paired prefix implementation\n * (`oauth-clients.custom-impl.backend.service.ts`) — an INACTIVE client was retired by an\n * administrator, and relabelling it EXPIRED would erase who ended it.\n */\n [AppOAuthClients_Operations.EXPIRE]: {\n variants: [\n {\n variantType: ResourceOperationVariantType.INTERNAL_CALL,\n isDefault: true,\n roles: [CORE_APP_ROLES.APP_ADMIN_SUPER_ADMIN],\n riskLevel: ResourceOperationRiskLevel.LOW,\n resourceOperationLike: CoreResourceOperation.UPDATE,\n // EMPTY BY CONTRACT, not by omission. The credential-expiry sweep dispatches this verb with `{}`\n // and the paired prefix implementation forces the status transition itself, so there is no field\n // a caller may supply. Declaring nothing is NOT the same as declaring this: an operation without\n // a `requestDto` inherits the resource's ENTIRE update contract, which would let an INTERNAL_CALL\n // that accepts nothing advertise every field — `status` included, the one field this verb owns.\n requestDto: z.object({}),\n }\n ],\n },\n\n [AppOAuthClients_Operations.ROTATE]: {\n variants: [\n {\n variantType: ResourceOperationVariantType.API_CALL,\n isDefault: true,\n roles: [CORE_APP_ROLES.APP_ADMIN_SUPER_ADMIN], // Admin-only operation\n riskLevel: ResourceOperationRiskLevel.HIGH,\n // ROTATE is a secret handback plus a caller-chosen cutover. The default\n // invalidation boundary is now, while a future boundary creates a bounded\n // overlap. Once that boundary passes, the previous secret cannot be\n // restored. An unauthorized caller also walks away with the replacement\n // credential, so a live session alone is deliberately insufficient.\n //\n // Its sibling REGENERATE is NOT gated, and the difference is the whole criterion: a\n // regenerate \"keeps the prior secret working\" (see its own declaration), so it is additive\n // and recoverable. Gate the irreversible, not merely the sensitive.\n //\n // assurance-control: WILDO.IDENTITY.STEP_UP_AUTHENTICATION — re-proof of identity before a\n // high-impact action.\n requiresStepUpAuthentication: true,\n resourceOperationLike: CoreResourceOperation.UPDATE,\n requestDto: z.object({\n oldSecretInvalidationDate: z.date().min(new Date(), 'Invalidation date must be in the future or now').default(() => new Date())\n }),\n customResponseDto: OAuthClientApplicationSchema.extend({\n plainSecret: z.string().min(1).isEphemeral(),\n oldClientId: z.string(),\n oldSecretInvalidationDate: z.date()\n }),\n }\n ],\n userNotifications: [\n {\n target: CoreUserNotificationTarget.APPLICATION_ADMINISTRATOR,\n channel: CoreUserNotificationChannel.EMAIL,\n }\n ]\n },\n\n [AppOAuthClients_Operations.REGENERATE]: {\n variants: [\n {\n variantType: ResourceOperationVariantType.API_CALL,\n isDefault: true,\n roles: [CORE_APP_ROLES.APP_ADMIN_SUPER_ADMIN], // Admin-only operation\n riskLevel: ResourceOperationRiskLevel.MEDIUM,\n resourceOperationLike: CoreResourceOperation.UPDATE,\n // REGENERATE mints and hands over a LIVE credential, so it needs an audit row — but its\n // MEDIUM risk sits below the automatic HIGH/CRITICAL floor, which is why it previously\n // recorded nothing on either axis while its HIGH sibling ROTATE recorded the operation.\n // MEDIUM is correct on the UI axis (no danger-zone affordance for a reissue that keeps\n // the prior secret working) and wrong on the evidence axis; this declaration is exactly\n // that divergence. Raising `riskLevel` instead would buy the row by mis-declaring the\n // verb's danger. Same reasoning as `organizationMembers | UPDATE`.\n // assurance-control: WILDO.SECRETS.DISCLOSURE_AUDIT — credential issuance is attributable.\n auditableEvent: { auditBelowRiskFloor: true },\n // REGENERATE reissues the secret and nothing else — it takes no caller input\n // (contrast ROTATE, which accepts `oldSecretInvalidationDate`). Without this the\n // auto-derived UPDATE contract would apply: the reissue prefix returns\n // `{ ...input, hashedSecret, … }` and the dispatcher MERGES that onto the caller\n // payload, so `redirectUris`, `allowedScopes`, `allowedGrants` and `roles` would all\n // be writable through \"regenerate\". This resource exposes NO core UPDATE, so those\n // fields are meant to be immutable after minting, and the ceiling gate\n // (`assertRequestedRolesWithinCallerCeiling`) runs in the CREATE handler only.\n // A rewritable `redirectUris` on a secret-reissue route is an auth-code\n // exfiltration primitive.\n // assurance-control: WILDO.ACCESS.LEAST_PRIVILEGE — least-privilege on client credentials.\n requestDto: z.object({}),\n customResponseDto: OAuthClientApplicationSchema.extend({\n plainSecret: z.string().min(1).isEphemeral(),\n }),\n }\n ],\n userNotifications: [\n {\n target: CoreUserNotificationTarget.APPLICATION_ADMINISTRATOR,\n channel: CoreUserNotificationChannel.EMAIL,\n }\n ]\n }\n },\n});\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"oauth-clients-organization.shared.resources-config.schemas.d.ts","sourceRoot":"","sources":["../../../../../src/security/oauth-clients/oauth-clients-organization.shared.resources-config.schemas.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAEL,iBAAiB,EAClB,MAAM,gCAAgC,CAAC;AAExC,OAAO,EAAE,qBAAqB,EAAE,MAAM,mDAAmD,CAAC;AAC1F,OAAO,EAAoD,oBAAoB,EAAE,MAAM,0CAA0C,CAAC;AAMlI,OAAO,EAAE,cAAc,EAAE,cAAc,EAAE,MAAM,wCAAwC,CAAC;AA0BxF,oBAAY,0BAA0B;IACpC,MAAM,WAAW,CAAE,6CAA6C;IAChE,UAAU,eAAe,CAAE,mDAAmD;IAC9E,MAAM,WAAW;CAClB;AAED,KAAK,6BAA6B,GAC9B,qBAAqB,CAAC,IAAI,GAC1B,qBAAqB,CAAC,IAAI,GAC1B,qBAAqB,CAAC,MAAM,GAC5B,qBAAqB,CAAC,MAAM,GAC5B,qBAAqB,CAAC,MAAM,GAC5B,qBAAqB,CAAC,KAAK,CAAC;AAKhC,eAAO,MAAM,0DAA0D,GAAI,wBAAwB,oBAAoB,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;kBAwWvH,CAAC"}
1
+ {"version":3,"file":"oauth-clients-organization.shared.resources-config.schemas.d.ts","sourceRoot":"","sources":["../../../../src/security/oauth-clients/oauth-clients-organization.shared.resources-config.schemas.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAEL,iBAAiB,EAClB,MAAM,gCAAgC,CAAC;AAExC,OAAO,EAAE,qBAAqB,EAAE,MAAM,mDAAmD,CAAC;AAC1F,OAAO,EAAoD,oBAAoB,EAAE,MAAM,0CAA0C,CAAC;AAMlI,OAAO,EAAE,cAAc,EAAE,cAAc,EAAE,MAAM,wCAAwC,CAAC;AA0BxF,oBAAY,0BAA0B;IACpC,MAAM,WAAW,CAAE,6CAA6C;IAChE,UAAU,eAAe,CAAE,mDAAmD;IAC9E,MAAM,WAAW;CAClB;AAED,KAAK,6BAA6B,GAC9B,qBAAqB,CAAC,IAAI,GAC1B,qBAAqB,CAAC,IAAI,GAC1B,qBAAqB,CAAC,MAAM,GAC5B,qBAAqB,CAAC,MAAM,GAC5B,qBAAqB,CAAC,MAAM,GAC5B,qBAAqB,CAAC,KAAK,CAAC;AAKhC,eAAO,MAAM,0DAA0D,GAAI,wBAAwB,oBAAoB,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;kBAwWvH,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"oauth-clients-organization.shared.resources-config.schemas.js","sourceRoot":"","sources":["../../../../../src/security/oauth-clients/oauth-clients-organization.shared.resources-config.schemas.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EACL,6BAA6B,EAC7B,iBAAiB,GAClB,MAAM,gCAAgC,CAAC;AAExC,OAAO,EAAE,qBAAqB,EAAE,MAAM,mDAAmD,CAAC;AAC1F,OAAO,EAAE,0BAA0B,EAA8C,MAAM,0CAA0C,CAAC;AAClI,OAAO,EAAE,gBAAgB,EAAE,kCAAkC,EAAE,MAAM,mDAAmD,CAAC;AACzH,OAAO,EAAE,4BAA4B,EAAE,MAAM,0CAA0C,CAAC;AACxF,OAAO,EAAE,0BAA0B,EAAE,2BAA2B,EAAE,MAAM,kDAAkD,CAAC;AAE3H,OAAO,EAAE,0CAA0C,EAAE,MAAM,iDAAiD,CAAC;AAC7G,OAAO,EAAE,cAAc,EAAE,cAAc,EAAE,MAAM,wCAAwC,CAAC;AAExF,wDAAwD;AACxD,MAAM,6BAA6B,GAAG,CAAC,WAAW,EAAE,WAAW,EAAE,MAAM,EAAE,YAAY,EAAE,WAAW,CAAU,CAAC;AAE7G,sCAAsC;AACtC,MAAM,+BAA+B,GAAG;IACtC,MAAM,EAAE,CAAC,CAAC,IAAI,CAAC,iBAAiB,CAAC;IACjC,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE;IAChB,cAAc,EAAE,CAAC,CAAC,MAAM,EAAE;IAC1B,aAAa,EAAE,CAAC,CAAC,OAAO,EAAE;CAC3B,CAAC;AAEF,qEAAqE;AACrE,MAAM,qCAAqC,GAAG;IAC5C,GAAG,+BAA+B;IAClC,UAAU,E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CAAC,MAAM,CAAC,EAAE;YAC9B,QAAQ,EAAE;gBACR;oBACE,WAAW,EAAE,4BAA4B,CAAC,QAAQ;oBAClD,SAAS,EAAE,IAAI;oBACf,KAAK,EAAE,CAAC,cAAc,CAAC,UAAU,CAAC;oBAClC,SAAS,EAAE,0BAA0B,CAAC,GAAG;oBACzC,YAAY,EAAE,IAAI;oBAClB,gBAAgB,EAAE,CAAC,MAAM,EAAE,aAAa,CAAC;oBACzC,iBAAiB,EAAE,EAAE,aAAa,EAAE,KAAK,EAAE,aAAa,EAAE,KAAK,EAAE;oBACjE,YAAY,EAAE,+BAA+B;oBAC7C,UAAU,EAAE,6BAA6B;oBACzC,8BAA8B,EAAE,EAAE;iBACnC;gBACD;oBACE,WAAW,EAAE,4BAA4B,CAAC,QAAQ;oBAClD,SAAS,EAAE,KAAK;oBAChB,UAAU,EAAE,OAAO;oBACnB,KAAK,EAAE,CAAC,cAAc,CAAC,qBAAqB,CAAC;oBAC7C,SAAS,EAAE,0BAA0B,CAAC,GAAG;oBACzC,YAAY,EAAE,IAAI;oBAClB,gBAAgB,EAAE,CAAC,MAAM,EAAE,aAAa,EAAE,UAAU,CAAC;oBACrD,iBAAiB,EAAE,EAAE,aAAa,EAAE,KAAK,EAAE,aAAa,EAAE,KAAK,EAAE;oBACjE,YAAY,EAAE,qCAAqC;oBACnD,UAAU,EAAE,mCAAmC;oBAC/C,8BAA8B,EAAE,GAAG;iBACpC;aACF;SACF;KACF;CACF,CAAC,CAAC","sourcesContent":["/**\n * Organization OAuth Clients Shared Resource Configuration\n *\n * Resource configuration for managing organization-scoped registered OAuth\n * clients. FAITHFUL MIRROR of `api-keys-organization.shared.resources-config.schemas.ts`\n * with a FOCUSED operation set: core READ/LIST/SEARCH/CREATE/DELETE/COUNT plus\n * custom ROTATE/REGENERATE. The DEACTIVATE/REACTIVATE/EXTEND_EXPIRY/USAGE_STATS\n * custom ops from api-keys are intentionally deferred to the OIDC branch.\n */\n\nimport { z } from 'zod';\nimport {\n OAuthClientOrganizationSchema,\n OAuthClientStatus,\n} from './oauth-clients.shared.schemas';\n\nimport { CoreResourceOperation } from '../../resources/resources.shared.core.definitions';\nimport { ResourceOperationRiskLevel, ResourcePrimaryScope, ResourceRelationship } from '../../resources/resources.shared.schemas';\nimport { CoreResourceType, coreResourceShared_FieldIdentifier } from '../../resources/resources.shared.core.definitions';\nimport { ResourceOperationVariantType } from '../../resources/resources.shared.schemas';\nimport { CoreUserNotificationTarget, CoreUserNotificationChannel } from '../../notifications/notifications.shared.schemas';\n\nimport { createResourceConfiguration_Initialization } from '../../resources/resources-config.shared.factory';\nimport { CORE_APP_ROLES, CORE_ORG_ROLES } from '../authorizations/roles.shared.schemas';\n\n// Sort and filter fields for organization OAuth clients\nconst ORG_OAUTH_CLIENTS_SORT_FIELDS = ['createdAt', 'updatedAt', 'name', 'lastUsedAt', 'expiresAt'] as const;\n\n// Org members get basic filter fields\nconst ORG_OAUTH_CLIENTS_FILTER_FIELDS = {\n status: z.enum(OAuthClientStatus),\n name: z.string(),\n organizationId: z.string(),\n hasExpiration: z.boolean(),\n};\n\n// App Admin gets enhanced filter fields with additional capabilities\nconst ORG_OAUTH_CLIENTS_ADMIN_FILTER_FIELDS = {\n ...ORG_OAUTH_CLIENTS_FILTER_FIELDS,\n lastUsedAt: z.date(), // Admin can filter by last usage\n expiresAt: z.date(), // Admin can filter by expiration\n createdAt: z.date(), // Admin can filter by creation date\n updatedAt: z.date(), // Admin can filter by update date\n};\n\n// App Admin gets additional sorting capabilities\nconst ORG_OAUTH_CLIENTS_ADMIN_SORT_FIELDS = [...ORG_OAUTH_CLIENTS_SORT_FIELDS, 'status'] as const;\n\n// Custom operations enum for organization OAuth clients\nexport enum OrgOAuthClients_Operations {\n ROTATE = 'rotate', // Generate new secret and invalidate old one\n REGENERATE = 'regenerate', // Generate new secret without invalidating old one\n EXPIRE = 'expire', // ACTIVE → EXPIRED once `expiresAt` has passed (dispatched by the sweep, not by an operator)\n}\n\ntype OrgOAuthClientsCoreOperations =\n | CoreResourceOperation.READ\n | CoreResourceOperation.LIST\n | CoreResourceOperation.SEARCH\n | CoreResourceOperation.CREATE\n | CoreResourceOperation.DELETE\n | CoreResourceOperation.COUNT;\n\n/*\nOrganization OAuth Clients Resource Configuration Factory\n*/\nexport const orgOAuthClientsResourceConfiguration_InitializationFactory = (resourcesRelationships: ResourceRelationship[]) => createResourceConfiguration_Initialization<\n typeof OrgOAuthClients_Operations,\n OrgOAuthClientsCoreOperations,\n typeof OAuthClientOrganizationSchema\n>({\n mainSchema: OAuthClientOrganizationSchema,\n resourceIdentifier: CoreResourceType.OAUTH_CLIENTS_ORGANIZATION,\n resourceFieldIdentifier: coreResourceShared_FieldIdentifier[CoreResourceType.OAUTH_CLIENTS_ORGANIZATION],\n resourceRelationships: resourcesRelationships,\n isSystemResource: true, // Organization OAuth clients are a core system resource\n\n coreOperations: [\n CoreResourceOperation.READ,\n CoreResourceOperation.LIST,\n CoreResourceOperation.SEARCH,\n CoreResourceOperation.CREATE,\n CoreResourceOperation.DELETE,\n CoreResourceOperation.COUNT,\n ],\n\n customOperation: OrgOAuthClients_Operations,\n\n operationsConfiguration: {\n [CoreResourceOperation.COUNT]: {\n variants: [\n {\n // Feature usage accounting counts org OAuth clients through the\n // repository layer. This operation does not need public HTTP exposure.\n variantType: ResourceOperationVariantType.REPOSITORY_ONLY,\n isDefault: true,\n roles: [CORE_ORG_ROLES.ORG_MEMBER],\n riskLevel: ResourceOperationRiskLevel.LOW,\n },\n ],\n },\n\n [CoreResourceOperation.READ]: {\n variants: [\n {\n variantType: ResourceOperationVariantType.API_CALL,\n isDefault: true,\n roles: [CORE_ORG_ROLES.ORG_ADMIN], // Organization admins can view\n riskLevel: ResourceOperationRiskLevel.LOW,\n },\n {\n variantType: ResourceOperationVariantType.API_CALL,\n isDefault: false,\n variantKey: \"admin\",\n roles: [CORE_APP_ROLES.APP_ADMIN_SUPER_ADMIN], // App admins can also view\n riskLevel: ResourceOperationRiskLevel.LOW,\n }\n ]\n },\n\n [CoreResourceOperation.LIST]: {\n variants: [\n {\n variantType: ResourceOperationVariantType.API_CALL,\n isDefault: true,\n roles: [CORE_ORG_ROLES.ORG_MEMBER], // Org members can list to see clients\n riskLevel: ResourceOperationRiskLevel.LOW,\n },\n {\n variantType: ResourceOperationVariantType.API_CALL,\n isDefault: false,\n variantKey: \"admin\",\n roles: [CORE_APP_ROLES.APP_ADMIN_SUPER_ADMIN], // App admins can also list\n riskLevel: ResourceOperationRiskLevel.LOW,\n }\n ]\n },\n\n [CoreResourceOperation.CREATE]: {\n variants: [\n {\n variantType: ResourceOperationVariantType.API_CALL,\n isDefault: true,\n roles: [CORE_ORG_ROLES.ORG_ADMIN], // Only org admins can create clients\n riskLevel: ResourceOperationRiskLevel.HIGH,\n // requestDto auto-derived from decorators\n customResponseDto: OAuthClientOrganizationSchema.extend({\n plainSecret: z.string().min(1).isEphemeral()\n }),\n },\n {\n variantType: ResourceOperationVariantType.API_CALL,\n isDefault: false,\n variantKey: \"admin\",\n roles: [CORE_APP_ROLES.APP_ADMIN_SUPER_ADMIN], // App admins can create for any org\n riskLevel: ResourceOperationRiskLevel.HIGH,\n // Per-variant DTOs are NOT inherited from the default variant — each\n // variant builds its own. Without this, the admin response falls back to\n // `mainSchema` and silently strips the one-time `plainSecret` (it exists\n // nowhere else after this response — only its SHA-256 hash is persisted).\n // Security decision: an app-super-admin creating a client for another org\n // DOES receive the plaintext so they can relay it to the org. Mirror of\n // the default variant's `customResponseDto` above — keep in sync.\n customResponseDto: OAuthClientOrganizationSchema.extend({\n plainSecret: z.string().min(1).isEphemeral()\n }),\n }\n ],\n userNotifications: [\n {\n target: CoreUserNotificationTarget.ORGANIZATION_ADMINISTRATIVE,\n channel: CoreUserNotificationChannel.EMAIL,\n },\n {\n target: CoreUserNotificationTarget.USER_SELF,\n channel: CoreUserNotificationChannel.FRONT_END_SUCCESS,\n }\n ]\n },\n\n [CoreResourceOperation.DELETE]: {\n variants: [\n {\n variantType: ResourceOperationVariantType.API_CALL,\n isDefault: true,\n roles: [CORE_ORG_ROLES.ORG_ADMIN], // Only org admins can delete clients\n riskLevel: ResourceOperationRiskLevel.HIGH,\n haveBulkOperation: true,\n },\n {\n variantType: ResourceOperationVariantType.API_CALL,\n isDefault: false,\n variantKey: \"admin\",\n roles: [CORE_APP_ROLES.APP_ADMIN_SUPER_ADMIN], // App admins can delete any org clients\n riskLevel: ResourceOperationRiskLevel.HIGH,\n haveBulkOperation: true,\n }\n ],\n userNotifications: [\n {\n target: CoreUserNotificationTarget.ORGANIZATION_ADMINISTRATIVE,\n channel: CoreUserNotificationChannel.EMAIL,\n },\n {\n target: CoreUserNotificationTarget.USER_SELF,\n channel: CoreUserNotificationChannel.FRONT_END_SUCCESS,\n }\n ]\n },\n\n /**\n * ACTIVE → EXPIRED, dispatched by the credential-expiry sweep once `expiresAt` has passed\n * (#413). INTERNAL_CALL, so no HTTP route is mounted and no frontend affordance is offered:\n * the sweep is the only caller, and there is no reason for a human to declare that a date has\n * passed.\n *\n * It exists so the sweep writes through a guarded door rather than setting `status` directly.\n * The ACTIVE-only precondition lives in the paired prefix implementation\n * (`oauth-clients.custom-impl.backend.service.ts`) — an INACTIVE client was retired by an\n * administrator, and relabelling it EXPIRED would erase who ended it.\n */\n [OrgOAuthClients_Operations.EXPIRE]: {\n variants: [\n {\n variantType: ResourceOperationVariantType.INTERNAL_CALL,\n isDefault: true,\n roles: [CORE_APP_ROLES.APP_ADMIN_SUPER_ADMIN],\n riskLevel: ResourceOperationRiskLevel.LOW,\n resourceOperationLike: CoreResourceOperation.UPDATE,\n // EMPTY BY CONTRACT, not by omission. The credential-expiry sweep dispatches this verb with `{}`\n // and the paired prefix implementation forces the status transition itself, so there is no field\n // a caller may supply. Declaring nothing is NOT the same as declaring this: an operation without\n // a `requestDto` inherits the resource's ENTIRE update contract, which would let an INTERNAL_CALL\n // that accepts nothing advertise every field — `status` included, the one field this verb owns.\n requestDto: z.object({}),\n }\n ],\n },\n\n [OrgOAuthClients_Operations.ROTATE]: {\n variants: [\n {\n variantType: ResourceOperationVariantType.API_CALL,\n isDefault: true,\n roles: [CORE_ORG_ROLES.ORG_ADMIN], // Only org admins can rotate secrets\n riskLevel: ResourceOperationRiskLevel.HIGH,\n // ROTATE is a secret handback plus a caller-chosen cutover. The default\n // invalidation boundary is now, while a future boundary creates a bounded\n // overlap. Once that boundary passes, the previous secret cannot be\n // restored. An unauthorized caller also walks away with the replacement\n // credential, so a live session alone is deliberately insufficient.\n //\n // Its sibling REGENERATE is NOT gated, and the difference is the whole criterion: a\n // regenerate \"keeps the prior secret working\" (see its own declaration), so it is additive\n // and recoverable. Gate the irreversible, not merely the sensitive.\n //\n // assurance-control: WILDO.IDENTITY.STEP_UP_AUTHENTICATION — re-proof of identity before a\n // high-impact action.\n requiresStepUpAuthentication: true,\n resourceOperationLike: CoreResourceOperation.UPDATE,\n requestDto: z.object({\n oldSecretInvalidationDate: z.date().min(new Date(), 'Invalidation date must be in the future or now').default(() => new Date())\n }),\n customResponseDto: OAuthClientOrganizationSchema.extend({\n plainSecret: z.string().min(1).isEphemeral(),\n oldClientId: z.string(),\n oldSecretInvalidationDate: z.date()\n }),\n },\n {\n variantType: ResourceOperationVariantType.API_CALL,\n isDefault: false,\n variantKey: \"admin\",\n roles: [CORE_APP_ROLES.APP_ADMIN_SUPER_ADMIN], // App admins can rotate any org clients\n riskLevel: ResourceOperationRiskLevel.HIGH,\n // ROTATE is a secret handback plus a caller-chosen cutover. The default\n // invalidation boundary is now, while a future boundary creates a bounded\n // overlap. Once that boundary passes, the previous secret cannot be\n // restored. An unauthorized caller also walks away with the replacement\n // credential, so a live session alone is deliberately insufficient.\n //\n // Its sibling REGENERATE is NOT gated, and the difference is the whole criterion: a\n // regenerate \"keeps the prior secret working\" (see its own declaration), so it is additive\n // and recoverable. Gate the irreversible, not merely the sensitive.\n //\n // assurance-control: WILDO.IDENTITY.STEP_UP_AUTHENTICATION — re-proof of identity before a\n // high-impact action.\n requiresStepUpAuthentication: true,\n resourceOperationLike: CoreResourceOperation.UPDATE,\n // Per-variant DTOs are NOT inherited from the default variant — each\n // variant builds its own. Request AND response both MIRROR the org-admin\n // default:\n // - requestDto: an app-super-admin can choose the same future\n // `oldSecretInvalidationDate` window as an org admin. Without it the\n // admin variant would build no request DTO and the impl could only\n // default the invalidation to now — silently denying the future-window\n // capability the default variant exposes.\n // - customResponseDto: without it the admin response falls back to\n // `mainSchema` and silently strips the one-time `plainSecret` (plus the\n // rotated-out client's id + invalidation date). Security decision: an\n // app-super-admin rotating another org's client DOES receive the\n // plaintext so they can relay it to the org.\n // Keep both in sync with the default variant above.\n requestDto: z.object({\n oldSecretInvalidationDate: z.date().min(new Date(), 'Invalidation date must be in the future or now').default(() => new Date())\n }),\n customResponseDto: OAuthClientOrganizationSchema.extend({\n plainSecret: z.string().min(1).isEphemeral(),\n oldClientId: z.string(),\n oldSecretInvalidationDate: z.date()\n }),\n }\n ],\n userNotifications: [\n {\n target: CoreUserNotificationTarget.ORGANIZATION_ADMINISTRATIVE,\n channel: CoreUserNotificationChannel.EMAIL,\n },\n {\n target: CoreUserNotificationTarget.USER_SELF,\n channel: CoreUserNotificationChannel.FRONT_END_SUCCESS,\n }\n ]\n },\n\n [OrgOAuthClients_Operations.REGENERATE]: {\n variants: [\n {\n variantType: ResourceOperationVariantType.API_CALL,\n isDefault: true,\n roles: [CORE_ORG_ROLES.ORG_ADMIN], // Only org admins can regenerate secrets\n riskLevel: ResourceOperationRiskLevel.MEDIUM,\n resourceOperationLike: CoreResourceOperation.UPDATE,\n // REGENERATE mints and hands over a LIVE credential, so it needs an audit row — but its\n // MEDIUM risk sits below the automatic HIGH/CRITICAL floor, which is why it previously\n // recorded nothing on either axis while its HIGH sibling ROTATE recorded the operation.\n // MEDIUM is correct on the UI axis (no danger-zone affordance for a reissue that keeps\n // the prior secret working) and wrong on the evidence axis; this declaration is exactly\n // that divergence. Raising `riskLevel` instead would buy the row by mis-declaring the\n // verb's danger. Same reasoning as `organizationMembers | UPDATE`.\n // assurance-control: WILDO.SECRETS.DISCLOSURE_AUDIT — credential issuance is attributable.\n auditableEvent: { auditBelowRiskFloor: true },\n // REGENERATE reissues the secret and nothing else — it takes no caller input\n // (contrast ROTATE, which accepts `oldSecretInvalidationDate`). Without this the\n // auto-derived UPDATE contract would apply: the reissue prefix returns\n // `{ ...input, hashedSecret, … }` and the dispatcher MERGES that onto the caller\n // payload, so `redirectUris`, `allowedScopes`, `allowedGrants` and `roles` would all\n // be writable through \"regenerate\". This resource exposes NO core UPDATE, so those\n // fields are meant to be immutable after minting, and the ceiling gate\n // (`assertRequestedRolesWithinCallerCeiling`) runs in the CREATE handler only.\n // A rewritable `redirectUris` on a secret-reissue route is an auth-code\n // exfiltration primitive.\n // assurance-control: WILDO.ACCESS.LEAST_PRIVILEGE — least-privilege on client credentials.\n requestDto: z.object({}),\n customResponseDto: OAuthClientOrganizationSchema.extend({\n plainSecret: z.string().min(1).isEphemeral(),\n }),\n },\n {\n variantType: ResourceOperationVariantType.API_CALL,\n isDefault: false,\n variantKey: \"admin\",\n roles: [CORE_APP_ROLES.APP_ADMIN_SUPER_ADMIN], // App admins can regenerate any org clients\n riskLevel: ResourceOperationRiskLevel.MEDIUM,\n resourceOperationLike: CoreResourceOperation.UPDATE,\n // REGENERATE mints and hands over a LIVE credential, so it needs an audit row — but its\n // MEDIUM risk sits below the automatic HIGH/CRITICAL floor, which is why it previously\n // recorded nothing on either axis while its HIGH sibling ROTATE recorded the operation.\n // MEDIUM is correct on the UI axis (no danger-zone affordance for a reissue that keeps\n // the prior secret working) and wrong on the evidence axis; this declaration is exactly\n // that divergence. Raising `riskLevel` instead would buy the row by mis-declaring the\n // verb's danger. Same reasoning as `organizationMembers | UPDATE`.\n // assurance-control: WILDO.SECRETS.DISCLOSURE_AUDIT — credential issuance is attributable.\n auditableEvent: { auditBelowRiskFloor: true },\n // Per-variant DTOs are NOT inherited from the default variant — each\n // variant builds its own. Without this, the admin response falls back to\n // `mainSchema` and silently strips the one-time `plainSecret`. Security\n // decision: an app-super-admin regenerating another org's client DOES\n // receive the plaintext so they can relay it to the org. Mirror of the\n // default variant's `customResponseDto` above — keep in sync.\n // `requestDto` mirrors the default variant too: no caller input, so the\n // cross-tenant variant cannot rewrite `redirectUris` / `roles` through \"regenerate\".\n requestDto: z.object({}),\n customResponseDto: OAuthClientOrganizationSchema.extend({\n plainSecret: z.string().min(1).isEphemeral(),\n }),\n }\n ],\n userNotifications: [\n {\n target: CoreUserNotificationTarget.ORGANIZATION_ADMINISTRATIVE,\n channel: CoreUserNotificationChannel.EMAIL,\n }\n ]\n },\n\n [CoreResourceOperation.SEARCH]: {\n variants: [\n {\n variantType: ResourceOperationVariantType.API_CALL,\n isDefault: true,\n roles: [CORE_ORG_ROLES.ORG_MEMBER],\n riskLevel: ResourceOperationRiskLevel.LOW,\n isSearchable: true,\n searchableFields: ['name', 'description'],\n searchableOptions: { caseSensitive: false, fullMatchOnly: false },\n filterFields: ORG_OAUTH_CLIENTS_FILTER_FIELDS,\n sortFields: ORG_OAUTH_CLIENTS_SORT_FIELDS,\n maxPaginatedResultPerPageLimit: 50,\n },\n {\n variantType: ResourceOperationVariantType.API_CALL,\n isDefault: false,\n variantKey: \"admin\",\n roles: [CORE_APP_ROLES.APP_ADMIN_SUPER_ADMIN],\n riskLevel: ResourceOperationRiskLevel.LOW,\n isSearchable: true,\n searchableFields: ['name', 'description', 'clientId'],\n searchableOptions: { caseSensitive: false, fullMatchOnly: false },\n filterFields: ORG_OAUTH_CLIENTS_ADMIN_FILTER_FIELDS,\n sortFields: ORG_OAUTH_CLIENTS_ADMIN_SORT_FIELDS,\n maxPaginatedResultPerPageLimit: 100,\n }\n ],\n },\n },\n});\n"]}
1
+ {"version":3,"file":"oauth-clients-organization.shared.resources-config.schemas.js","sourceRoot":"","sources":["../../../../src/security/oauth-clients/oauth-clients-organization.shared.resources-config.schemas.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,EAAE,CAA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EAAE,EAAE,aAAa,EAAE,KAAK,EAAE,aAAa,EAAE,KAAK,EAAE;oBACjE,YAAY,EAAE,+BAA+B;oBAC7C,UAAU,EAAE,6BAA6B;oBACzC,8BAA8B,EAAE,EAAE;iBACnC;gBACD;oBACE,WAAW,EAAE,4BAA4B,CAAC,QAAQ;oBAClD,SAAS,EAAE,KAAK;oBAChB,UAAU,EAAE,OAAO;oBACnB,KAAK,EAAE,CAAC,cAAc,CAAC,qBAAqB,CAAC;oBAC7C,SAAS,EAAE,0BAA0B,CAAC,GAAG;oBACzC,YAAY,EAAE,IAAI;oBAClB,gBAAgB,EAAE,CAAC,MAAM,EAAE,aAAa,EAAE,UAAU,CAAC;oBACrD,iBAAiB,EAAE,EAAE,aAAa,EAAE,KAAK,EAAE,aAAa,EAAE,KAAK,EAAE;oBACjE,YAAY,EAAE,qCAAqC;oBACnD,UAAU,EAAE,mCAAmC;oBAC/C,8BAA8B,EAAE,GAAG;iBACpC;aACF;SACF;KACF;CACF,CAAC,CAAC","sourcesContent":["/**\n * Organization OAuth Clients Shared Resource Configuration\n *\n * Resource configuration for managing organization-scoped registered OAuth\n * clients. FAITHFUL MIRROR of `api-keys-organization.shared.resources-config.schemas.ts`\n * with a FOCUSED operation set: core READ/LIST/SEARCH/CREATE/DELETE/COUNT plus\n * custom ROTATE/REGENERATE. The DEACTIVATE/REACTIVATE/EXTEND_EXPIRY/USAGE_STATS\n * custom ops from api-keys are intentionally deferred to the OIDC branch.\n */\n\nimport { z } from 'zod';\nimport {\n OAuthClientOrganizationSchema,\n OAuthClientStatus,\n} from './oauth-clients.shared.schemas';\n\nimport { CoreResourceOperation } from '../../resources/resources.shared.core.definitions';\nimport { ResourceOperationRiskLevel, ResourcePrimaryScope, ResourceRelationship } from '../../resources/resources.shared.schemas';\nimport { CoreResourceType, coreResourceShared_FieldIdentifier } from '../../resources/resources.shared.core.definitions';\nimport { ResourceOperationVariantType } from '../../resources/resources.shared.schemas';\nimport { CoreUserNotificationTarget, CoreUserNotificationChannel } from '../../notifications/notifications.shared.schemas';\n\nimport { createResourceConfiguration_Initialization } from '../../resources/resources-config.shared.factory';\nimport { CORE_APP_ROLES, CORE_ORG_ROLES } from '../authorizations/roles.shared.schemas';\n\n// Sort and filter fields for organization OAuth clients\nconst ORG_OAUTH_CLIENTS_SORT_FIELDS = ['createdAt', 'updatedAt', 'name', 'lastUsedAt', 'expiresAt'] as const;\n\n// Org members get basic filter fields\nconst ORG_OAUTH_CLIENTS_FILTER_FIELDS = {\n status: z.enum(OAuthClientStatus),\n name: z.string(),\n organizationId: z.string(),\n hasExpiration: z.boolean(),\n};\n\n// App Admin gets enhanced filter fields with additional capabilities\nconst ORG_OAUTH_CLIENTS_ADMIN_FILTER_FIELDS = {\n ...ORG_OAUTH_CLIENTS_FILTER_FIELDS,\n lastUsedAt: z.date(), // Admin can filter by last usage\n expiresAt: z.date(), // Admin can filter by expiration\n createdAt: z.date(), // Admin can filter by creation date\n updatedAt: z.date(), // Admin can filter by update date\n};\n\n// App Admin gets additional sorting capabilities\nconst ORG_OAUTH_CLIENTS_ADMIN_SORT_FIELDS = [...ORG_OAUTH_CLIENTS_SORT_FIELDS, 'status'] as const;\n\n// Custom operations enum for organization OAuth clients\nexport enum OrgOAuthClients_Operations {\n ROTATE = 'rotate', // Generate new secret and invalidate old one\n REGENERATE = 'regenerate', // Generate new secret without invalidating old one\n EXPIRE = 'expire', // ACTIVE → EXPIRED once `expiresAt` has passed (dispatched by the sweep, not by an operator)\n}\n\ntype OrgOAuthClientsCoreOperations =\n | CoreResourceOperation.READ\n | CoreResourceOperation.LIST\n | CoreResourceOperation.SEARCH\n | CoreResourceOperation.CREATE\n | CoreResourceOperation.DELETE\n | CoreResourceOperation.COUNT;\n\n/*\nOrganization OAuth Clients Resource Configuration Factory\n*/\nexport const orgOAuthClientsResourceConfiguration_InitializationFactory = (resourcesRelationships: ResourceRelationship[]) => createResourceConfiguration_Initialization<\n typeof OrgOAuthClients_Operations,\n OrgOAuthClientsCoreOperations,\n typeof OAuthClientOrganizationSchema\n>({\n mainSchema: OAuthClientOrganizationSchema,\n resourceIdentifier: CoreResourceType.OAUTH_CLIENTS_ORGANIZATION,\n resourceFieldIdentifier: coreResourceShared_FieldIdentifier[CoreResourceType.OAUTH_CLIENTS_ORGANIZATION],\n resourceRelationships: resourcesRelationships,\n isSystemResource: true, // Organization OAuth clients are a core system resource\n\n coreOperations: [\n CoreResourceOperation.READ,\n CoreResourceOperation.LIST,\n CoreResourceOperation.SEARCH,\n CoreResourceOperation.CREATE,\n CoreResourceOperation.DELETE,\n CoreResourceOperation.COUNT,\n ],\n\n customOperation: OrgOAuthClients_Operations,\n\n operationsConfiguration: {\n [CoreResourceOperation.COUNT]: {\n variants: [\n {\n // Feature usage accounting counts org OAuth clients through the\n // repository layer. This operation does not need public HTTP exposure.\n variantType: ResourceOperationVariantType.REPOSITORY_ONLY,\n isDefault: true,\n roles: [CORE_ORG_ROLES.ORG_MEMBER],\n riskLevel: ResourceOperationRiskLevel.LOW,\n },\n ],\n },\n\n [CoreResourceOperation.READ]: {\n variants: [\n {\n variantType: ResourceOperationVariantType.API_CALL,\n isDefault: true,\n roles: [CORE_ORG_ROLES.ORG_ADMIN], // Organization admins can view\n riskLevel: ResourceOperationRiskLevel.LOW,\n },\n {\n variantType: ResourceOperationVariantType.API_CALL,\n isDefault: false,\n variantKey: \"admin\",\n roles: [CORE_APP_ROLES.APP_ADMIN_SUPER_ADMIN], // App admins can also view\n riskLevel: ResourceOperationRiskLevel.LOW,\n }\n ]\n },\n\n [CoreResourceOperation.LIST]: {\n variants: [\n {\n variantType: ResourceOperationVariantType.API_CALL,\n isDefault: true,\n roles: [CORE_ORG_ROLES.ORG_MEMBER], // Org members can list to see clients\n riskLevel: ResourceOperationRiskLevel.LOW,\n },\n {\n variantType: ResourceOperationVariantType.API_CALL,\n isDefault: false,\n variantKey: \"admin\",\n roles: [CORE_APP_ROLES.APP_ADMIN_SUPER_ADMIN], // App admins can also list\n riskLevel: ResourceOperationRiskLevel.LOW,\n }\n ]\n },\n\n [CoreResourceOperation.CREATE]: {\n variants: [\n {\n variantType: ResourceOperationVariantType.API_CALL,\n isDefault: true,\n roles: [CORE_ORG_ROLES.ORG_ADMIN], // Only org admins can create clients\n riskLevel: ResourceOperationRiskLevel.HIGH,\n // requestDto auto-derived from decorators\n customResponseDto: OAuthClientOrganizationSchema.extend({\n plainSecret: z.string().min(1).isEphemeral()\n }),\n },\n {\n variantType: ResourceOperationVariantType.API_CALL,\n isDefault: false,\n variantKey: \"admin\",\n roles: [CORE_APP_ROLES.APP_ADMIN_SUPER_ADMIN], // App admins can create for any org\n riskLevel: ResourceOperationRiskLevel.HIGH,\n // Per-variant DTOs are NOT inherited from the default variant — each\n // variant builds its own. Without this, the admin response falls back to\n // `mainSchema` and silently strips the one-time `plainSecret` (it exists\n // nowhere else after this response — only its SHA-256 hash is persisted).\n // Security decision: an app-super-admin creating a client for another org\n // DOES receive the plaintext so they can relay it to the org. Mirror of\n // the default variant's `customResponseDto` above — keep in sync.\n customResponseDto: OAuthClientOrganizationSchema.extend({\n plainSecret: z.string().min(1).isEphemeral()\n }),\n }\n ],\n userNotifications: [\n {\n target: CoreUserNotificationTarget.ORGANIZATION_ADMINISTRATIVE,\n channel: CoreUserNotificationChannel.EMAIL,\n },\n {\n target: CoreUserNotificationTarget.USER_SELF,\n channel: CoreUserNotificationChannel.FRONT_END_SUCCESS,\n }\n ]\n },\n\n [CoreResourceOperation.DELETE]: {\n variants: [\n {\n variantType: ResourceOperationVariantType.API_CALL,\n isDefault: true,\n roles: [CORE_ORG_ROLES.ORG_ADMIN], // Only org admins can delete clients\n riskLevel: ResourceOperationRiskLevel.HIGH,\n haveBulkOperation: true,\n },\n {\n variantType: ResourceOperationVariantType.API_CALL,\n isDefault: false,\n variantKey: \"admin\",\n roles: [CORE_APP_ROLES.APP_ADMIN_SUPER_ADMIN], // App admins can delete any org clients\n riskLevel: ResourceOperationRiskLevel.HIGH,\n haveBulkOperation: true,\n }\n ],\n userNotifications: [\n {\n target: CoreUserNotificationTarget.ORGANIZATION_ADMINISTRATIVE,\n channel: CoreUserNotificationChannel.EMAIL,\n },\n {\n target: CoreUserNotificationTarget.USER_SELF,\n channel: CoreUserNotificationChannel.FRONT_END_SUCCESS,\n }\n ]\n },\n\n /**\n * ACTIVE → EXPIRED, dispatched by the credential-expiry sweep once `expiresAt` has passed\n * (#413). INTERNAL_CALL, so no HTTP route is mounted and no frontend affordance is offered:\n * the sweep is the only caller, and there is no reason for a human to declare that a date has\n * passed.\n *\n * It exists so the sweep writes through a guarded door rather than setting `status` directly.\n * The ACTIVE-only precondition lives in the paired prefix implementation\n * (`oauth-clients.custom-impl.backend.service.ts`) — an INACTIVE client was retired by an\n * administrator, and relabelling it EXPIRED would erase who ended it.\n */\n [OrgOAuthClients_Operations.EXPIRE]: {\n variants: [\n {\n variantType: ResourceOperationVariantType.INTERNAL_CALL,\n isDefault: true,\n roles: [CORE_APP_ROLES.APP_ADMIN_SUPER_ADMIN],\n riskLevel: ResourceOperationRiskLevel.LOW,\n resourceOperationLike: CoreResourceOperation.UPDATE,\n // EMPTY BY CONTRACT, not by omission. The credential-expiry sweep dispatches this verb with `{}`\n // and the paired prefix implementation forces the status transition itself, so there is no field\n // a caller may supply. Declaring nothing is NOT the same as declaring this: an operation without\n // a `requestDto` inherits the resource's ENTIRE update contract, which would let an INTERNAL_CALL\n // that accepts nothing advertise every field — `status` included, the one field this verb owns.\n requestDto: z.object({}),\n }\n ],\n },\n\n [OrgOAuthClients_Operations.ROTATE]: {\n variants: [\n {\n variantType: ResourceOperationVariantType.API_CALL,\n isDefault: true,\n roles: [CORE_ORG_ROLES.ORG_ADMIN], // Only org admins can rotate secrets\n riskLevel: ResourceOperationRiskLevel.HIGH,\n // ROTATE is a secret handback plus a caller-chosen cutover. The default\n // invalidation boundary is now, while a future boundary creates a bounded\n // overlap. Once that boundary passes, the previous secret cannot be\n // restored. An unauthorized caller also walks away with the replacement\n // credential, so a live session alone is deliberately insufficient.\n //\n // Its sibling REGENERATE is NOT gated, and the difference is the whole criterion: a\n // regenerate \"keeps the prior secret working\" (see its own declaration), so it is additive\n // and recoverable. Gate the irreversible, not merely the sensitive.\n //\n // assurance-control: WILDO.IDENTITY.STEP_UP_AUTHENTICATION — re-proof of identity before a\n // high-impact action.\n requiresStepUpAuthentication: true,\n resourceOperationLike: CoreResourceOperation.UPDATE,\n requestDto: z.object({\n oldSecretInvalidationDate: z.date().min(new Date(), 'Invalidation date must be in the future or now').default(() => new Date())\n }),\n customResponseDto: OAuthClientOrganizationSchema.extend({\n plainSecret: z.string().min(1).isEphemeral(),\n oldClientId: z.string(),\n oldSecretInvalidationDate: z.date()\n }),\n },\n {\n variantType: ResourceOperationVariantType.API_CALL,\n isDefault: false,\n variantKey: \"admin\",\n roles: [CORE_APP_ROLES.APP_ADMIN_SUPER_ADMIN], // App admins can rotate any org clients\n riskLevel: ResourceOperationRiskLevel.HIGH,\n // ROTATE is a secret handback plus a caller-chosen cutover. The default\n // invalidation boundary is now, while a future boundary creates a bounded\n // overlap. Once that boundary passes, the previous secret cannot be\n // restored. An unauthorized caller also walks away with the replacement\n // credential, so a live session alone is deliberately insufficient.\n //\n // Its sibling REGENERATE is NOT gated, and the difference is the whole criterion: a\n // regenerate \"keeps the prior secret working\" (see its own declaration), so it is additive\n // and recoverable. Gate the irreversible, not merely the sensitive.\n //\n // assurance-control: WILDO.IDENTITY.STEP_UP_AUTHENTICATION — re-proof of identity before a\n // high-impact action.\n requiresStepUpAuthentication: true,\n resourceOperationLike: CoreResourceOperation.UPDATE,\n // Per-variant DTOs are NOT inherited from the default variant — each\n // variant builds its own. Request AND response both MIRROR the org-admin\n // default:\n // - requestDto: an app-super-admin can choose the same future\n // `oldSecretInvalidationDate` window as an org admin. Without it the\n // admin variant would build no request DTO and the impl could only\n // default the invalidation to now — silently denying the future-window\n // capability the default variant exposes.\n // - customResponseDto: without it the admin response falls back to\n // `mainSchema` and silently strips the one-time `plainSecret` (plus the\n // rotated-out client's id + invalidation date). Security decision: an\n // app-super-admin rotating another org's client DOES receive the\n // plaintext so they can relay it to the org.\n // Keep both in sync with the default variant above.\n requestDto: z.object({\n oldSecretInvalidationDate: z.date().min(new Date(), 'Invalidation date must be in the future or now').default(() => new Date())\n }),\n customResponseDto: OAuthClientOrganizationSchema.extend({\n plainSecret: z.string().min(1).isEphemeral(),\n oldClientId: z.string(),\n oldSecretInvalidationDate: z.date()\n }),\n }\n ],\n userNotifications: [\n {\n target: CoreUserNotificationTarget.ORGANIZATION_ADMINISTRATIVE,\n channel: CoreUserNotificationChannel.EMAIL,\n },\n {\n target: CoreUserNotificationTarget.USER_SELF,\n channel: CoreUserNotificationChannel.FRONT_END_SUCCESS,\n }\n ]\n },\n\n [OrgOAuthClients_Operations.REGENERATE]: {\n variants: [\n {\n variantType: ResourceOperationVariantType.API_CALL,\n isDefault: true,\n roles: [CORE_ORG_ROLES.ORG_ADMIN], // Only org admins can regenerate secrets\n riskLevel: ResourceOperationRiskLevel.MEDIUM,\n resourceOperationLike: CoreResourceOperation.UPDATE,\n // REGENERATE mints and hands over a LIVE credential, so it needs an audit row — but its\n // MEDIUM risk sits below the automatic HIGH/CRITICAL floor, which is why it previously\n // recorded nothing on either axis while its HIGH sibling ROTATE recorded the operation.\n // MEDIUM is correct on the UI axis (no danger-zone affordance for a reissue that keeps\n // the prior secret working) and wrong on the evidence axis; this declaration is exactly\n // that divergence. Raising `riskLevel` instead would buy the row by mis-declaring the\n // verb's danger. Same reasoning as `organizationMembers | UPDATE`.\n // assurance-control: WILDO.SECRETS.DISCLOSURE_AUDIT — credential issuance is attributable.\n auditableEvent: { auditBelowRiskFloor: true },\n // REGENERATE reissues the secret and nothing else — it takes no caller input\n // (contrast ROTATE, which accepts `oldSecretInvalidationDate`). Without this the\n // auto-derived UPDATE contract would apply: the reissue prefix returns\n // `{ ...input, hashedSecret, … }` and the dispatcher MERGES that onto the caller\n // payload, so `redirectUris`, `allowedScopes`, `allowedGrants` and `roles` would all\n // be writable through \"regenerate\". This resource exposes NO core UPDATE, so those\n // fields are meant to be immutable after minting, and the ceiling gate\n // (`assertRequestedRolesWithinCallerCeiling`) runs in the CREATE handler only.\n // A rewritable `redirectUris` on a secret-reissue route is an auth-code\n // exfiltration primitive.\n // assurance-control: WILDO.ACCESS.LEAST_PRIVILEGE — least-privilege on client credentials.\n requestDto: z.object({}),\n customResponseDto: OAuthClientOrganizationSchema.extend({\n plainSecret: z.string().min(1).isEphemeral(),\n }),\n },\n {\n variantType: ResourceOperationVariantType.API_CALL,\n isDefault: false,\n variantKey: \"admin\",\n roles: [CORE_APP_ROLES.APP_ADMIN_SUPER_ADMIN], // App admins can regenerate any org clients\n riskLevel: ResourceOperationRiskLevel.MEDIUM,\n resourceOperationLike: CoreResourceOperation.UPDATE,\n // REGENERATE mints and hands over a LIVE credential, so it needs an audit row — but its\n // MEDIUM risk sits below the automatic HIGH/CRITICAL floor, which is why it previously\n // recorded nothing on either axis while its HIGH sibling ROTATE recorded the operation.\n // MEDIUM is correct on the UI axis (no danger-zone affordance for a reissue that keeps\n // the prior secret working) and wrong on the evidence axis; this declaration is exactly\n // that divergence. Raising `riskLevel` instead would buy the row by mis-declaring the\n // verb's danger. Same reasoning as `organizationMembers | UPDATE`.\n // assurance-control: WILDO.SECRETS.DISCLOSURE_AUDIT — credential issuance is attributable.\n auditableEvent: { auditBelowRiskFloor: true },\n // Per-variant DTOs are NOT inherited from the default variant — each\n // variant builds its own. Without this, the admin response falls back to\n // `mainSchema` and silently strips the one-time `plainSecret`. Security\n // decision: an app-super-admin regenerating another org's client DOES\n // receive the plaintext so they can relay it to the org. Mirror of the\n // default variant's `customResponseDto` above — keep in sync.\n // `requestDto` mirrors the default variant too: no caller input, so the\n // cross-tenant variant cannot rewrite `redirectUris` / `roles` through \"regenerate\".\n requestDto: z.object({}),\n customResponseDto: OAuthClientOrganizationSchema.extend({\n plainSecret: z.string().min(1).isEphemeral(),\n }),\n }\n ],\n userNotifications: [\n {\n target: CoreUserNotificationTarget.ORGANIZATION_ADMINISTRATIVE,\n channel: CoreUserNotificationChannel.EMAIL,\n }\n ]\n },\n\n [CoreResourceOperation.SEARCH]: {\n variants: [\n {\n variantType: ResourceOperationVariantType.API_CALL,\n isDefault: true,\n roles: [CORE_ORG_ROLES.ORG_MEMBER],\n riskLevel: ResourceOperationRiskLevel.LOW,\n isSearchable: true,\n searchableFields: ['name', 'description'],\n searchableOptions: { caseSensitive: false, fullMatchOnly: false },\n filterFields: ORG_OAUTH_CLIENTS_FILTER_FIELDS,\n sortFields: ORG_OAUTH_CLIENTS_SORT_FIELDS,\n maxPaginatedResultPerPageLimit: 50,\n },\n {\n variantType: ResourceOperationVariantType.API_CALL,\n isDefault: false,\n variantKey: \"admin\",\n roles: [CORE_APP_ROLES.APP_ADMIN_SUPER_ADMIN],\n riskLevel: ResourceOperationRiskLevel.LOW,\n isSearchable: true,\n searchableFields: ['name', 'description', 'clientId'],\n searchableOptions: { caseSensitive: false, fullMatchOnly: false },\n filterFields: ORG_OAUTH_CLIENTS_ADMIN_FILTER_FIELDS,\n sortFields: ORG_OAUTH_CLIENTS_ADMIN_SORT_FIELDS,\n maxPaginatedResultPerPageLimit: 100,\n }\n ],\n },\n },\n});\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"oauth-clients.shared.schemas.d.ts","sourceRoot":"","sources":["../../../../../src/security/oauth-clients/oauth-clients.shared.schemas.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;GAsBG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EAAE,WAAW,EAAE,MAAM,qCAAqC,CAAC;AAMlE;;;GAGG;AACH,oBAAY,iBAAiB;IAC3B,MAAM,WAAW;IACjB,QAAQ,aAAa;IACrB,OAAO,YAAY;CACpB;AAED;;;;;GAKG;AACH;;;;;;;;;;GAUG;AACH,oBAAY,6BAA6B;IACvC;;;;OAIG;IACH,QAAQ,aAAa;IACrB;;;;;OAKG;IACH,OAAO,YAAY;CACpB;AAED,oBAAY,cAAc;IACxB,kBAAkB,uBAAuB;IACzC,kBAAkB,uBAAuB;IACzC,aAAa,kBAAkB;CAChC;AAED;;;;;;;;;;;;;;;;GAgBG;AACH,oBAAY,4BAA4B;IACtC,IAAI,SAAS;IACb,mBAAmB,wBAAwB;IAC3C,kBAAkB,uBAAuB;CAC1C;AAED;;;;;GAKG;AACH,wBAAgB,qCAAqC,CAAC,MAAM,EAAE,4BAA4B,GAAG,OAAO,CAEnG;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2DG;AAaH,eAAO,MAAM,8BAA8B,EAAE,WAAW,CAAC,MAAM,CAiB7D,CAAC;AAeH,wBAAgB,sBAAsB,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAsB7D;AAMD;;;;;;;;;;;;GAYG;AACH,eAAO,MAAM,qBAAqB;;;;;;;;;;;;;;;;;;;;;;;;;iBA0LhC,CAAC;AAEH,MAAM,MAAM,eAAe,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,qBAAqB,CAAC,CAAC;AAEpE,eAAO,MAAM,6BAA6B;;;;;;;;;;;;;;;;;;;;;;;;;;iBAGxC,CAAC;AAEH,MAAM,MAAM,uBAAuB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,6BAA6B,CAAC,CAAC;AAEpF,eAAO,MAAM,4BAA4B;;;;;;;;;;;;;;;;;;;;;;;;;;iBAGvC,CAAC;AAEH,MAAM,MAAM,sBAAsB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,4BAA4B,CAAC,CAAC"}
1
+ {"version":3,"file":"oauth-clients.shared.schemas.d.ts","sourceRoot":"","sources":["../../../../src/security/oauth-clients/oauth-clients.shared.schemas.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;GAsBG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,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AAC,OAAO,4BAA4B,CAAC,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"oauth-clients.shared.schemas.js","sourceRoot":"","sources":["../../../../../src/security/oauth-clients/oauth-clients.shared.schemas.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;GAsBG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,WAAW,EAAE,MAAM,wCAAwC,CAAC;AACrE,OAAO,EAAE,WAAW,EAAE,MAAM,qCAAqC,CAAC;AAElE,kCAAkC;AAClC,qBAAqB;AACrB,kCAAkC;AAElC;;;GAGG;AACH,MAAM,CAAN,IAAY,iBAIX;AAJD,WAAY,iBAAiB;IAC3B,sCAAiB,CAAA;IACjB,0CAAqB,CAAA;IACrB,wCAAmB,CAAA;AACrB,CAAC,EAJW,iBAAiB,KAAjB,iBAAiB,QAI5B;AAED;;;;;GAKG;AACH;;;;;;;;;;GAUG;AACH,MAAM,CAAN,IAAY,6BAcX;AAdD,WAAY,6BAA6B;IACvC;;;;OAIG;IACH,sDAAqB,CAAA;IACrB;;;;;OAKG;IACH,oDAAmB,CAAA;AACrB,CAAC,EAdW,6BAA6B,KAA7B,6BAA6B,QAcxC;AAED,MAAM,CAAN,IAAY,cAIX;AAJD,WAAY,cAAc;IACxB,2DAAyC,CAAA;IACzC,2DAAyC,CAAA;IACzC,iDAA+B,CAAA;AACjC,CAAC,EAJW,cAAc,KAAd,cAAc,QAIzB;AAED;;;;;;;;;;;;;;;;GAgBG;AACH,MAAM,CAAN,IAAY,4BAIX;AAJD,WAAY,4BAA4B;IACtC,6CAAa,CAAA;IACb,2EAA2C,CAAA;IAC3C,yEAAyC,CAAA;AAC3C,CAAC,EAJW,4BAA4B,KAA5B,4BAA4B,QAIvC;AAED;;;;;GAKG;AACH,MAAM,UAAU,qCAAqC,CAAC,MAAoC;IACxF,OAAO,MAAM,KAAK,4BAA4B,CAAC,IAAI,CAAC;AACtD,CAAC;AAED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AAC,WAAW,EAAE,CAAC,YAAY,EAAE,CAAC,cAAc,EAAE,CAAC,iBAAiB,EAAE;CACpG,CAAC,CAAC;AAIH,MAAM,CAAC,MAAM,4BAA4B,GAAG,qBAAqB,CAAC,MAAM,CAAC;IACvE,KAAK,EAAE,CAAC,CAAC,OAAO,CAAC,WAAW,CAAC,WAAW,CAAC;IACzC,aAAa,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,WAAW,EAAE,CAAC,YAAY,EAAE,CAAC,cAAc,EAAE,CAAC,iBAAiB,EAAE;CACnG,CAAC,CAAC","sourcesContent":["/**\n * OAuth Client Shared Schemas\n *\n * Frontend/backend shared schemas + DTOs for the registered OAuth-client\n * credential resource (`organizationOAuthClients`, `applicationOAuthClients`).\n * Backend-specific logic (secret minting/hashing, mint pipeline) stays in\n * saas-backend-lib.\n *\n * This resource is a FAITHFUL MIRROR of the api-keys resource\n * (`api-keys.shared.schemas.ts`): the same long-lived secret + rotation-grace\n * shape, the same server-managed strip-seam contract, the same org|app scope\n * split. It exists as its OWN resource (not a variant of api-keys) because the\n * request-auth choke point routes a presented secret to a DISTINCT principal\n * by the plaintext prefix (`oc_org_`/`oc_app_` vs the api-key `sk_org_`/`sk_app_`)\n * — an OAuth client and an api-key both authenticate the SAME machine principal\n * (`ORGANIZATION_MACHINE` / `APPLICATION_MACHINE`); they are distinct credential types, an api-key acts\n * as an api-key principal.\n *\n * OIDC authorization code, interactive consent, persistent consent grants,\n * exact redirect allowlists and public/confidential client classification are\n * implemented. The resource remains the registered-client authority; issued\n * codes, tokens and user consent records have their own runtime/storage owners.\n */\n\nimport { z } from 'zod';\nimport { RolesSchema } from '../authorizations/roles.shared.schemas';\nimport { ApiKeyScope } from '../api-keys/api-keys.shared.schemas';\n\n// ===============================\n// OAUTH CLIENT ENUMS\n// ===============================\n\n/**\n * Lifecycle status of a registered OAuth client. Mirrors `ApiKeyStatus`: an\n * INACTIVE or EXPIRED client cannot mint tokens at the request-auth choke point.\n */\nexport enum OAuthClientStatus {\n ACTIVE = 'active',\n INACTIVE = 'inactive',\n EXPIRED = 'expired',\n}\n\n/**\n * OAuth 2.0 grant types a registered client may be authorized to use. The trunk\n * resource ships CLIENT_CREDENTIALS (the machine-to-machine front); the\n * AUTHORIZATION_CODE / REFRESH_TOKEN arms are declared here so the OIDC branch can\n * enable them per-client via `allowedGrants` without a schema reshape.\n */\n/**\n * How a client got registered — a TRUST classification, not a bookkeeping detail.\n *\n * Kept separate from `ApiKeyScope` on purpose. `scope` answers \"which of this application's scopes\n * owns the credential\", and both of its members imply someone with standing inside the application\n * created it. This enum answers \"did anyone vouch for this client at all\", and the two questions\n * became independent the moment an anonymous caller could register one.\n *\n * semantic-literal-boundary: a closed Wildo vocabulary with one named runtime source. Every schema,\n * default, comparison and mapping over registration provenance derives from THIS enum.\n */\nexport enum OAuthClientRegistrationOrigin {\n /**\n * Created by a principal with standing in this application — an organization administrator\n * through the org-clients API, a platform operator, or a seed. **The default**, so nothing that\n * existed before dynamic registration changes posture.\n */\n OPERATOR = 'operator',\n /**\n * Self-registered by an anonymous caller at the RFC 7591 `/register` endpoint.\n *\n * The client asserted its own name and redirect URIs and proved nothing. It is granted no roles,\n * capped at identity scopes, and always faces the user's consent prompt.\n */\n DYNAMIC = 'dynamic',\n}\n\nexport enum OAuthGrantType {\n CLIENT_CREDENTIALS = 'client_credentials',\n AUTHORIZATION_CODE = 'authorization_code',\n REFRESH_TOKEN = 'refresh_token',\n}\n\n/**\n * How a registered OAuth client authenticates AT THIS APP'S token endpoint (OIDC\n * `token_endpoint_auth_method`) — the PROVIDER-side classification of OUR clients. Deliberately\n * DISTINCT from `OAuth2_TokenEndpoint_AuthMethod` in `external-connectors-models`, which describes how\n * Wildo-as-CLIENT authenticates to an EXTERNAL IdP's token endpoint (the opposite direction); the two\n * are separate concepts even though they share the OAuth wire vocabulary. Values are the OIDC-registered\n * method names advertised in the discovery document's `token_endpoint_auth_methods_supported`.\n *\n * - `NONE` — a PUBLIC client: no client secret at the token endpoint; the authorization_code exchange\n * relies on mandatory PKCE (S256) + exact redirect_uri (the OAuth 2.1 baseline for SPA / native /\n * agent clients). This is the default because a client is public unless its\n * server-side secret-retention and token authentication method are explicit.\n * - `CLIENT_SECRET_BASIC` / `CLIENT_SECRET_POST` — a CONFIDENTIAL client: it MUST present its\n * `client_secret` (via HTTP Basic, or the request body, respectively) at the token endpoint, as\n * defense-in-depth on top of PKCE. Both map to \"confidential\" for enforcement — the basic-vs-body\n * distinction is a per-request transport choice the token endpoint already accepts either way.\n */\nexport enum OAuthTokenEndpointAuthMethod {\n NONE = 'none',\n CLIENT_SECRET_BASIC = 'client_secret_basic',\n CLIENT_SECRET_POST = 'client_secret_post',\n}\n\n/**\n * The single semantic authority for the public-vs-confidential decision: a client is CONFIDENTIAL\n * (must present its secret at the token endpoint) iff its `tokenEndpointAuthMethod` is not `NONE`.\n * Every enforcement site (authorization_code secret check, revocation client-auth) derives from this\n * helper rather than re-deciding, so the classification never drifts.\n */\nexport function isConfidentialTokenEndpointAuthMethod(method: OAuthTokenEndpointAuthMethod): boolean {\n return method !== OAuthTokenEndpointAuthMethod.NONE;\n}\n\n/**\n * Safe redirect-URI policy for a registered OAuth client — the anti-open-redirect / anti-XSS gate\n * on every entry of the `redirectUris` allowlist.\n *\n * The authorization_code flow matches a request's `redirect_uri` by EXACT string against this\n * allowlist, and the authorize handler then emits the matched value as the browser's navigation\n * target (`redirect_to`). A registered entry is therefore a literal, user-navigated URL, so the\n * allowlist must never contain a scheme or shape that can execute script or redirect off-origin:\n *\n * - `https:` — allowed for any host/port (the standard for web / SPA / agent RPs).\n * - `http:` — allowed ONLY for a loopback host (`localhost` / `127.0.0.1` / `::1`), per OAuth 2.1\n * + RFC 8252 (native / CLI / dev clients); loopback is unreachable by a network\n * attacker, so plain http there is safe.\n * - a PRIVATE-USE URI scheme (`cursor:`, `com.example.app:`) — allowed, because that is how a native\n * app receives the code on a platform with no loopback listener. See below.\n * - everything else — `javascript:`, `data:`, `vbscript:`, `file:`, and plain `http:` to a\n * NON-loopback host — is REJECTED.\n * - a fragment (`#…`) is REJECTED (RFC 6749 §3.1.2: a redirect endpoint URI MUST NOT include one).\n * - embedded credentials (`https://user:pass@host`) are REJECTED (a phishing / host-confusion vector).\n * - leading/trailing whitespace is REJECTED — the WHATWG `URL` constructor silently trims it, so a\n * padded value would parse to a different string than the one exact-matched at authorize time.\n *\n * ## Private-use schemes: why they were added on 2026-08-11\n *\n * This policy previously refused every non-http(s) scheme, and the note here said to extend it\n * \"deliberately\" if an app ever needed one. A real client made that concrete: Cursor registered\n * `cursor://anysphere.cursor-mcp/oauth/callback` and was refused, which means **no native MCP client\n * using a custom-scheme callback could register with a Wildo application at all.** None of our own\n * lanes could have found it — every one of them registers `http://localhost/...`.\n *\n * The standard sanctions the pattern: native apps \"MAY use whichever redirect option suits their\n * needs best, taking into account platform-specific implementation details\", and private-use URI\n * scheme redirection is one of the three named options.\n * spec-cite: RFC 8252 § 7 and § 7.1 (Private-Use URI Scheme Redirection).\n *\n * The known weakness is NOT that such a URI is unsafe to navigate to — it is that the code may reach\n * the wrong recipient: \"A limitation of using private-use URI schemes for redirect URIs is that\n * multiple apps can typically register the same scheme, which makes it indeterminate as to which app\n * will receive the authorization code.\"\n * spec-cite: RFC 8252 § 8.1 (Protecting the Authorization Code).\n *\n * That is an interception risk, and PKCE is the mitigation the same section prescribes. This server\n * REQUIRES PKCE and advertises `S256` alone, so a code delivered to the wrong app is unusable without\n * the verifier. Refusing the scheme outright bought no protection PKCE does not already provide, and\n * cost the entire native-client ecosystem.\n *\n * What is still refused is what actually executes or reads local state — the danger is the SCHEME's\n * capability, not its unfamiliarity, so the check is a denylist of dangerous schemes rather than an\n * allowlist of known apps. An allowlist is impossible here by construction: the set of legitimate app\n * schemes is open, and every entry would be a new client the framework has to be taught about.\n *\n * Rejected alternatives: `z.string().url()` (the original guard) accepts every dangerous scheme; a\n * strict https-only rule is too tight for the native/CLI loopback flow; requiring a reverse-DNS\n * scheme (`com.example.app:`, which RFC 8252 § 7.1 RECOMMENDS) was rejected because it would still\n * refuse `cursor:` — the recommendation binds the app author, not the authorization server, and a\n * server that enforces it rejects conformant clients for a style violation.\n *\n * assurance-control: WILDO.IDENTITY.REDIRECT_TARGET_VALIDATION — registered OAuth redirect targets are constrained to\n * safe absolute URLs, closing an open-redirect / stored-XSS delegation primitive.\n */\n/*\n * EXPORTED as of 2026-09-02, and the export is the point rather than a convenience.\n *\n * This is a closed vocabulary with one named runtime source — the shape `CLAUDE.md` asks for — and it\n * was reachable by nothing outside this file, so the assurance authority basis could not attest\n * `WILDO.IDENTITY.REDIRECT_TARGET_VALIDATION` against the set the guard actually branches on. It would\n * have had to transcribe the schemes into a second list, free to drift from this one, which is the\n * failure the single-source rule exists to prevent.\n *\n * Nothing else may BRANCH on it: the validator below is the only enforcement site. A reader is a\n * reader — the basis names the members so a programme can say which schemes are refused.\n */\nexport const DANGEROUS_REDIRECT_URI_SCHEMES: ReadonlySet<string> = new Set([\n // Executes script in the navigating context — the open-redirect-to-XSS primitive this guard exists\n // to close.\n 'javascript:',\n 'vbscript:',\n // Carries its own payload, so the \"redirect target\" IS attacker-authored content.\n 'data:',\n 'blob:',\n // Reads local state rather than handing the code to an application.\n 'file:',\n 'filesystem:',\n // Browser-internal surfaces; never a native app's callback.\n 'about:',\n 'chrome:',\n 'chrome-extension:',\n 'moz-extension:',\n 'view-source:',\n]);\n\n/**\n * The WHATWG \"special\" schemes, minus the two handled explicitly above.\n *\n * These are web-platform schemes with defined network semantics — never a native app's private-use\n * callback. Refusing them is what keeps \"private-use scheme\" meaning what it says: an app-owned\n * scheme, not any string that happens to parse. `ftp:` in particular was pinned as refused before\n * private-use schemes were admitted, and it stays refused.\n */\nconst NON_CALLBACK_SPECIAL_SCHEMES: ReadonlySet<string> = new Set(['ftp:', 'ws:', 'wss:', 'file:']);\n\n/** RFC 3986 § 3.1 scheme grammar: ALPHA *( ALPHA / DIGIT / \"+\" / \"-\" / \".\" ), plus the WHATWG colon. */\nconst RFC3986_SCHEME_PATTERN = /^[a-z][a-z0-9+.-]*:$/;\n\nexport function isSafeOAuthRedirectUri(value: string): boolean {\n if (typeof value !== 'string' || value.length === 0 || value !== value.trim()) return false;\n let url: URL;\n try {\n url = new URL(value);\n } catch {\n return false;\n }\n if (url.hash) return false;\n if (url.username || url.password) return false;\n if (url.protocol === 'https:') return true;\n if (url.protocol === 'http:') {\n const host = url.hostname.toLowerCase();\n return host === 'localhost' || host === '127.0.0.1' || host === '::1' || host === '[::1]';\n }\n // A private-use scheme for a native app. Refused only when the scheme itself confers a dangerous\n // capability; the shape is otherwise held to the same rules as an https target (no fragment, no\n // embedded credentials, both checked above), and interception is answered by mandatory PKCE.\n const scheme = url.protocol.toLowerCase();\n if (DANGEROUS_REDIRECT_URI_SCHEMES.has(scheme)) return false;\n if (NON_CALLBACK_SPECIAL_SCHEMES.has(scheme)) return false;\n return RFC3986_SCHEME_PATTERN.test(scheme);\n}\n\n// ===============================\n// CORE OAUTH CLIENT SCHEMAS\n// ===============================\n\n/**\n * Base schema for extension (needs to be z.object for `.extend()` to work).\n *\n * `scope` reuses `ApiKeyScope` (ORGANIZATION|APPLICATION) — the same primary-scope\n * split as api-keys; the org/app variants narrow it to a literal + add the FK.\n *\n * SECRET + ROTATION GRACE (`hashedSecret`/`secretPrefix`/`previous*`) mirror the\n * api-key `hashedKey`/`keyPrefix`/`previous*` fields VERBATIM (same decorators,\n * same server-managed strip-seam contract). Unlike api-keys — which declare\n * `hashedKey`/`keyPrefix` on the concrete org/app variant schemas — the OAuth\n * client keeps them on the base: every scope persists the identical secret shape,\n * so a single base declaration is the honest single source of truth.\n */\nexport const OAuthClientSchemaBase = z.object({\n _id: z.string().min(1).isPrimaryKey().isSummaryField(), // == clientId\n name: z.string().min(1).max(100).isDBIndexed().isSummaryField(),\n description: z.string().max(500).optional(),\n scope: z.enum(ApiKeyScope).isDBIndexed().isSummaryField(),\n // `.isAuditEvidence()` — the roles an OAuth client acts with. Same reasoning as the API-key\n // authority field: roles are the single authorization axis, so their before/after IS the\n // evidence. assurance-control: WILDO.ACCESS.PRIVILEGE_EVIDENCE\n roles: z.array(RolesSchema).default([]).isAuditEvidence(),\n // OIDC IDENTITY scopes this client may request in the authorization_code flow (e.g. `openid`,\n // `profile`, `email`) — validated against the requested `scope` when minting the ID token /\n // serving `/oauth/userinfo`. This is IDENTITY only: it is NOT an authorization axis. Authorization\n // is roles-only (scope-based authorization was deleted 2026-07-21 — do NOT re-introduce it). Empty\n // for pure client_credentials machine clients (they carry no scopes; their access is roles-only).\n allowedScopes: z.array(z.string()).default([]),\n // Grant types this client is authorized to use. Defaults to the machine front.\n allowedGrants: z.array(z.enum(OAuthGrantType)).default([OAuthGrantType.CLIENT_CREDENTIALS]),\n // OIDC authorization_code: exact-match allowlist of redirect URIs. Empty for pure\n // client_credentials clients. An authorization request's `redirect_uri` MUST equal one of\n // these by EXACT string match (no wildcards / no substring) — the anti-open-redirect guard.\n // Each entry is additionally constrained to a SAFE absolute URL by `isSafeOAuthRedirectUri`\n // (https anywhere · http loopback only · no javascript:/data:/fragment/embedded-credentials) so a\n // malicious registered entry cannot become a stored-XSS / off-origin redirect navigation target.\n redirectUris: z\n .array(\n z.string().refine(isSafeOAuthRedirectUri, {\n message: 'redirect_uri must be an absolute https URL (or an http loopback URL) with no fragment or embedded credentials',\n }),\n )\n // Bounded. RFC 7591 sets no limit, and one is needed here because `/oauth/register` accepts this\n // array from an ANONYMOUS caller: without a ceiling a single registration can carry an arbitrary\n // number of URIs, and the per-IP registration limit bounds how MANY registrations happen, not how\n // large each one is. 50 is far above any real client — several environments times a few loopback\n // ports — so this constrains only abuse. Every entry is independently constrained by\n // `isSafeOAuthRedirectUri`, so this is a storage bound, not an authorization one.\n .max(50)\n .default([]),\n // OIDC RP-Initiated Logout 1.0: exact-match allowlist of POST-LOGOUT redirect URIs (revocation-C). When\n // an RP calls `/oauth/end-session` with a `post_logout_redirect_uri`, that value MUST equal one of these\n // by EXACT string match — the SAME anti-open-redirect discipline as `redirectUris` (no wildcards, no\n // substring). A non-matching value is refused and the OP lands the user on its own logged-out page rather\n // than redirecting back to the RP. Empty for clients that never drive an interactive logout (pure\n // client_credentials machines). Each entry is independently held to a SAFE absolute URL by\n // `isSafeOAuthRedirectUri` (https anywhere · http loopback only · no fragment/embedded-credentials), and\n // the array is `.max(50)`-bounded for the same anonymous-`/oauth/register` abuse reason as `redirectUris`.\n // spec-cite: OpenID Connect RP-Initiated Logout 1.0 §2 (`post_logout_redirect_uri` MUST have been\n // registered with the OP).\n postLogoutRedirectUris: z\n .array(\n z.string().refine(isSafeOAuthRedirectUri, {\n message: 'post_logout_redirect_uri must be an absolute https URL (or an http loopback URL) with no fragment or embedded credentials',\n }),\n )\n .max(50)\n .default([]),\n // OIDC INTERACTIVE CONSENT gate. When TRUE, the authorization_code flow requires EXPLICIT user\n // consent before a code is minted: `/oauth/authorize` returns `consent_required` (with a single-use\n // consent-request token + the client/resource/scope details) instead of auto-issuing the code, and\n // the user must approve at `/oauth/authorize/decision`. Defaults FALSE = a first-party / trusted\n // client whose consent is auto-granted (the pre-consent behavior, so machine + trusted clients are\n // UNAFFECTED). Set TRUE for a THIRD-PARTY client that acts on the user's behalf and must therefore\n // be explicitly authorized by the user before it can obtain a delegated token. The gate is\n // SERVER-owned (a client property, never a request parameter) so a third-party client cannot\n // suppress its own consent prompt.\n requiresConsent: z.boolean().default(false),\n // OIDC `token_endpoint_auth_method` — PUBLIC (`NONE`, the default: PKCE-only, no secret at the token\n // endpoint) vs CONFIDENTIAL (`CLIENT_SECRET_BASIC`/`POST`: the authorization_code exchange AND token\n // revocation REQUIRE the client to present its `client_secret`, defense-in-depth over PKCE). Default\n // `NONE` is the safe default: a server-side confidential client must opt into\n // a secret-bearing token-endpoint method explicitly.\n // Settable at create/update — flipping a client confidential simply starts requiring the secret it\n // already has. The public-vs-confidential decision is derived ONLY via\n // `isConfidentialTokenEndpointAuthMethod`, never by re-comparing the enum inline.\n tokenEndpointAuthMethod: z.enum(OAuthTokenEndpointAuthMethod).default(OAuthTokenEndpointAuthMethod.NONE).isSummaryField(),\n // `.isAuditEvidence()` — whether this client's delegated access is live.\n // assurance-control: WILDO.ACCESS.PRIVILEGE_EVIDENCE\n status: z.enum(OAuthClientStatus).default(OAuthClientStatus.ACTIVE).isDBIndexed().isSummaryField().isAuditEvidence(),\n expiresAt: z.date().optional().isDBIndexed().isSummaryField(),\n lastUsedAt: z.date().optional().isDBIndexed().excludeFromCreate().excludeFromUpdate(),\n createdAt: z.date().default(() => new Date()).isDBIndexed().isSummaryField().excludeFromCreate().excludeFromUpdate(),\n updatedAt: z.date().default(() => new Date()).isDBIndexed().excludeFromCreate().excludeFromUpdate(),\n\n // ── Client secret ─────────────────────────────────────────────────────────\n // `hashedSecret` is the lookup key for the client-credentials token exchange\n // (the request-auth choke point resolves a presented secret against it on every\n // exchange). Without an index this is an O(n) collection scan; the compound\n // unique guarantees only one active row per hash — cryptographically near-\n // impossible to collide by accident, but a uniqueness contract avoids two rows\n // being returned to the resolver on a hash collision and prevents shadow-client\n // duplicates during rotation. Backend-only (a secret hash, never surfaced except\n // once at creation via `isReturnedAtCreation`, which the mint postfix correlates\n // the one-time plaintext against). `.excludeFrom{Create,Update}()` — the client\n // never supplies it; the mint impl is the single server-side choke point.\n hashedSecret: z.string().min(1).isDBIndexed().isUnique().isBackendOnly({ isReturnedAtCreation: true }).excludeFromCreate().excludeFromUpdate(),\n // First 8 chars of the plaintext secret — persisted + shown in lists\n // (`.isSummaryField()`) so an admin can identify a client without revealing the\n // secret. Server-managed.\n secretPrefix: z.string().length(8).isSummaryField().excludeFromCreate().excludeFromUpdate(),\n\n // ── Rotation grace window ─────────────────────────────────────────────────\n // When a client secret is ROTATED or REGENERATEd, the PRIOR secret is retained\n // here so it keeps authenticating during an overlap window — callers can migrate\n // to the new secret without a hard cutover. The client-credentials exchange\n // resolves a presented secret against the current `hashedSecret` OR this\n // `previousHashedSecret` while the window is open (`previousSecretInvalidationDate`\n // is null or in the future) AND the client is ACTIVE. All three are server-managed\n // by the rotate/regenerate impls only — never client-settable\n // (`.excludeFromCreate().excludeFromUpdate()`).\n //\n // `previousHashedSecret` — `sha256` of the prior secret; the auth path looks a\n // presented secret up against it, so it is `.isDBIndexed()`. Backend-only (a\n // secret hash, never surfaced). Absent until the first rotation.\n previousHashedSecret: z.string().min(1).optional().isDBIndexed().isBackendOnly().excludeFromCreate().excludeFromUpdate(),\n // First 8 chars of the prior secret — retained for support/audit display while\n // the previous secret is still valid (not a secret, so surfaced). Overwritten on\n // the next rotation.\n previousSecretPrefix: z.string().length(8).optional().excludeFromCreate().excludeFromUpdate(),\n // When the previous secret stops authenticating. `null`/absent = no scheduled\n // invalidation (REGENERATE overlap — the prior secret stays valid until the next\n // rotation). A future date (ROTATE `oldSecretInvalidationDate`) = honored until\n // then, then rejected. `now`/past (ROTATE default) = immediate hard cutover.\n // Surfaced so operators can see when the old secret dies.\n previousSecretInvalidationDate: z.date().optional().excludeFromCreate().excludeFromUpdate(),\n\n // ── Registration access token (RFC 7592) ──────────────────────────────────\n // The credential a DYNAMICALLY REGISTERED client uses to read, update or delete\n // its own registration at the client configuration endpoint. Issued once, at\n // registration, and returned exactly once in the 201 body.\n //\n // \"registration_access_token: REQUIRED. String containing the access token to be\n // used at the client configuration endpoint to perform subsequent operations upon\n // the client registration.\" … \"The client MUST use its registration access token\n // in all calls to this endpoint as an OAuth 2.0 Bearer Token.\"\n // spec-cite: RFC 7592 §3 (Client Information Response) and §2 (Client Configuration Endpoint).\n //\n // SEPARATE FROM `hashedSecret`, deliberately, and not merely for tidiness. They\n // authenticate different things: the client secret authenticates the CLIENT at the\n // token endpoint, while this authenticates a caller's standing to administer the\n // client's own REGISTRATION. A dynamically registered client is public\n // (`token_endpoint_auth_method=none`) and never uses its secret at all, so folding\n // the two together would give a credential two unrelated powers and make\n // \"rotate the secret\" silently mean \"revoke management access\".\n //\n // ABSENT on every client that is not dynamically registered — an operator- or\n // organization-registered client is administered through the ordinary authenticated\n // resource surface, not through RFC 7592.\n //\n // `sha256` hex, matching every other token in this framework: deterministic so a\n // presented Bearer token resolves by re-hashing and matching, and safe because the\n // plaintext is 32 random bytes rather than a password.\n registrationAccessTokenHash: z.string().min(1).optional().isDBIndexed().isBackendOnly().excludeFromCreate().excludeFromUpdate(),\n // First 8 characters of the plaintext, so an operator can identify which token a\n // client holds without seeing it — the same affordance `secretPrefix` provides for\n // the client secret. Not a secret; surfaced.\n registrationAccessTokenPrefix: z.string().length(8).optional().excludeFromCreate().excludeFromUpdate(),\n\n // ── How this client came to exist ─────────────────────────────────────────\n // WHO registered this client, which is a different question from WHERE the row lives.\n //\n // Every other client on this collection was created by someone with standing in this application:\n // an organization administrator, or a platform operator. A DYNAMIC client was created by an\n // anonymous caller at the RFC 7591 `/register` endpoint, and proved nothing about itself.\n //\n // The field exists because the STORAGE LOCATION can no longer carry that meaning. A dynamically\n // registered client has no organization, so it must live on the APPLICATION collection — and\n // `scope: APPLICATION` otherwise means \"platform-operator first-party\", the most trusted posture\n // there is. Without this discriminator a stranger's client would inherit that trust purely from\n // where it was filed. `ResolvedAuthorizationClient` reads it and maps DYNAMIC to\n // `AuthorizationClientTenancy.UNAFFILIATED`, so the authorize path treats it like a CIMD client:\n // always consent, identity scopes only.\n //\n // `.excludeFromCreate().excludeFromUpdate()` is load-bearing, not hygiene: this is a TRUST\n // CLASSIFICATION, and a caller who could set it could file itself as OPERATOR. Only the\n // registration endpoint writes it, through the system door. Authenticated\n // administrative registration receives OPERATOR by default because that\n // administrator vouches for the client.\n // `.isAuditEvidence()` — a change here changes how much this client is trusted.\n // assurance-control: WILDO.ACCESS.PRIVILEGE_EVIDENCE\n registrationOrigin: z.enum(OAuthClientRegistrationOrigin)\n .default(OAuthClientRegistrationOrigin.OPERATOR)\n .isDBIndexed()\n .isSummaryField()\n .excludeFromCreate()\n .excludeFromUpdate()\n .isAuditEvidence(),\n\n});\n\nexport type OAuthClientBase = z.infer<typeof OAuthClientSchemaBase>;\n\nexport const OAuthClientOrganizationSchema = OAuthClientSchemaBase.extend({\n scope: z.literal(ApiKeyScope.ORGANIZATION),\n organizationId: z.string().min(1).isDBIndexed().isForeignKey().isSummaryField().excludeFromUpdate(),\n});\n\nexport type OAuthClientOrganization = z.infer<typeof OAuthClientOrganizationSchema>;\n\nexport const OAuthClientApplicationSchema = OAuthClientSchemaBase.extend({\n scope: z.literal(ApiKeyScope.APPLICATION),\n applicationId: z.string().min(1).isDBIndexed().isForeignKey().isSummaryField().excludeFromUpdate(),\n});\n\nexport type OAuthClientApplication = z.infer<typeof OAuthClientApplicationSchema>;\n"]}
1
+ {"version":3,"file":"oauth-clients.shared.schemas.js","sourceRoot":"","sources":["../../../../src/security/oauth-clients/oauth-clients.shared.schemas.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;GAsBG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,WAAW,EAAE,MAAM,wCAAwC,CAAC;AACrE,OAAO,EAAE,WAAW,EAAE,MAAM,qCAAqC,CAAC;AAElE,kCAAkC;AAClC,qBAAqB;AACrB,kCAAkC;AAElC;;;GAGG;AACH,MAAM,CAAN,IAAY,iBAIX;AAJD,WAAY,iBAAiB;IAC3B,sCAAiB,CAAA;IACjB,0CAAqB,CAAA;IACrB,wCAAmB,CAAA;AACrB,CAAC,EAJW,iBAAiB,KAAjB,iBAAiB,QAI5B;AAED;;;;;GAKG;AACH;;;;;;;;;;GAUG;AACH,MAAM,CAAN,IAAY,6BAcX;AAdD,WAAY,6BAA6B;IACvC;;;;OAIG;IACH,sDAAqB,CAAA;IACrB;;;;;OAKG;IACH,oDAAmB,CAAA;AACrB,CAAC,EAdW,6BAA6B,KAA7B,6BAA6B,QAcxC;AAED,MAAM,CAAN,IAAY,cAIX;AAJD,WAAY,cAAc;IACxB,2DAAyC,CAAA;IACzC,2DAAyC,CAAA;IACzC,iDAA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SACtD,OAAO,CAAC,6BAA6B,CAAC,QAAQ,CAAC;SAC/C,WAAW,EAAE;SACb,cAAc,EAAE;SAChB,iBAAiB,EAAE;SACnB,iBAAiB,EAAE;SACnB,eAAe,EAAE;CAErB,CAAC,CAAC;AAIH,MAAM,CAAC,MAAM,6BAA6B,GAAG,qBAAqB,CAAC,MAAM,CAAC;IACxE,KAAK,EAAE,CAAC,CAAC,OAAO,CAAC,WAAW,CAAC,YAAY,CAAC;IAC1C,cAAc,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,WAAW,EAAE,CAAC,YAAY,EAAE,CAAC,cAAc,EAAE,CAAC,iBAAiB,EAAE;CACpG,CAAC,CAAC;AAIH,MAAM,CAAC,MAAM,4BAA4B,GAAG,qBAAqB,CAAC,MAAM,CAAC;IACvE,KAAK,EAAE,CAAC,CAAC,OAAO,CAAC,WAAW,CAAC,WAAW,CAAC;IACzC,aAAa,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,WAAW,EAAE,CAAC,YAAY,EAAE,CAAC,cAAc,EAAE,CAAC,iBAAiB,EAAE;CACnG,CAAC,CAAC","sourcesContent":["/**\n * OAuth Client Shared Schemas\n *\n * Frontend/backend shared schemas + DTOs for the registered OAuth-client\n * credential resource (`organizationOAuthClients`, `applicationOAuthClients`).\n * Backend-specific logic (secret minting/hashing, mint pipeline) stays in\n * saas-backend-lib.\n *\n * This resource is a FAITHFUL MIRROR of the api-keys resource\n * (`api-keys.shared.schemas.ts`): the same long-lived secret + rotation-grace\n * shape, the same server-managed strip-seam contract, the same org|app scope\n * split. It exists as its OWN resource (not a variant of api-keys) because the\n * request-auth choke point routes a presented secret to a DISTINCT principal\n * by the plaintext prefix (`oc_org_`/`oc_app_` vs the api-key `sk_org_`/`sk_app_`)\n * — an OAuth client and an api-key both authenticate the SAME machine principal\n * (`ORGANIZATION_MACHINE` / `APPLICATION_MACHINE`); they are distinct credential types, an api-key acts\n * as an api-key principal.\n *\n * OIDC authorization code, interactive consent, persistent consent grants,\n * exact redirect allowlists and public/confidential client classification are\n * implemented. The resource remains the registered-client authority; issued\n * codes, tokens and user consent records have their own runtime/storage owners.\n */\n\nimport { z } from 'zod';\nimport { RolesSchema } from '../authorizations/roles.shared.schemas';\nimport { ApiKeyScope } from '../api-keys/api-keys.shared.schemas';\n\n// ===============================\n// OAUTH CLIENT ENUMS\n// ===============================\n\n/**\n * Lifecycle status of a registered OAuth client. Mirrors `ApiKeyStatus`: an\n * INACTIVE or EXPIRED client cannot mint tokens at the request-auth choke point.\n */\nexport enum OAuthClientStatus {\n ACTIVE = 'active',\n INACTIVE = 'inactive',\n EXPIRED = 'expired',\n}\n\n/**\n * OAuth 2.0 grant types a registered client may be authorized to use. The trunk\n * resource ships CLIENT_CREDENTIALS (the machine-to-machine front); the\n * AUTHORIZATION_CODE / REFRESH_TOKEN arms are declared here so the OIDC branch can\n * enable them per-client via `allowedGrants` without a schema reshape.\n */\n/**\n * How a client got registered — a TRUST classification, not a bookkeeping detail.\n *\n * Kept separate from `ApiKeyScope` on purpose. `scope` answers \"which of this application's scopes\n * owns the credential\", and both of its members imply someone with standing inside the application\n * created it. This enum answers \"did anyone vouch for this client at all\", and the two questions\n * became independent the moment an anonymous caller could register one.\n *\n * semantic-literal-boundary: a closed Wildo vocabulary with one named runtime source. Every schema,\n * default, comparison and mapping over registration provenance derives from THIS enum.\n */\nexport enum OAuthClientRegistrationOrigin {\n /**\n * Created by a principal with standing in this application — an organization administrator\n * through the org-clients API, a platform operator, or a seed. **The default**, so nothing that\n * existed before dynamic registration changes posture.\n */\n OPERATOR = 'operator',\n /**\n * Self-registered by an anonymous caller at the RFC 7591 `/register` endpoint.\n *\n * The client asserted its own name and redirect URIs and proved nothing. It is granted no roles,\n * capped at identity scopes, and always faces the user's consent prompt.\n */\n DYNAMIC = 'dynamic',\n}\n\nexport enum OAuthGrantType {\n CLIENT_CREDENTIALS = 'client_credentials',\n AUTHORIZATION_CODE = 'authorization_code',\n REFRESH_TOKEN = 'refresh_token',\n}\n\n/**\n * How a registered OAuth client authenticates AT THIS APP'S token endpoint (OIDC\n * `token_endpoint_auth_method`) — the PROVIDER-side classification of OUR clients. Deliberately\n * DISTINCT from `OAuth2_TokenEndpoint_AuthMethod` in `external-connectors-models`, which describes how\n * Wildo-as-CLIENT authenticates to an EXTERNAL IdP's token endpoint (the opposite direction); the two\n * are separate concepts even though they share the OAuth wire vocabulary. Values are the OIDC-registered\n * method names advertised in the discovery document's `token_endpoint_auth_methods_supported`.\n *\n * - `NONE` — a PUBLIC client: no client secret at the token endpoint; the authorization_code exchange\n * relies on mandatory PKCE (S256) + exact redirect_uri (the OAuth 2.1 baseline for SPA / native /\n * agent clients). This is the default because a client is public unless its\n * server-side secret-retention and token authentication method are explicit.\n * - `CLIENT_SECRET_BASIC` / `CLIENT_SECRET_POST` — a CONFIDENTIAL client: it MUST present its\n * `client_secret` (via HTTP Basic, or the request body, respectively) at the token endpoint, as\n * defense-in-depth on top of PKCE. Both map to \"confidential\" for enforcement — the basic-vs-body\n * distinction is a per-request transport choice the token endpoint already accepts either way.\n */\nexport enum OAuthTokenEndpointAuthMethod {\n NONE = 'none',\n CLIENT_SECRET_BASIC = 'client_secret_basic',\n CLIENT_SECRET_POST = 'client_secret_post',\n}\n\n/**\n * The single semantic authority for the public-vs-confidential decision: a client is CONFIDENTIAL\n * (must present its secret at the token endpoint) iff its `tokenEndpointAuthMethod` is not `NONE`.\n * Every enforcement site (authorization_code secret check, revocation client-auth) derives from this\n * helper rather than re-deciding, so the classification never drifts.\n */\nexport function isConfidentialTokenEndpointAuthMethod(method: OAuthTokenEndpointAuthMethod): boolean {\n return method !== OAuthTokenEndpointAuthMethod.NONE;\n}\n\n/**\n * Safe redirect-URI policy for a registered OAuth client — the anti-open-redirect / anti-XSS gate\n * on every entry of the `redirectUris` allowlist.\n *\n * The authorization_code flow matches a request's `redirect_uri` by EXACT string against this\n * allowlist, and the authorize handler then emits the matched value as the browser's navigation\n * target (`redirect_to`). A registered entry is therefore a literal, user-navigated URL, so the\n * allowlist must never contain a scheme or shape that can execute script or redirect off-origin:\n *\n * - `https:` — allowed for any host/port (the standard for web / SPA / agent RPs).\n * - `http:` — allowed ONLY for a loopback host (`localhost` / `127.0.0.1` / `::1`), per OAuth 2.1\n * + RFC 8252 (native / CLI / dev clients); loopback is unreachable by a network\n * attacker, so plain http there is safe.\n * - a PRIVATE-USE URI scheme (`cursor:`, `com.example.app:`) — allowed, because that is how a native\n * app receives the code on a platform with no loopback listener. See below.\n * - everything else — `javascript:`, `data:`, `vbscript:`, `file:`, and plain `http:` to a\n * NON-loopback host — is REJECTED.\n * - a fragment (`#…`) is REJECTED (RFC 6749 §3.1.2: a redirect endpoint URI MUST NOT include one).\n * - embedded credentials (`https://user:pass@host`) are REJECTED (a phishing / host-confusion vector).\n * - leading/trailing whitespace is REJECTED — the WHATWG `URL` constructor silently trims it, so a\n * padded value would parse to a different string than the one exact-matched at authorize time.\n *\n * ## Private-use schemes: why they were added on 2026-08-11\n *\n * This policy previously refused every non-http(s) scheme, and the note here said to extend it\n * \"deliberately\" if an app ever needed one. A real client made that concrete: Cursor registered\n * `cursor://anysphere.cursor-mcp/oauth/callback` and was refused, which means **no native MCP client\n * using a custom-scheme callback could register with a Wildo application at all.** None of our own\n * lanes could have found it — every one of them registers `http://localhost/...`.\n *\n * The standard sanctions the pattern: native apps \"MAY use whichever redirect option suits their\n * needs best, taking into account platform-specific implementation details\", and private-use URI\n * scheme redirection is one of the three named options.\n * spec-cite: RFC 8252 § 7 and § 7.1 (Private-Use URI Scheme Redirection).\n *\n * The known weakness is NOT that such a URI is unsafe to navigate to — it is that the code may reach\n * the wrong recipient: \"A limitation of using private-use URI schemes for redirect URIs is that\n * multiple apps can typically register the same scheme, which makes it indeterminate as to which app\n * will receive the authorization code.\"\n * spec-cite: RFC 8252 § 8.1 (Protecting the Authorization Code).\n *\n * That is an interception risk, and PKCE is the mitigation the same section prescribes. This server\n * REQUIRES PKCE and advertises `S256` alone, so a code delivered to the wrong app is unusable without\n * the verifier. Refusing the scheme outright bought no protection PKCE does not already provide, and\n * cost the entire native-client ecosystem.\n *\n * What is still refused is what actually executes or reads local state — the danger is the SCHEME's\n * capability, not its unfamiliarity, so the check is a denylist of dangerous schemes rather than an\n * allowlist of known apps. An allowlist is impossible here by construction: the set of legitimate app\n * schemes is open, and every entry would be a new client the framework has to be taught about.\n *\n * Rejected alternatives: `z.string().url()` (the original guard) accepts every dangerous scheme; a\n * strict https-only rule is too tight for the native/CLI loopback flow; requiring a reverse-DNS\n * scheme (`com.example.app:`, which RFC 8252 § 7.1 RECOMMENDS) was rejected because it would still\n * refuse `cursor:` — the recommendation binds the app author, not the authorization server, and a\n * server that enforces it rejects conformant clients for a style violation.\n *\n * assurance-control: WILDO.IDENTITY.REDIRECT_TARGET_VALIDATION — registered OAuth redirect targets are constrained to\n * safe absolute URLs, closing an open-redirect / stored-XSS delegation primitive.\n */\n/*\n * EXPORTED as of 2026-09-02, and the export is the point rather than a convenience.\n *\n * This is a closed vocabulary with one named runtime source — the shape `CLAUDE.md` asks for — and it\n * was reachable by nothing outside this file, so the assurance authority basis could not attest\n * `WILDO.IDENTITY.REDIRECT_TARGET_VALIDATION` against the set the guard actually branches on. It would\n * have had to transcribe the schemes into a second list, free to drift from this one, which is the\n * failure the single-source rule exists to prevent.\n *\n * Nothing else may BRANCH on it: the validator below is the only enforcement site. A reader is a\n * reader — the basis names the members so a programme can say which schemes are refused.\n */\nexport const DANGEROUS_REDIRECT_URI_SCHEMES: ReadonlySet<string> = new Set([\n // Executes script in the navigating context — the open-redirect-to-XSS primitive this guard exists\n // to close.\n 'javascript:',\n 'vbscript:',\n // Carries its own payload, so the \"redirect target\" IS attacker-authored content.\n 'data:',\n 'blob:',\n // Reads local state rather than handing the code to an application.\n 'file:',\n 'filesystem:',\n // Browser-internal surfaces; never a native app's callback.\n 'about:',\n 'chrome:',\n 'chrome-extension:',\n 'moz-extension:',\n 'view-source:',\n]);\n\n/**\n * The WHATWG \"special\" schemes, minus the two handled explicitly above.\n *\n * These are web-platform schemes with defined network semantics — never a native app's private-use\n * callback. Refusing them is what keeps \"private-use scheme\" meaning what it says: an app-owned\n * scheme, not any string that happens to parse. `ftp:` in particular was pinned as refused before\n * private-use schemes were admitted, and it stays refused.\n */\nconst NON_CALLBACK_SPECIAL_SCHEMES: ReadonlySet<string> = new Set(['ftp:', 'ws:', 'wss:', 'file:']);\n\n/** RFC 3986 § 3.1 scheme grammar: ALPHA *( ALPHA / DIGIT / \"+\" / \"-\" / \".\" ), plus the WHATWG colon. */\nconst RFC3986_SCHEME_PATTERN = /^[a-z][a-z0-9+.-]*:$/;\n\nexport function isSafeOAuthRedirectUri(value: string): boolean {\n if (typeof value !== 'string' || value.length === 0 || value !== value.trim()) return false;\n let url: URL;\n try {\n url = new URL(value);\n } catch {\n return false;\n }\n if (url.hash) return false;\n if (url.username || url.password) return false;\n if (url.protocol === 'https:') return true;\n if (url.protocol === 'http:') {\n const host = url.hostname.toLowerCase();\n return host === 'localhost' || host === '127.0.0.1' || host === '::1' || host === '[::1]';\n }\n // A private-use scheme for a native app. Refused only when the scheme itself confers a dangerous\n // capability; the shape is otherwise held to the same rules as an https target (no fragment, no\n // embedded credentials, both checked above), and interception is answered by mandatory PKCE.\n const scheme = url.protocol.toLowerCase();\n if (DANGEROUS_REDIRECT_URI_SCHEMES.has(scheme)) return false;\n if (NON_CALLBACK_SPECIAL_SCHEMES.has(scheme)) return false;\n return RFC3986_SCHEME_PATTERN.test(scheme);\n}\n\n// ===============================\n// CORE OAUTH CLIENT SCHEMAS\n// ===============================\n\n/**\n * Base schema for extension (needs to be z.object for `.extend()` to work).\n *\n * `scope` reuses `ApiKeyScope` (ORGANIZATION|APPLICATION) — the same primary-scope\n * split as api-keys; the org/app variants narrow it to a literal + add the FK.\n *\n * SECRET + ROTATION GRACE (`hashedSecret`/`secretPrefix`/`previous*`) mirror the\n * api-key `hashedKey`/`keyPrefix`/`previous*` fields VERBATIM (same decorators,\n * same server-managed strip-seam contract). Unlike api-keys — which declare\n * `hashedKey`/`keyPrefix` on the concrete org/app variant schemas — the OAuth\n * client keeps them on the base: every scope persists the identical secret shape,\n * so a single base declaration is the honest single source of truth.\n */\nexport const OAuthClientSchemaBase = z.object({\n _id: z.string().min(1).isPrimaryKey().isSummaryField(), // == clientId\n name: z.string().min(1).max(100).isDBIndexed().isSummaryField(),\n description: z.string().max(500).optional(),\n scope: z.enum(ApiKeyScope).isDBIndexed().isSummaryField(),\n // `.isAuditEvidence()` — the roles an OAuth client acts with. Same reasoning as the API-key\n // authority field: roles are the single authorization axis, so their before/after IS the\n // evidence. assurance-control: WILDO.ACCESS.PRIVILEGE_EVIDENCE\n roles: z.array(RolesSchema).default([]).isAuditEvidence(),\n // OIDC IDENTITY scopes this client may request in the authorization_code flow (e.g. `openid`,\n // `profile`, `email`) — validated against the requested `scope` when minting the ID token /\n // serving `/oauth/userinfo`. This is IDENTITY only: it is NOT an authorization axis. Authorization\n // is roles-only (scope-based authorization was deleted 2026-07-21 — do NOT re-introduce it). Empty\n // for pure client_credentials machine clients (they carry no scopes; their access is roles-only).\n allowedScopes: z.array(z.string()).default([]),\n // Grant types this client is authorized to use. Defaults to the machine front.\n allowedGrants: z.array(z.enum(OAuthGrantType)).default([OAuthGrantType.CLIENT_CREDENTIALS]),\n // OIDC authorization_code: exact-match allowlist of redirect URIs. Empty for pure\n // client_credentials clients. An authorization request's `redirect_uri` MUST equal one of\n // these by EXACT string match (no wildcards / no substring) — the anti-open-redirect guard.\n // Each entry is additionally constrained to a SAFE absolute URL by `isSafeOAuthRedirectUri`\n // (https anywhere · http loopback only · no javascript:/data:/fragment/embedded-credentials) so a\n // malicious registered entry cannot become a stored-XSS / off-origin redirect navigation target.\n redirectUris: z\n .array(\n z.string().refine(isSafeOAuthRedirectUri, {\n message: 'redirect_uri must be an absolute https URL (or an http loopback URL) with no fragment or embedded credentials',\n }),\n )\n // Bounded. RFC 7591 sets no limit, and one is needed here because `/oauth/register` accepts this\n // array from an ANONYMOUS caller: without a ceiling a single registration can carry an arbitrary\n // number of URIs, and the per-IP registration limit bounds how MANY registrations happen, not how\n // large each one is. 50 is far above any real client — several environments times a few loopback\n // ports — so this constrains only abuse. Every entry is independently constrained by\n // `isSafeOAuthRedirectUri`, so this is a storage bound, not an authorization one.\n .max(50)\n .default([]),\n // OIDC RP-Initiated Logout 1.0: exact-match allowlist of POST-LOGOUT redirect URIs (revocation-C). When\n // an RP calls `/oauth/end-session` with a `post_logout_redirect_uri`, that value MUST equal one of these\n // by EXACT string match — the SAME anti-open-redirect discipline as `redirectUris` (no wildcards, no\n // substring). A non-matching value is refused and the OP lands the user on its own logged-out page rather\n // than redirecting back to the RP. Empty for clients that never drive an interactive logout (pure\n // client_credentials machines). Each entry is independently held to a SAFE absolute URL by\n // `isSafeOAuthRedirectUri` (https anywhere · http loopback only · no fragment/embedded-credentials), and\n // the array is `.max(50)`-bounded for the same anonymous-`/oauth/register` abuse reason as `redirectUris`.\n // spec-cite: OpenID Connect RP-Initiated Logout 1.0 §2 (`post_logout_redirect_uri` MUST have been\n // registered with the OP).\n postLogoutRedirectUris: z\n .array(\n z.string().refine(isSafeOAuthRedirectUri, {\n message: 'post_logout_redirect_uri must be an absolute https URL (or an http loopback URL) with no fragment or embedded credentials',\n }),\n )\n .max(50)\n .default([]),\n // OIDC INTERACTIVE CONSENT gate. When TRUE, the authorization_code flow requires EXPLICIT user\n // consent before a code is minted: `/oauth/authorize` returns `consent_required` (with a single-use\n // consent-request token + the client/resource/scope details) instead of auto-issuing the code, and\n // the user must approve at `/oauth/authorize/decision`. Defaults FALSE = a first-party / trusted\n // client whose consent is auto-granted (the pre-consent behavior, so machine + trusted clients are\n // UNAFFECTED). Set TRUE for a THIRD-PARTY client that acts on the user's behalf and must therefore\n // be explicitly authorized by the user before it can obtain a delegated token. The gate is\n // SERVER-owned (a client property, never a request parameter) so a third-party client cannot\n // suppress its own consent prompt.\n requiresConsent: z.boolean().default(false),\n // OIDC `token_endpoint_auth_method` — PUBLIC (`NONE`, the default: PKCE-only, no secret at the token\n // endpoint) vs CONFIDENTIAL (`CLIENT_SECRET_BASIC`/`POST`: the authorization_code exchange AND token\n // revocation REQUIRE the client to present its `client_secret`, defense-in-depth over PKCE). Default\n // `NONE` is the safe default: a server-side confidential client must opt into\n // a secret-bearing token-endpoint method explicitly.\n // Settable at create/update — flipping a client confidential simply starts requiring the secret it\n // already has. The public-vs-confidential decision is derived ONLY via\n // `isConfidentialTokenEndpointAuthMethod`, never by re-comparing the enum inline.\n tokenEndpointAuthMethod: z.enum(OAuthTokenEndpointAuthMethod).default(OAuthTokenEndpointAuthMethod.NONE).isSummaryField(),\n // `.isAuditEvidence()` — whether this client's delegated access is live.\n // assurance-control: WILDO.ACCESS.PRIVILEGE_EVIDENCE\n status: z.enum(OAuthClientStatus).default(OAuthClientStatus.ACTIVE).isDBIndexed().isSummaryField().isAuditEvidence(),\n expiresAt: z.date().optional().isDBIndexed().isSummaryField(),\n lastUsedAt: z.date().optional().isDBIndexed().excludeFromCreate().excludeFromUpdate(),\n createdAt: z.date().default(() => new Date()).isDBIndexed().isSummaryField().excludeFromCreate().excludeFromUpdate(),\n updatedAt: z.date().default(() => new Date()).isDBIndexed().excludeFromCreate().excludeFromUpdate(),\n\n // ── Client secret ─────────────────────────────────────────────────────────\n // `hashedSecret` is the lookup key for the client-credentials token exchange\n // (the request-auth choke point resolves a presented secret against it on every\n // exchange). Without an index this is an O(n) collection scan; the compound\n // unique guarantees only one active row per hash — cryptographically near-\n // impossible to collide by accident, but a uniqueness contract avoids two rows\n // being returned to the resolver on a hash collision and prevents shadow-client\n // duplicates during rotation. Backend-only (a secret hash, never surfaced except\n // once at creation via `isReturnedAtCreation`, which the mint postfix correlates\n // the one-time plaintext against). `.excludeFrom{Create,Update}()` — the client\n // never supplies it; the mint impl is the single server-side choke point.\n hashedSecret: z.string().min(1).isDBIndexed().isUnique().isBackendOnly({ isReturnedAtCreation: true }).excludeFromCreate().excludeFromUpdate(),\n // First 8 chars of the plaintext secret — persisted + shown in lists\n // (`.isSummaryField()`) so an admin can identify a client without revealing the\n // secret. Server-managed.\n secretPrefix: z.string().length(8).isSummaryField().excludeFromCreate().excludeFromUpdate(),\n\n // ── Rotation grace window ─────────────────────────────────────────────────\n // When a client secret is ROTATED or REGENERATEd, the PRIOR secret is retained\n // here so it keeps authenticating during an overlap window — callers can migrate\n // to the new secret without a hard cutover. The client-credentials exchange\n // resolves a presented secret against the current `hashedSecret` OR this\n // `previousHashedSecret` while the window is open (`previousSecretInvalidationDate`\n // is null or in the future) AND the client is ACTIVE. All three are server-managed\n // by the rotate/regenerate impls only — never client-settable\n // (`.excludeFromCreate().excludeFromUpdate()`).\n //\n // `previousHashedSecret` — `sha256` of the prior secret; the auth path looks a\n // presented secret up against it, so it is `.isDBIndexed()`. Backend-only (a\n // secret hash, never surfaced). Absent until the first rotation.\n previousHashedSecret: z.string().min(1).optional().isDBIndexed().isBackendOnly().excludeFromCreate().excludeFromUpdate(),\n // First 8 chars of the prior secret — retained for support/audit display while\n // the previous secret is still valid (not a secret, so surfaced). Overwritten on\n // the next rotation.\n previousSecretPrefix: z.string().length(8).optional().excludeFromCreate().excludeFromUpdate(),\n // When the previous secret stops authenticating. `null`/absent = no scheduled\n // invalidation (REGENERATE overlap — the prior secret stays valid until the next\n // rotation). A future date (ROTATE `oldSecretInvalidationDate`) = honored until\n // then, then rejected. `now`/past (ROTATE default) = immediate hard cutover.\n // Surfaced so operators can see when the old secret dies.\n previousSecretInvalidationDate: z.date().optional().excludeFromCreate().excludeFromUpdate(),\n\n // ── Registration access token (RFC 7592) ──────────────────────────────────\n // The credential a DYNAMICALLY REGISTERED client uses to read, update or delete\n // its own registration at the client configuration endpoint. Issued once, at\n // registration, and returned exactly once in the 201 body.\n //\n // \"registration_access_token: REQUIRED. String containing the access token to be\n // used at the client configuration endpoint to perform subsequent operations upon\n // the client registration.\" … \"The client MUST use its registration access token\n // in all calls to this endpoint as an OAuth 2.0 Bearer Token.\"\n // spec-cite: RFC 7592 §3 (Client Information Response) and §2 (Client Configuration Endpoint).\n //\n // SEPARATE FROM `hashedSecret`, deliberately, and not merely for tidiness. They\n // authenticate different things: the client secret authenticates the CLIENT at the\n // token endpoint, while this authenticates a caller's standing to administer the\n // client's own REGISTRATION. A dynamically registered client is public\n // (`token_endpoint_auth_method=none`) and never uses its secret at all, so folding\n // the two together would give a credential two unrelated powers and make\n // \"rotate the secret\" silently mean \"revoke management access\".\n //\n // ABSENT on every client that is not dynamically registered — an operator- or\n // organization-registered client is administered through the ordinary authenticated\n // resource surface, not through RFC 7592.\n //\n // `sha256` hex, matching every other token in this framework: deterministic so a\n // presented Bearer token resolves by re-hashing and matching, and safe because the\n // plaintext is 32 random bytes rather than a password.\n registrationAccessTokenHash: z.string().min(1).optional().isDBIndexed().isBackendOnly().excludeFromCreate().excludeFromUpdate(),\n // First 8 characters of the plaintext, so an operator can identify which token a\n // client holds without seeing it — the same affordance `secretPrefix` provides for\n // the client secret. Not a secret; surfaced.\n registrationAccessTokenPrefix: z.string().length(8).optional().excludeFromCreate().excludeFromUpdate(),\n\n // ── How this client came to exist ─────────────────────────────────────────\n // WHO registered this client, which is a different question from WHERE the row lives.\n //\n // Every other client on this collection was created by someone with standing in this application:\n // an organization administrator, or a platform operator. A DYNAMIC client was created by an\n // anonymous caller at the RFC 7591 `/register` endpoint, and proved nothing about itself.\n //\n // The field exists because the STORAGE LOCATION can no longer carry that meaning. A dynamically\n // registered client has no organization, so it must live on the APPLICATION collection — and\n // `scope: APPLICATION` otherwise means \"platform-operator first-party\", the most trusted posture\n // there is. Without this discriminator a stranger's client would inherit that trust purely from\n // where it was filed. `ResolvedAuthorizationClient` reads it and maps DYNAMIC to\n // `AuthorizationClientTenancy.UNAFFILIATED`, so the authorize path treats it like a CIMD client:\n // always consent, identity scopes only.\n //\n // `.excludeFromCreate().excludeFromUpdate()` is load-bearing, not hygiene: this is a TRUST\n // CLASSIFICATION, and a caller who could set it could file itself as OPERATOR. Only the\n // registration endpoint writes it, through the system door. Authenticated\n // administrative registration receives OPERATOR by default because that\n // administrator vouches for the client.\n // `.isAuditEvidence()` — a change here changes how much this client is trusted.\n // assurance-control: WILDO.ACCESS.PRIVILEGE_EVIDENCE\n registrationOrigin: z.enum(OAuthClientRegistrationOrigin)\n .default(OAuthClientRegistrationOrigin.OPERATOR)\n .isDBIndexed()\n .isSummaryField()\n .excludeFromCreate()\n .excludeFromUpdate()\n .isAuditEvidence(),\n\n});\n\nexport type OAuthClientBase = z.infer<typeof OAuthClientSchemaBase>;\n\nexport const OAuthClientOrganizationSchema = OAuthClientSchemaBase.extend({\n scope: z.literal(ApiKeyScope.ORGANIZATION),\n organizationId: z.string().min(1).isDBIndexed().isForeignKey().isSummaryField().excludeFromUpdate(),\n});\n\nexport type OAuthClientOrganization = z.infer<typeof OAuthClientOrganizationSchema>;\n\nexport const OAuthClientApplicationSchema = OAuthClientSchemaBase.extend({\n scope: z.literal(ApiKeyScope.APPLICATION),\n applicationId: z.string().min(1).isDBIndexed().isForeignKey().isSummaryField().excludeFromUpdate(),\n});\n\nexport type OAuthClientApplication = z.infer<typeof OAuthClientApplicationSchema>;\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"oauth-consent-grants.shared.resources-config.schemas.d.ts","sourceRoot":"","sources":["../../../../../src/security/oauth-clients/oauth-consent-grants.shared.resources-config.schemas.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAKH,OAAO,EAAE,qBAAqB,EAAwD,MAAM,mDAAmD,CAAC;AAChJ,OAAO,EAA4D,oBAAoB,EAAE,MAAM,0CAA0C,CAAC;AAK1I,eAAO,MAAM,6DAA6D,GACxE,wBAAwB,oBAAoB,EAAE;;;;;;;;;kCAsG9C,CAAC"}
1
+ {"version":3,"file":"oauth-consent-grants.shared.resources-config.schemas.d.ts","sourceRoot":"","sources":["../../../../src/security/oauth-clients/oauth-consent-grants.shared.resources-config.schemas.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAKH,OAAO,EAAE,qBAAqB,EAAwD,MAAM,mDAAmD,CAAC;AAChJ,OAAO,EAA4D,oBAAoB,EAAE,MAAM,0CAA0C,CAAC;AAK1I,eAAO,MAAM,6DAA6D,GACxE,wBAAwB,oBAAoB,EAAE;;;;;;;;;kCAsG9C,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"oauth-consent-grants.shared.schemas.d.ts","sourceRoot":"","sources":["../../../../../src/security/oauth-clients/oauth-consent-grants.shared.schemas.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAKxB,eAAO,MAAM,uBAAuB;;;;;;;;;kBAsDlC,CAAC;AAEH;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,yCAAyC,MAAM,CAAC;AAE7D,MAAM,MAAM,iBAAiB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,uBAAuB,CAAC,CAAC"}
1
+ {"version":3,"file":"oauth-consent-grants.shared.schemas.d.ts","sourceRoot":"","sources":["../../../../src/security/oauth-clients/oauth-consent-grants.shared.schemas.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAKxB,eAAO,MAAM,uBAAuB;;;;;;;;;kBAsDlC,CAAC;AAEH;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,yCAAyC,MAAM,CAAC;AAE7D,MAAM,MAAM,iBAAiB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,uBAAuB,CAAC,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"oauth-consent-grants.shared.schemas.js","sourceRoot":"","sources":["../../../../../src/security/oauth-clients/oauth-consent-grants.shared.schemas.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,OAAO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GAAG,EAAE,CAAC,IAAI,IAAI,EAAE,CAAC,CAAC,WAAW,EAAE,CAAC,cAAc,EAAE,CAAC,iBAAiB,EAAE,CAAC,iBAAiB,EAAE;IACpH,SAAS,EAAE,CAAC,CAAC,IAAI,EAAE,CAAC,OAAO,CAAC,GAAG,EAAE,CAAC,IAAI,IAAI,EAAE,CAAC,CAAC,WAAW,EAAE,CAAC,iBAAiB,EAAE,CAAC,iBAAiB,EAAE;CACpG,CAAC,CAAC,cAAc,CAAC;IAChB,QAAQ;IACR,UAAU;IACV,UAAU;CACX,CAAC,CAAC;AAEH;;;;;;;;;;;GAWG;AACH,MAAM,CAAC,MAAM,yCAAyC,GAAG,GAAG,CAAC","sourcesContent":["/**\n * OIDC Persistent Consent Grants (\"remember this app\")\n *\n * A durable \"user X authorized OAuth client Y for identity scopes Z (at resource R)\" record. It is\n * CREATED (via the system write primitive) when a user APPROVES an interactive-consent request AND\n * opts to remember the app, and READ at `/oauth/authorize` to SKIP re-prompting when an existing grant\n * already covers the requested scopes. The user can list their grants (\"authorized apps\") and revoke\n * one.\n *\n * USER-scoped: owned by `userId` (USER_SELF primary scope, derived from the `USERS → OAUTH_CONSENT_GRANTS`\n * composition relationship). One grant per `(userId, clientId, resource)` — a re-consent UPDATES the\n * granted scopes rather than creating a duplicate. `resource` participates in the grain because two\n * authorize requests from the same client for different RFC 8707 resources (distinct A2A / MCP agent\n * endpoints) are genuinely distinct delegations; an OIDC-only login carries no `resource` and yields a\n * single resource-less grant.\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\nexport const OAuthConsentGrantSchema = z.object({\n _id: z.string().min(1).isPrimaryKey().isSummaryField(),\n\n /** FK → USERS — the user who granted consent (the USER_SELF scope owner). */\n userId: z.string().min(1).isDBIndexed().isForeignKey().isSummaryField().excludeFromUpdate(),\n\n /** The registered OAuth client (`_id`, `oc_*`) the user authorized. Part of the business key. */\n clientId: z.string().min(1).isDBIndexed().isSummaryField(),\n\n /**\n * The RFC 8707 `resource` (the target A2A / MCP agent endpoint) this grant covers. Absent for an\n * OIDC-only login with no delegation. Part of the business key — a grant authorizes one client for\n * one resource, so different agent endpoints require separate, explicit consent.\n */\n resource: z.string().optional().isDBIndexed().isSummaryField(),\n\n /**\n * The IDENTITY scopes the user granted (e.g. `openid`, `profile`, `email`). A later authorize whose\n * requested scopes are a SUBSET of these skips the prompt; a request for a scope NOT in the grant\n * re-prompts (silent scope expansion is forbidden). Identity only — scopes carry no authorization\n * weight (authorization is roles-only).\n */\n // USAGE — what this person authorized a third-party client to reach on their behalf, and when.\n // A consent record is an observation of a decision they made, not an attribute of them.\n // RESET on erasure — returns this field to its schema default. It holds which scopes this person authorized a third-party client to reach,\n // which the category above correctly declares as personal data. RESET rather than REMOVE or MASK\n // because the field is non-nullable WITH a `.default()`: REMOVE needs a clearable field and MASK\n // needs a string. The value comes from the schema, so there is no second copy to drift.\n scopes: addImpersonalizeWith(\n z.array(z.string()).default([]).dataCategories(PersonalDataCategory.USAGE),\n RedactionType.RESET,\n ),\n\n /**\n * Expiry. The authorize lookup ignores a grant past this instant, fail-closed to a fresh consent\n * prompt.\n *\n * SET ON EVERY AFFIRMATIVE CONSENT since 2026-09-08 (#465) — on creation and again on every widen,\n * because a widen is the user approving again and a re-affirmation should restart the clock. It\n * was declared here with a reader and NO WRITER before that, so a remembered approval lived until\n * the person revoked it while the field read to an operator as a policy knob that existed.\n *\n * Still optional on the SCHEMA, for two reasons that are not the same: grants created before that\n * date carry none and must keep working (an absent expiry means \"never\", which is what they were\n * granted under), and a resource may be written by a path that has no operator policy in hand.\n */\n expiresAt: z.date().optional().isDBIndexed(),\n\n createdAt: z.date().default(() => new Date()).isDBIndexed().isSummaryField().excludeFromCreate().excludeFromUpdate(),\n updatedAt: z.date().default(() => new Date()).isDBIndexed().excludeFromCreate().excludeFromUpdate(),\n}).businessKeySet([\n 'userId',\n 'clientId',\n 'resource',\n]);\n\n/**\n * How long a remembered consent lasts when the application authors no policy of its own.\n *\n * **180 days**, and the reasoning matters more than the number. A remembered consent is a standing\n * delegation of authority to a third party, so it should lapse on its own if nobody re-affirms it —\n * but a prompt the user meets every few weeks trains them to click through, which makes the consent\n * screen worth less rather than more. Half a year is long enough not to nag and short enough that an\n * authorization the user has forgotten about does not outlive their interest in the client by years.\n *\n * An application overrides it with `auth.consentGrantLifetimeDays`. There is deliberately no way to\n * express \"never expires\": that was the state this default replaced, and it was not chosen.\n */\nexport const OAUTH_CONSENT_GRANT_DEFAULT_LIFETIME_DAYS = 180;\n\nexport type OAuthConsentGrant = z.infer<typeof OAuthConsentGrantSchema>;\n"]}
1
+ {"version":3,"file":"oauth-consent-grants.shared.schemas.js","sourceRoot":"","sources":["../../../../src/security/oauth-clients/oauth-consent-grants.shared.schemas.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;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,MAAM,CAAC,MAAM,uBAAuB,GAAG,CAAC,CAAC,MAAM,CAAC;IAC9C,GAAG,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,YAAY,EAAE,CAAC,cAAc,EAAE;IAEtD,6EAA6E;IAC7E,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,WAAW,EAAE,CAAC,YAAY,EAAE,CAAC,cAAc,EAAE,CAAC,iBAAiB,EAAE;IAE3F,iGAAiG;IACjG,QAAQ,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,WAAW,EAAE,CAAC,cAAc,EAAE;IAE1D;;;;OAIG;IACH,QAAQ,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,WAAW,EAAE,CAAC,cAAc,EAAE;IAE9D;;;;;OAKG;IACH,+FAA+F;IAC/F,wFAAwF;IACxF,2IAA2I;IAC3I,iGAAiG;IACjG,iGAAiG;IACjG,wFAAwF;IACxF,MAAM,EAAE,oBAAoB,CAC5B,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC,CAAC,OAAO,CAAC,EAAE,CAAC,CAAC,cAAc,CAAC,oBAAoB,CAAC,KAAK,CAAC,EACxE,aAAa,CAAC,KAAK,CACpB;IAED;;;;;;;;;;;;OAYG;IACH,SAAS,EAAE,CAAC,CAAC,IAAI,EAAE,CAAC,QAAQ,EAAE,CAAC,WAAW,EAAE;IAE5C,SAAS,EAAE,CAAC,CAAC,IAAI,EAAE,CAAC,OAAO,CAAC,GAAG,EAAE,CAAC,IAAI,IAAI,EAAE,CAAC,CAAC,WAAW,EAAE,CAAC,cAAc,EAAE,CAAC,iBAAiB,EAAE,CAAC,iBAAiB,EAAE;IACpH,SAAS,EAAE,CAAC,CAAC,IAAI,EAAE,CAAC,OAAO,CAAC,GAAG,EAAE,CAAC,IAAI,IAAI,EAAE,CAAC,CAAC,WAAW,EAAE,CAAC,iBAAiB,EAAE,CAAC,iBAAiB,EAAE;CACpG,CAAC,CAAC,cAAc,CAAC;IAChB,QAAQ;IACR,UAAU;IACV,UAAU;CACX,CAAC,CAAC;AAEH;;;;;;;;;;;GAWG;AACH,MAAM,CAAC,MAAM,yCAAyC,GAAG,GAAG,CAAC","sourcesContent":["/**\n * OIDC Persistent Consent Grants (\"remember this app\")\n *\n * A durable \"user X authorized OAuth client Y for identity scopes Z (at resource R)\" record. It is\n * CREATED (via the system write primitive) when a user APPROVES an interactive-consent request AND\n * opts to remember the app, and READ at `/oauth/authorize` to SKIP re-prompting when an existing grant\n * already covers the requested scopes. The user can list their grants (\"authorized apps\") and revoke\n * one.\n *\n * USER-scoped: owned by `userId` (USER_SELF primary scope, derived from the `USERS → OAUTH_CONSENT_GRANTS`\n * composition relationship). One grant per `(userId, clientId, resource)` — a re-consent UPDATES the\n * granted scopes rather than creating a duplicate. `resource` participates in the grain because two\n * authorize requests from the same client for different RFC 8707 resources (distinct A2A / MCP agent\n * endpoints) are genuinely distinct delegations; an OIDC-only login carries no `resource` and yields a\n * single resource-less grant.\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\nexport const OAuthConsentGrantSchema = z.object({\n _id: z.string().min(1).isPrimaryKey().isSummaryField(),\n\n /** FK → USERS — the user who granted consent (the USER_SELF scope owner). */\n userId: z.string().min(1).isDBIndexed().isForeignKey().isSummaryField().excludeFromUpdate(),\n\n /** The registered OAuth client (`_id`, `oc_*`) the user authorized. Part of the business key. */\n clientId: z.string().min(1).isDBIndexed().isSummaryField(),\n\n /**\n * The RFC 8707 `resource` (the target A2A / MCP agent endpoint) this grant covers. Absent for an\n * OIDC-only login with no delegation. Part of the business key — a grant authorizes one client for\n * one resource, so different agent endpoints require separate, explicit consent.\n */\n resource: z.string().optional().isDBIndexed().isSummaryField(),\n\n /**\n * The IDENTITY scopes the user granted (e.g. `openid`, `profile`, `email`). A later authorize whose\n * requested scopes are a SUBSET of these skips the prompt; a request for a scope NOT in the grant\n * re-prompts (silent scope expansion is forbidden). Identity only — scopes carry no authorization\n * weight (authorization is roles-only).\n */\n // USAGE — what this person authorized a third-party client to reach on their behalf, and when.\n // A consent record is an observation of a decision they made, not an attribute of them.\n // RESET on erasure — returns this field to its schema default. It holds which scopes this person authorized a third-party client to reach,\n // which the category above correctly declares as personal data. RESET rather than REMOVE or MASK\n // because the field is non-nullable WITH a `.default()`: REMOVE needs a clearable field and MASK\n // needs a string. The value comes from the schema, so there is no second copy to drift.\n scopes: addImpersonalizeWith(\n z.array(z.string()).default([]).dataCategories(PersonalDataCategory.USAGE),\n RedactionType.RESET,\n ),\n\n /**\n * Expiry. The authorize lookup ignores a grant past this instant, fail-closed to a fresh consent\n * prompt.\n *\n * SET ON EVERY AFFIRMATIVE CONSENT since 2026-09-08 (#465) — on creation and again on every widen,\n * because a widen is the user approving again and a re-affirmation should restart the clock. It\n * was declared here with a reader and NO WRITER before that, so a remembered approval lived until\n * the person revoked it while the field read to an operator as a policy knob that existed.\n *\n * Still optional on the SCHEMA, for two reasons that are not the same: grants created before that\n * date carry none and must keep working (an absent expiry means \"never\", which is what they were\n * granted under), and a resource may be written by a path that has no operator policy in hand.\n */\n expiresAt: z.date().optional().isDBIndexed(),\n\n createdAt: z.date().default(() => new Date()).isDBIndexed().isSummaryField().excludeFromCreate().excludeFromUpdate(),\n updatedAt: z.date().default(() => new Date()).isDBIndexed().excludeFromCreate().excludeFromUpdate(),\n}).businessKeySet([\n 'userId',\n 'clientId',\n 'resource',\n]);\n\n/**\n * How long a remembered consent lasts when the application authors no policy of its own.\n *\n * **180 days**, and the reasoning matters more than the number. A remembered consent is a standing\n * delegation of authority to a third party, so it should lapse on its own if nobody re-affirms it —\n * but a prompt the user meets every few weeks trains them to click through, which makes the consent\n * screen worth less rather than more. Half a year is long enough not to nag and short enough that an\n * authorization the user has forgotten about does not outlive their interest in the client by years.\n *\n * An application overrides it with `auth.consentGrantLifetimeDays`. There is deliberately no way to\n * express \"never expires\": that was the state this default replaced, and it was not chosen.\n */\nexport const OAUTH_CONSENT_GRANT_DEFAULT_LIFETIME_DAYS = 180;\n\nexport type OAuthConsentGrant = z.infer<typeof OAuthConsentGrantSchema>;\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"oauth-resource-server.shared.schemas.d.ts","sourceRoot":"","sources":["../../../../../src/security/oauth-clients/oauth-resource-server.shared.schemas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,wBAAwB,EAAE,MAAM,+CAA+C,CAAC;AAEzF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAsCG;AACH,oBAAY,kBAAkB;IAC5B,uFAAuF;IACvF,GAAG,QAAQ;IACX,gGAAgG;IAChG,GAAG,QAAQ;IACX,uGAAuG;IACvG,GAAG,QAAQ;CACZ;AAED;;;;;GAKG;AACH,eAAO,MAAM,2BAA2B,EAAE,MAAM,CAC9C,OAAO,CAAC,kBAAkB,EAAE,kBAAkB,CAAC,GAAG,CAAC,EACnD,wBAAwB,CAIzB,CAAC;AAEF;yGACyG;AACzG,eAAO,MAAM,gCAAgC,EAAE,SAAS,kBAAkB,EAGzE,CAAC;AAEF;;;;;;;;;GASG;AACH,eAAO,MAAM,8BAA8B,EAAE,SAAS,kBAAkB,EAIvE,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,6BAA6B,EAAE,SAAS,kBAAkB,EAGtE,CAAC;AAoEF;;;;GAIG;AACH,eAAO,MAAM,uBAAuB;;;;;iBAGlC,CAAC;AAEH;;;GAGG;AACH,eAAO,MAAM,sBAAsB;;;;;;iBASjC,CAAC;AAEH,eAAO,MAAM,4BAA4B;;;;;;;;;;;2BAAkF,CAAC;AAE5H,yEAAyE;AACzE,MAAM,MAAM,iBAAiB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,uBAAuB,CAAC,CAAC;AACxE,uEAAuE;AACvE,MAAM,MAAM,gBAAgB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,sBAAsB,CAAC,CAAC;AACtE,+FAA+F;AAC/F,MAAM,MAAM,sBAAsB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,4BAA4B,CAAC,CAAC;AAClF,kEAAkE"}
1
+ {"version":3,"file":"oauth-resource-server.shared.schemas.d.ts","sourceRoot":"","sources":["../../../../src/security/oauth-clients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","sources":["../../../../src/testing/resource-config-builders.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,OAAO,KAAK,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAC7B,OAAO,EAGL,KAAK,kBAAkB,EACxB,MAAM,iDAAiD,CAAC;AAGzD,OAAO,EACL,qBAAqB,EAGtB,MAAM,gDAAgD,CAAC;AACxD,OAAO,KAAK,EACV,qBAAqB,EACrB,+BAA+B,EAC/B,2CAA2C,EAC5C,MAAM,8CAA8C,CAAC;AACtD,OAAO,EAKL,oBAAoB,EAKrB,MAAM,uCAAuC,CAAC;AAG/C,wBAAgB,gBAAgB,CAAC,SAAS,CAAC,EAAE,OAAO,CAAC,kBAAkB,CAAC,GAAG,kBAAkB,CAuC5F;AAED;;;;;GAKG;AACH,wBAAgB,mBAAmB,CACjC,UAAU,EAAE,CAAC,CAAC,UAAU,EACxB,mBAAmB,GAAE,qBAAkD,GACtE,+BAA+B,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,CAAC,CAsChD;AAED,wBAAgB,wBAAwB,CACtC,UAAU,EAAE,CAAC,CAAC,UAAU,EACxB,UAAU,EAAE,+BAA+B,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,CAAC,EAAE,GAC3D,qBAAqB,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,CAAC,CA0BtC;AAED;;;;;;GAMG;AACH,wBAAgB,4BAA4B,CAC1C,kBAAkB,EAAE,MAAM,EAC1B,qBAAqB,EAAE,oBAAoB,EAAE,GAC5C,2CAA2C,CAuI7C;AAED;;GAEG;AACH,wBAAgB,2BAA2B,CACzC,kBAAkB,EAAE,MAAM,EAC1B,qBAAqB,EAAE,oBAAoB,EAAE,GAC5C,oBAAoB,EAAE,CAQxB"}
1
+ {"version":3,"file":"resource-config-builders.d.ts","sourceRoot":"","sources":["../../../src/testing/resource-config-builders.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,OAAO,KAAK,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAC7B,OAAO,EAGL,KAAK,kBAAkB,EACxB,MAAM,iDAAiD,CAAC;AAGzD,OAAO,EACL,qBAAqB,EAGtB,MAAM,gDAAgD,CAAC;AACxD,OAAO,KAAK,EACV,qBAAqB,EACrB,+BAA+B,EAC/B,2CAA2C,EAC5C,MAAM,8CAA8C,CAAC;AACtD,OAAO,EAKL,oBAAoB,EAKrB,MAAM,uCAAuC,CAAC;AAG/C,wBAAgB,gBAAgB,CAAC,SAAS,CAAC,EAAE,OAAO,CAAC,kBAAkB,CAAC,GAAG,kBAAkB,CAuC5F;AAED;;;;;GAKG;AACH,wBAAgB,mBAAmB,CACjC,UAAU,EAAE,CAAC,CAAC,UAAU,EACxB,mBAAmB,GAAE,qBAAkD,GACtE,+BAA+B,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,CAAC,CAsChD;AAED,wBAAgB,wBAAwB,CACtC,UAAU,EAAE,CAAC,CAAC,UAAU,EACxB,UAAU,EAAE,+BAA+B,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,CAAC,EAAE,GAC3D,qBAAqB,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,CAAC,CA0BtC;AAED;;;;;;GAMG;AACH,wBAAgB,4BAA4B,CAC1C,kBAAkB,EAAE,MAAM,EAC1B,qBAAqB,EAAE,oBAAoB,EAAE,GAC5C,2CAA2C,CAuI7C;AAED;;GAEG;AACH,wBAAgB,2BAA2B,CACzC,kBAAkB,EAAE,MAAM,EAC1B,qBAAqB,EAAE,oBAAoB,EAAE,GAC5C,oBAAoB,EAAE,CAQxB"}
@@ -1 +1 @@
1
- {"version":3,"file":"testing.d.ts","sourceRoot":"","sources":["../../../src/testing.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,cAAc,oCAAoC,CAAC"}
1
+ {"version":3,"file":"testing.d.ts","sourceRoot":"","sources":["../../src/testing.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,cAAc,oCAAoC,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"anonymous-user-marketing-metadata.shared.schemas.d.ts","sourceRoot":"","sources":["../../../../src/users/anonymous-user-marketing-metadata.shared.schemas.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgDG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAOxB;;;GAGG;AACH,eAAO,MAAM,mBAAmB;;;;;;iBAM9B,CAAC;AAEH,MAAM,MAAM,aAAa,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,mBAAmB,CAAC,CAAC;AAEhE,eAAO,MAAM,oCAAoC;;;;;;;;;;;iBAK/C,CAAC;AAEH,MAAM,MAAM,8BAA8B,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,oCAAoC,CAAC,CAAC"}
1
+ {"version":3,"file":"anonymous-user-marketing-metadata.shared.schemas.d.ts","sourceRoot":"","sources":["../../../src/users/anonymous-user-marketing-metadata.shared.schemas.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgDG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAOxB;;;GAGG;AACH,eAAO,MAAM,mBAAmB;;;;;;iBAM9B,CAAC;AAEH,MAAM,MAAM,aAAa,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,mBAAmB,CAAC,CAAC;AAEhE,eAAO,MAAM,oCAAoC;;;;;;;;;;;iBAK/C,CAAC;AAEH,MAAM,MAAM,8BAA8B,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,oCAAoC,CAAC,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"anonymous-users.shared.resources-config.schemas.d.ts","sourceRoot":"","sources":["../../../../src/users/anonymous-users.shared.resources-config.schemas.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAKH,OAAO,EAAE,qBAAqB,EAAwD,MAAM,gDAAgD,CAAC;AAC7I,OAAO,EAA4D,oBAAoB,EAAE,MAAM,uCAAuC,CAAC;AAGvI,eAAO,MAAM,yDAAyD,GACpE,wBAAwB,oBAAoB,EAAE;;;;;;;;;;;;;;;;;;;;;;;iCAuG9C,CAAC"}
1
+ {"version":3,"file":"anonymous-users.shared.resources-config.schemas.d.ts","sourceRoot":"","sources":["../../../src/users/anonymous-users.shared.resources-config.schemas.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAKH,OAAO,EAAE,qBAAqB,EAAwD,MAAM,gDAAgD,CAAC;AAC7I,OAAO,EAA4D,oBAAoB,EAAE,MAAM,uCAAuC,CAAC;AAGvI,eAAO,MAAM,yDAAyD,GACpE,wBAAwB,oBAAoB,EAAE;;;;;;;;;;;;;;;;;;;;;;;iCAuG9C,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"anonymous-users.shared.schema.d.ts","sourceRoot":"","sources":["../../../../src/users/anonymous-users.shared.schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAKxB,wEAAwE;AACxE,oBAAY,gCAAgC;IAC1C,OAAO,YAAY;IACnB,QAAQ,aAAa;IACrB,OAAO,YAAY;CACpB;AAED,QAAA,MAAM,oBAAoB;;;;;;;;;;;;;;;;;;;;;;;iBAuExB,CAAC;AAEH,eAAO,MAAM,mBAAmB,EAAE,OAAO,oBAA2C,CAAC;AACrF,MAAM,MAAM,aAAa,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,oBAAoB,CAAC,CAAC"}
1
+ {"version":3,"file":"anonymous-users.shared.schema.d.ts","sourceRoot":"","sources":["../../../src/users/anonymous-users.shared.schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAKxB,wEAAwE;AACxE,oBAAY,gCAAgC;IAC1C,OAAO,YAAY;IACnB,QAAQ,aAAa;IACrB,OAAO,YAAY;CACpB;AAED,QAAA,MAAM,oBAAoB;;;;;;;;;;;;;;;;;;;;;;;iBAuExB,CAAC;AAEH,eAAO,MAAM,mBAAmB,EAAE,OAAO,oBAA2C,CAAC;AACrF,MAAM,MAAM,aAAa,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,oBAAoB,CAAC,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"inbound-contacts.shared.resources-config.schemas.d.ts","sourceRoot":"","sources":["../../../../src/users/inbound-contacts.shared.resources-config.schemas.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgCG;AAMH,OAAO,EACL,qBAAqB,EAGtB,MAAM,gDAAgD,CAAC;AACxD,OAAO,EAGL,KAAK,oBAAoB,EAC1B,MAAM,uCAAuC,CAAC;AAG/C,eAAO,MAAM,0DAA0D,GACrE,wBAAwB,oBAAoB,EAAE;;;;;;;;;;;;;;;iCA8J9C,CAAC"}
1
+ {"version":3,"file":"inbound-contacts.shared.resources-config.schemas.d.ts","sourceRoot":"","sources":["../../../src/users/inbound-contacts.shared.resources-config.schemas.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgCG;AAMH,OAAO,EACL,qBAAqB,EAGtB,MAAM,gDAAgD,CAAC;AACxD,OAAO,EAGL,KAAK,oBAAoB,EAC1B,MAAM,uCAAuC,CAAC;AAG/C,eAAO,MAAM,0DAA0D,GACrE,wBAAwB,oBAAoB,EAAE;;;;;;;;;;;;;;;iCA8J9C,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"inbound-contacts.shared.schemas.d.ts","sourceRoot":"","sources":["../../../../src/users/inbound-contacts.shared.schemas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAQxB;;;;;;;;;;GAUG;AACH,oBAAY,4BAA4B;IACtC,kEAAkE;IAClE,IAAI,SAAS;IACb,2EAA2E;IAC3E,WAAW,gBAAgB;IAC3B;;;OAGG;IACH,aAAa,kBAAkB;CAChC;AAGD;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;;iBA4G/B,CAAC;AAGH,MAAM,MAAM,cAAc,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,oBAAoB,CAAC,CAAC"}
1
+ {"version":3,"file":"inbound-contacts.shared.schemas.d.ts","sourceRoot":"","sources":["../../../src/users/inbound-contacts.shared.schemas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAQxB;;;;;;;;;;GAUG;AACH,oBAAY,4BAA4B;IACtC,kEAAkE;IAClE,IAAI,SAAS;IACb,2EAA2E;IAC3E,WAAW,gBAAgB;IAC3B;;;OAGG;IACH,aAAa,kBAAkB;CAChC;AAGD;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;;iBA4G/B,CAAC;AAGH,MAAM,MAAM,cAAc,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,oBAAoB,CAAC,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"user-credentials.shared.resources-config.schemas.d.ts","sourceRoot":"","sources":["../../../../src/users/user-credentials.shared.resources-config.schemas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAKxB,OAAO,EAAE,qBAAqB,EAAwD,MAAM,gDAAgD,CAAC;AAC7I,OAAO,EAA4D,oBAAoB,EAAE,MAAM,uCAAuC,CAAC;AAGvI;;;;;;GAMG;AACH,eAAO,MAAM,0DAA0D,GACrE,wBAAwB,oBAAoB,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;kBAsH9C,CAAC"}
1
+ {"version":3,"file":"user-credentials.shared.resources-config.schemas.d.ts","sourceRoot":"","sources":["../../../src/users/user-credentials.shared.resources-config.schemas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAKxB,OAAO,EAAE,qBAAqB,EAAwD,MAAM,gDAAgD,CAAC;AAC7I,OAAO,EAA4D,oBAAoB,EAAE,MAAM,uCAAuC,CAAC;AAGvI;;;;;;GAMG;AACH,eAAO,MAAM,0DAA0D,GACrE,wBAAwB,oBAAoB,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;kBAsH9C,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"user-credentials.shared.schemas.d.ts","sourceRoot":"","sources":["../../../../src/users/user-credentials.shared.schemas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,kBAAkB,EAAE,MAAM,2DAA2D,CAAC;AAK/F;;;GAGG;AACH,eAAO,MAAM,4BAA4B;;;;;;;;;;;iBAWvC,CAAC;AAGH,MAAM,MAAM,sBAAsB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,4BAA4B,CAAC,CAAC;AAElF;;;;;;;;;;;;;;;;GAgBG;AACH,eAAO,MAAM,qBAAqB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBA2FhC,CAAC;AAEH,MAAM,MAAM,eAAe,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,qBAAqB,CAAC,CAAC"}
1
+ {"version":3,"file":"user-credentials.shared.schemas.d.ts","sourceRoot":"","sources":["../../../src/users/user-credentials.shared.schemas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,kBAAkB,EAAE,MAAM,2DAA2D,CAAC;AAK/F;;;GAGG;AACH,eAAO,MAAM,4BAA4B;;;;;;;;;;;iBAWvC,CAAC;AAGH,MAAM,MAAM,sBAAsB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,4BAA4B,CAAC,CAAC;AAElF;;;;;;;;;;;;;;;;GAgBG;AACH,eAAO,MAAM,qBAAqB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBA2FhC,CAAC;AAEH,MAAM,MAAM,eAAe,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,qBAAqB,CAAC,CAAC"}