@wildo-ai/saas-models 1.1.1 → 1.1.3

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 (588) hide show
  1. package/dist/esm/applications/applications-context.schemas.d.ts +16 -10
  2. package/dist/esm/applications/applications-context.schemas.d.ts.map +1 -1
  3. package/dist/esm/applications/applications.shared.resources-config.schemas.d.ts.map +1 -1
  4. package/dist/esm/applications/applications.shared.resources-config.schemas.js +4 -3
  5. package/dist/esm/applications/applications.shared.resources-config.schemas.js.map +1 -1
  6. package/dist/esm/billing/billing-account.shared.resources-config.schemas.d.ts +1 -1
  7. package/dist/esm/billing/billing-account.shared.resources-config.schemas.d.ts.map +1 -1
  8. package/dist/esm/billing/billing-account.shared.resources-config.schemas.js +36 -0
  9. package/dist/esm/billing/billing-account.shared.resources-config.schemas.js.map +1 -1
  10. package/dist/esm/billing/billing-account.shared.schemas.d.ts.map +1 -1
  11. package/dist/esm/billing/billing-account.shared.schemas.js +8 -1
  12. package/dist/esm/billing/billing-account.shared.schemas.js.map +1 -1
  13. package/dist/esm/billing/billing-configuration.shared.schemas.d.ts +0 -4
  14. package/dist/esm/billing/billing-configuration.shared.schemas.d.ts.map +1 -1
  15. package/dist/esm/billing/billing-configuration.shared.schemas.js +59 -17
  16. package/dist/esm/billing/billing-configuration.shared.schemas.js.map +1 -1
  17. package/dist/esm/billing/billing-enums.shared.schemas.d.ts +77 -21
  18. package/dist/esm/billing/billing-enums.shared.schemas.d.ts.map +1 -1
  19. package/dist/esm/billing/billing-enums.shared.schemas.js +85 -23
  20. package/dist/esm/billing/billing-enums.shared.schemas.js.map +1 -1
  21. package/dist/esm/billing/billing-types.shared.schemas.d.ts +5 -5
  22. package/dist/esm/billing/credit-pool.shared.resources-config.schemas.d.ts +1 -1
  23. package/dist/esm/billing/credit-pool.shared.resources-config.schemas.d.ts.map +1 -1
  24. package/dist/esm/billing/credit-pool.shared.resources-config.schemas.js +39 -0
  25. package/dist/esm/billing/credit-pool.shared.resources-config.schemas.js.map +1 -1
  26. package/dist/esm/billing/credit-pool.shared.schemas.d.ts +6 -6
  27. package/dist/esm/billing/credit-pool.shared.schemas.d.ts.map +1 -1
  28. package/dist/esm/billing/credit-pool.shared.schemas.js +8 -4
  29. package/dist/esm/billing/credit-pool.shared.schemas.js.map +1 -1
  30. package/dist/esm/billing/invoice-ref.shared.resources-config.schemas.d.ts +1 -1
  31. package/dist/esm/billing/invoice-ref.shared.resources-config.schemas.d.ts.map +1 -1
  32. package/dist/esm/billing/invoice-ref.shared.resources-config.schemas.js +35 -0
  33. package/dist/esm/billing/invoice-ref.shared.resources-config.schemas.js.map +1 -1
  34. package/dist/esm/billing/invoice-ref.shared.schemas.d.ts.map +1 -1
  35. package/dist/esm/billing/invoice-ref.shared.schemas.js +8 -3
  36. package/dist/esm/billing/invoice-ref.shared.schemas.js.map +1 -1
  37. package/dist/esm/billing/price.shared.schemas.d.ts.map +1 -1
  38. package/dist/esm/billing/price.shared.schemas.js +7 -1
  39. package/dist/esm/billing/price.shared.schemas.js.map +1 -1
  40. package/dist/esm/billing/product-behavior-policy.shared.schemas.d.ts.map +1 -1
  41. package/dist/esm/billing/product-behavior-policy.shared.schemas.js +52 -11
  42. package/dist/esm/billing/product-behavior-policy.shared.schemas.js.map +1 -1
  43. package/dist/esm/billing/product-definition.shared.schemas.d.ts +2 -2
  44. package/dist/esm/billing/product.shared.resources-config.schemas.d.ts +2 -2
  45. package/dist/esm/billing/product.shared.schemas.d.ts +2 -2
  46. package/dist/esm/billing/product.shared.schemas.d.ts.map +1 -1
  47. package/dist/esm/billing/product.shared.schemas.js +7 -3
  48. package/dist/esm/billing/product.shared.schemas.js.map +1 -1
  49. package/dist/esm/billing/subscription.shared.resources-config.schemas.d.ts +2 -2
  50. package/dist/esm/billing/subscription.shared.resources-config.schemas.d.ts.map +1 -1
  51. package/dist/esm/billing/subscription.shared.resources-config.schemas.js +54 -1
  52. package/dist/esm/billing/subscription.shared.resources-config.schemas.js.map +1 -1
  53. package/dist/esm/billing/subscription.shared.schemas.d.ts +4 -4
  54. package/dist/esm/billing/subscription.shared.schemas.d.ts.map +1 -1
  55. package/dist/esm/billing/subscription.shared.schemas.js +6 -2
  56. package/dist/esm/billing/subscription.shared.schemas.js.map +1 -1
  57. package/dist/esm/billing/usage-record.shared.resources-config.schemas.d.ts +1 -1
  58. package/dist/esm/billing/usage-record.shared.resources-config.schemas.d.ts.map +1 -1
  59. package/dist/esm/billing/usage-record.shared.resources-config.schemas.js +39 -0
  60. package/dist/esm/billing/usage-record.shared.resources-config.schemas.js.map +1 -1
  61. package/dist/esm/billing/usage-record.shared.schemas.d.ts +11 -7
  62. package/dist/esm/billing/usage-record.shared.schemas.d.ts.map +1 -1
  63. package/dist/esm/billing/usage-record.shared.schemas.js +29 -6
  64. package/dist/esm/billing/usage-record.shared.schemas.js.map +1 -1
  65. package/dist/esm/companion/provider-discovery.shared.schemas.d.ts +69 -2
  66. package/dist/esm/companion/provider-discovery.shared.schemas.d.ts.map +1 -1
  67. package/dist/esm/companion/provider-discovery.shared.schemas.js +20 -1
  68. package/dist/esm/companion/provider-discovery.shared.schemas.js.map +1 -1
  69. package/dist/esm/compliance/audit-trails/application-audit-logs.shared.resources-config.schemas.d.ts +85 -0
  70. package/dist/esm/compliance/audit-trails/application-audit-logs.shared.resources-config.schemas.d.ts.map +1 -0
  71. package/dist/esm/compliance/audit-trails/application-audit-logs.shared.resources-config.schemas.js +157 -0
  72. package/dist/esm/compliance/audit-trails/application-audit-logs.shared.resources-config.schemas.js.map +1 -0
  73. package/dist/esm/compliance/audit-trails/audit-logs.shared.resources-config.schemas.d.ts.map +1 -1
  74. package/dist/esm/compliance/audit-trails/audit-logs.shared.resources-config.schemas.js +35 -2
  75. package/dist/esm/compliance/audit-trails/audit-logs.shared.resources-config.schemas.js.map +1 -1
  76. package/dist/esm/compliance/audit-trails/audit-trail-config.shared.schemas.d.ts +23 -0
  77. package/dist/esm/compliance/audit-trails/audit-trail-config.shared.schemas.d.ts.map +1 -1
  78. package/dist/esm/compliance/audit-trails/audit-trail-config.shared.schemas.js +56 -0
  79. package/dist/esm/compliance/audit-trails/audit-trail-config.shared.schemas.js.map +1 -1
  80. package/dist/esm/compliance/audit-trails/auditable-events.shared.schema.d.ts +541 -20
  81. package/dist/esm/compliance/audit-trails/auditable-events.shared.schema.d.ts.map +1 -1
  82. package/dist/esm/compliance/audit-trails/auditable-events.shared.schema.js +605 -23
  83. package/dist/esm/compliance/audit-trails/auditable-events.shared.schema.js.map +1 -1
  84. package/dist/esm/compliance/audit-trails/security-audit-event-envelope.shared.schema.d.ts.map +1 -1
  85. package/dist/esm/compliance/audit-trails/security-audit-event-envelope.shared.schema.js +96 -3
  86. package/dist/esm/compliance/audit-trails/security-audit-event-envelope.shared.schema.js.map +1 -1
  87. package/dist/esm/compliance/privacy/impersonalization-scrub.shared.utils.d.ts +49 -0
  88. package/dist/esm/compliance/privacy/impersonalization-scrub.shared.utils.d.ts.map +1 -1
  89. package/dist/esm/compliance/privacy/impersonalization-scrub.shared.utils.js +124 -1
  90. package/dist/esm/compliance/privacy/impersonalization-scrub.shared.utils.js.map +1 -1
  91. package/dist/esm/compliance/privacy/impersonalization.shared.schemas.d.ts +11 -3
  92. package/dist/esm/compliance/privacy/impersonalization.shared.schemas.d.ts.map +1 -1
  93. package/dist/esm/compliance/privacy/impersonalization.shared.schemas.js +11 -3
  94. package/dist/esm/compliance/privacy/impersonalization.shared.schemas.js.map +1 -1
  95. package/dist/esm/compliance/privacy/operating-jurisdictions.shared.schemas.d.ts +94 -0
  96. package/dist/esm/compliance/privacy/operating-jurisdictions.shared.schemas.d.ts.map +1 -0
  97. package/dist/esm/compliance/privacy/operating-jurisdictions.shared.schemas.js +211 -0
  98. package/dist/esm/compliance/privacy/operating-jurisdictions.shared.schemas.js.map +1 -0
  99. package/dist/esm/compliance/privacy/operator-compliance-identity.shared.schemas.d.ts +67 -12
  100. package/dist/esm/compliance/privacy/operator-compliance-identity.shared.schemas.d.ts.map +1 -1
  101. package/dist/esm/compliance/privacy/operator-compliance-identity.shared.schemas.js +95 -8
  102. package/dist/esm/compliance/privacy/operator-compliance-identity.shared.schemas.js.map +1 -1
  103. package/dist/esm/compliance/privacy/privacy.shared.schemas.d.ts +17 -0
  104. package/dist/esm/compliance/privacy/privacy.shared.schemas.d.ts.map +1 -1
  105. package/dist/esm/compliance/privacy/privacy.shared.schemas.js +27 -4
  106. package/dist/esm/compliance/privacy/privacy.shared.schemas.js.map +1 -1
  107. package/dist/esm/compliance/privacy/redaction.shared.schemas.d.ts +89 -16
  108. package/dist/esm/compliance/privacy/redaction.shared.schemas.d.ts.map +1 -1
  109. package/dist/esm/compliance/privacy/redaction.shared.schemas.js +101 -15
  110. package/dist/esm/compliance/privacy/redaction.shared.schemas.js.map +1 -1
  111. package/dist/esm/compliance/privacy/subject-export.shared.schemas.d.ts.map +1 -1
  112. package/dist/esm/compliance/privacy/subject-export.shared.schemas.js +12 -5
  113. package/dist/esm/compliance/privacy/subject-export.shared.schemas.js.map +1 -1
  114. package/dist/esm/config/analytics-value-moments.shared.schemas.d.ts +21 -0
  115. package/dist/esm/config/analytics-value-moments.shared.schemas.d.ts.map +1 -1
  116. package/dist/esm/config/analytics-value-moments.shared.schemas.js +20 -0
  117. package/dist/esm/config/analytics-value-moments.shared.schemas.js.map +1 -1
  118. package/dist/esm/config/app-configuration-shared.shared.schemas.d.ts +9 -5
  119. package/dist/esm/config/app-configuration-shared.shared.schemas.d.ts.map +1 -1
  120. package/dist/esm/config/app-configuration-shared.shared.schemas.js +29 -0
  121. package/dist/esm/config/app-configuration-shared.shared.schemas.js.map +1 -1
  122. package/dist/esm/config/auth-config-resolution.shared.utils.d.ts +8 -1
  123. package/dist/esm/config/auth-config-resolution.shared.utils.d.ts.map +1 -1
  124. package/dist/esm/config/auth-config-resolution.shared.utils.js +29 -0
  125. package/dist/esm/config/auth-config-resolution.shared.utils.js.map +1 -1
  126. package/dist/esm/config/entity-identity-config.shared.schemas.d.ts +95 -17
  127. package/dist/esm/config/entity-identity-config.shared.schemas.d.ts.map +1 -1
  128. package/dist/esm/config/entity-identity-config.shared.schemas.js +86 -8
  129. package/dist/esm/config/entity-identity-config.shared.schemas.js.map +1 -1
  130. package/dist/esm/config/frontend/chart-definition.shared.schemas.d.ts +12 -12
  131. package/dist/esm/config/frontend/navigation.shared.schemas.d.ts +33 -0
  132. package/dist/esm/config/frontend/navigation.shared.schemas.d.ts.map +1 -1
  133. package/dist/esm/config/frontend/navigation.shared.schemas.js +32 -0
  134. package/dist/esm/config/frontend/navigation.shared.schemas.js.map +1 -1
  135. package/dist/esm/errors/errors.custom-message-ref.shared.definitions.d.ts +40 -1
  136. package/dist/esm/errors/errors.custom-message-ref.shared.definitions.d.ts.map +1 -1
  137. package/dist/esm/errors/errors.custom-message-ref.shared.definitions.js +40 -1
  138. package/dist/esm/errors/errors.custom-message-ref.shared.definitions.js.map +1 -1
  139. package/dist/esm/external-data/external-data-pipeline.shared.schemas.d.ts +57 -11
  140. package/dist/esm/external-data/external-data-pipeline.shared.schemas.d.ts.map +1 -1
  141. package/dist/esm/external-data/external-data-pipeline.shared.schemas.js.map +1 -1
  142. package/dist/esm/external-providers/engine-capabilities.shared.schemas.d.ts +109 -64
  143. package/dist/esm/external-providers/engine-capabilities.shared.schemas.d.ts.map +1 -1
  144. package/dist/esm/external-providers/engine-capabilities.shared.schemas.js +200 -19
  145. package/dist/esm/external-providers/engine-capabilities.shared.schemas.js.map +1 -1
  146. package/dist/esm/external-providers/engine-capability-resolution-mode.shared.d.ts +15 -3
  147. package/dist/esm/external-providers/engine-capability-resolution-mode.shared.d.ts.map +1 -1
  148. package/dist/esm/external-providers/engine-capability-resolution-mode.shared.js +32 -7
  149. package/dist/esm/external-providers/engine-capability-resolution-mode.shared.js.map +1 -1
  150. package/dist/esm/external-providers/frontend-bootstrap.shared.schemas.d.ts +84 -7
  151. package/dist/esm/external-providers/frontend-bootstrap.shared.schemas.d.ts.map +1 -1
  152. package/dist/esm/external-providers/frontend-capability-public-config.shared.schemas.d.ts +59 -0
  153. package/dist/esm/external-providers/frontend-capability-public-config.shared.schemas.d.ts.map +1 -0
  154. package/dist/esm/external-providers/frontend-capability-public-config.shared.schemas.js +61 -0
  155. package/dist/esm/external-providers/frontend-capability-public-config.shared.schemas.js.map +1 -0
  156. package/dist/esm/external-providers/frontend-capability-runtime.shared.types.d.ts +97 -0
  157. package/dist/esm/external-providers/frontend-capability-runtime.shared.types.d.ts.map +1 -0
  158. package/dist/esm/external-providers/frontend-capability-runtime.shared.types.js +41 -0
  159. package/dist/esm/external-providers/frontend-capability-runtime.shared.types.js.map +1 -0
  160. package/dist/esm/external-providers/frontend-provider-entry.shared.schemas.d.ts +148 -2
  161. package/dist/esm/external-providers/frontend-provider-entry.shared.schemas.d.ts.map +1 -1
  162. package/dist/esm/external-providers/frontend-provider-entry.shared.schemas.js +56 -1
  163. package/dist/esm/external-providers/frontend-provider-entry.shared.schemas.js.map +1 -1
  164. package/dist/esm/external-providers/provider-capability.shared.schemas.d.ts +9 -31
  165. package/dist/esm/external-providers/provider-capability.shared.schemas.d.ts.map +1 -1
  166. package/dist/esm/external-providers/provider-capability.shared.schemas.js +8 -5
  167. package/dist/esm/external-providers/provider-capability.shared.schemas.js.map +1 -1
  168. package/dist/esm/external-providers/provider-compliance-profile.shared.schemas.d.ts +18 -8
  169. package/dist/esm/external-providers/provider-compliance-profile.shared.schemas.d.ts.map +1 -1
  170. package/dist/esm/external-providers/provider-compliance-profile.shared.schemas.js +9 -4
  171. package/dist/esm/external-providers/provider-compliance-profile.shared.schemas.js.map +1 -1
  172. package/dist/esm/external-providers/provider-frontend-surface.shared.schemas.d.ts +338 -0
  173. package/dist/esm/external-providers/provider-frontend-surface.shared.schemas.d.ts.map +1 -0
  174. package/dist/esm/external-providers/provider-frontend-surface.shared.schemas.js +332 -0
  175. package/dist/esm/external-providers/provider-frontend-surface.shared.schemas.js.map +1 -0
  176. package/dist/esm/external-providers/provider-metadata.shared.schemas.d.ts +178 -9
  177. package/dist/esm/external-providers/provider-metadata.shared.schemas.d.ts.map +1 -1
  178. package/dist/esm/external-providers/provider-metadata.shared.schemas.js +181 -9
  179. package/dist/esm/external-providers/provider-metadata.shared.schemas.js.map +1 -1
  180. package/dist/esm/external-providers/provider-protocol.shared.schemas.d.ts +7 -5
  181. package/dist/esm/external-providers/provider-protocol.shared.schemas.d.ts.map +1 -1
  182. package/dist/esm/external-providers/provider-protocol.shared.schemas.js +7 -5
  183. package/dist/esm/external-providers/provider-protocol.shared.schemas.js.map +1 -1
  184. package/dist/esm/external-providers/provider-tier-rule.shared.utils.d.ts +40 -0
  185. package/dist/esm/external-providers/provider-tier-rule.shared.utils.d.ts.map +1 -0
  186. package/dist/esm/external-providers/provider-tier-rule.shared.utils.js +80 -0
  187. package/dist/esm/external-providers/provider-tier-rule.shared.utils.js.map +1 -0
  188. package/dist/esm/features/core-feature-definitions.shared.d.ts.map +1 -1
  189. package/dist/esm/features/core-feature-definitions.shared.js +7 -1
  190. package/dist/esm/features/core-feature-definitions.shared.js.map +1 -1
  191. package/dist/esm/features/feature-builders.shared.d.ts +32 -0
  192. package/dist/esm/features/feature-builders.shared.d.ts.map +1 -1
  193. package/dist/esm/features/feature-builders.shared.js +32 -0
  194. package/dist/esm/features/feature-builders.shared.js.map +1 -1
  195. package/dist/esm/features/user-features.shared.resources-config.schemas.d.ts +1 -1
  196. package/dist/esm/features/user-features.shared.resources-config.schemas.d.ts.map +1 -1
  197. package/dist/esm/features/user-features.shared.resources-config.schemas.js +48 -0
  198. package/dist/esm/features/user-features.shared.resources-config.schemas.js.map +1 -1
  199. package/dist/esm/files/file-upload-grant.shared.schemas.d.ts +156 -0
  200. package/dist/esm/files/file-upload-grant.shared.schemas.d.ts.map +1 -0
  201. package/dist/esm/files/file-upload-grant.shared.schemas.js +175 -0
  202. package/dist/esm/files/file-upload-grant.shared.schemas.js.map +1 -0
  203. package/dist/esm/files/files.shared.schemas.d.ts +52 -4
  204. package/dist/esm/files/files.shared.schemas.d.ts.map +1 -1
  205. package/dist/esm/files/files.shared.schemas.js +55 -4
  206. package/dist/esm/files/files.shared.schemas.js.map +1 -1
  207. package/dist/esm/flows-actors/a2a-push-delivery-log.shared.resources-config.schemas.d.ts +1 -1
  208. package/dist/esm/flows-actors/a2a-push-delivery-log.shared.resources-config.schemas.d.ts.map +1 -1
  209. package/dist/esm/flows-actors/a2a-push-delivery-log.shared.resources-config.schemas.js +33 -0
  210. package/dist/esm/flows-actors/a2a-push-delivery-log.shared.resources-config.schemas.js.map +1 -1
  211. package/dist/esm/flows-actors/a2a-push-delivery-log.shared.schemas.d.ts.map +1 -1
  212. package/dist/esm/flows-actors/a2a-push-delivery-log.shared.schemas.js +6 -2
  213. package/dist/esm/flows-actors/a2a-push-delivery-log.shared.schemas.js.map +1 -1
  214. package/dist/esm/flows-actors/a2a-token-budget-state.shared.resources-config.schemas.d.ts +1 -1
  215. package/dist/esm/flows-actors/a2a-token-budget-state.shared.resources-config.schemas.d.ts.map +1 -1
  216. package/dist/esm/flows-actors/a2a-token-budget-state.shared.resources-config.schemas.js +53 -0
  217. package/dist/esm/flows-actors/a2a-token-budget-state.shared.resources-config.schemas.js.map +1 -1
  218. package/dist/esm/flows-actors/actors.shared.schemas.d.ts.map +1 -1
  219. package/dist/esm/flows-actors/actors.shared.schemas.js +3 -2
  220. package/dist/esm/flows-actors/actors.shared.schemas.js.map +1 -1
  221. package/dist/esm/flows-actors/agents.shared.schemas.d.ts +54 -5
  222. package/dist/esm/flows-actors/agents.shared.schemas.d.ts.map +1 -1
  223. package/dist/esm/flows-actors/agents.shared.schemas.js.map +1 -1
  224. package/dist/esm/flows-actors/apps-blueprint/apps-blueprint.shared.schemas.d.ts +6 -6
  225. package/dist/esm/flows-actors/deliberation.shared.schemas.d.ts +0 -3
  226. package/dist/esm/flows-actors/deliberation.shared.schemas.d.ts.map +1 -1
  227. package/dist/esm/flows-actors/deliberation.shared.schemas.js +0 -5
  228. package/dist/esm/flows-actors/deliberation.shared.schemas.js.map +1 -1
  229. package/dist/esm/flows-actors/flows-actors-execution.shared.resources-config.schemas.d.ts +1 -1
  230. package/dist/esm/flows-actors/flows-actors-execution.shared.resources-config.schemas.d.ts.map +1 -1
  231. package/dist/esm/flows-actors/flows-actors-execution.shared.resources-config.schemas.js +43 -0
  232. package/dist/esm/flows-actors/flows-actors-execution.shared.resources-config.schemas.js.map +1 -1
  233. package/dist/esm/flows-actors/flows-actors-execution.shared.schemas.d.ts +14 -0
  234. package/dist/esm/flows-actors/flows-actors-execution.shared.schemas.d.ts.map +1 -1
  235. package/dist/esm/flows-actors/flows-actors-execution.shared.schemas.js +48 -6
  236. package/dist/esm/flows-actors/flows-actors-execution.shared.schemas.js.map +1 -1
  237. package/dist/esm/flows-actors/flows-actors-task.shared.resources-config.schemas.d.ts +1 -1
  238. package/dist/esm/flows-actors/flows-actors-task.shared.resources-config.schemas.d.ts.map +1 -1
  239. package/dist/esm/flows-actors/flows-actors-task.shared.resources-config.schemas.js +41 -0
  240. package/dist/esm/flows-actors/flows-actors-task.shared.resources-config.schemas.js.map +1 -1
  241. package/dist/esm/flows-actors/flows-actors-task.shared.schemas.d.ts +0 -7
  242. package/dist/esm/flows-actors/flows-actors-task.shared.schemas.d.ts.map +1 -1
  243. package/dist/esm/flows-actors/flows-actors-task.shared.schemas.js +23 -13
  244. package/dist/esm/flows-actors/flows-actors-task.shared.schemas.js.map +1 -1
  245. package/dist/esm/flows-actors/flows-actors.commons.shared.schemas.d.ts +19 -0
  246. package/dist/esm/flows-actors/flows-actors.commons.shared.schemas.d.ts.map +1 -1
  247. package/dist/esm/flows-actors/flows-actors.commons.shared.schemas.js +33 -0
  248. package/dist/esm/flows-actors/flows-actors.commons.shared.schemas.js.map +1 -1
  249. package/dist/esm/flows-actors/flows-actors.io.shared.schemas.d.ts +14 -9
  250. package/dist/esm/flows-actors/flows-actors.io.shared.schemas.d.ts.map +1 -1
  251. package/dist/esm/flows-actors/flows-actors.io.shared.schemas.js +14 -9
  252. package/dist/esm/flows-actors/flows-actors.io.shared.schemas.js.map +1 -1
  253. package/dist/esm/flows-actors/flows-actors.system.shared.schemas.d.ts.map +1 -1
  254. package/dist/esm/flows-actors/flows-actors.system.shared.schemas.js +3 -2
  255. package/dist/esm/flows-actors/flows-actors.system.shared.schemas.js.map +1 -1
  256. package/dist/esm/flows-actors/flows.shared.schemas.d.ts.map +1 -1
  257. package/dist/esm/flows-actors/flows.shared.schemas.js +3 -2
  258. package/dist/esm/flows-actors/flows.shared.schemas.js.map +1 -1
  259. package/dist/esm/flows-actors/mcp-servers.shared.schemas.d.ts +128 -0
  260. package/dist/esm/flows-actors/mcp-servers.shared.schemas.d.ts.map +1 -0
  261. package/dist/esm/flows-actors/mcp-servers.shared.schemas.js +142 -0
  262. package/dist/esm/flows-actors/mcp-servers.shared.schemas.js.map +1 -0
  263. package/dist/esm/flows-actors/meta-workflows/budget-authority.meta-workflows.shared.schemas.d.ts +0 -3
  264. package/dist/esm/flows-actors/meta-workflows/budget-authority.meta-workflows.shared.schemas.d.ts.map +1 -1
  265. package/dist/esm/flows-actors/meta-workflows/budget-authority.meta-workflows.shared.schemas.js +1 -4
  266. package/dist/esm/flows-actors/meta-workflows/budget-authority.meta-workflows.shared.schemas.js.map +1 -1
  267. package/dist/esm/flows-actors/meta-workflows/context-selection.meta-workflows.shared.schemas.d.ts +0 -16
  268. package/dist/esm/flows-actors/meta-workflows/context-selection.meta-workflows.shared.schemas.d.ts.map +1 -1
  269. package/dist/esm/flows-actors/meta-workflows/context-selection.meta-workflows.shared.schemas.js +1 -17
  270. package/dist/esm/flows-actors/meta-workflows/context-selection.meta-workflows.shared.schemas.js.map +1 -1
  271. package/dist/esm/flows-actors/meta-workflows/decisions.meta-workflows.shared.schemas.d.ts +3 -3
  272. package/dist/esm/flows-actors/meta-workflows/decisions.meta-workflows.shared.schemas.js +3 -3
  273. package/dist/esm/flows-actors/meta-workflows/decisions.meta-workflows.shared.schemas.js.map +1 -1
  274. package/dist/esm/flows-actors/meta-workflows/execution-binding-common.meta-workflows.shared.schemas.d.ts +2 -8
  275. package/dist/esm/flows-actors/meta-workflows/execution-binding-common.meta-workflows.shared.schemas.d.ts.map +1 -1
  276. package/dist/esm/flows-actors/meta-workflows/execution-binding-common.meta-workflows.shared.schemas.js +4 -15
  277. package/dist/esm/flows-actors/meta-workflows/execution-binding-common.meta-workflows.shared.schemas.js.map +1 -1
  278. package/dist/esm/guidance/guidance-state.shared.resources-config.schemas.d.ts +1 -1
  279. package/dist/esm/guidance/guidance-state.shared.resources-config.schemas.d.ts.map +1 -1
  280. package/dist/esm/guidance/guidance-state.shared.resources-config.schemas.js +51 -0
  281. package/dist/esm/guidance/guidance-state.shared.resources-config.schemas.js.map +1 -1
  282. package/dist/esm/guidance/guidance-state.shared.schemas.d.ts.map +1 -1
  283. package/dist/esm/guidance/guidance-state.shared.schemas.js +8 -2
  284. package/dist/esm/guidance/guidance-state.shared.schemas.js.map +1 -1
  285. package/dist/esm/guidance/guidance-state.shared.utils.d.ts.map +1 -1
  286. package/dist/esm/guidance/guidance-state.shared.utils.js +1 -0
  287. package/dist/esm/guidance/guidance-state.shared.utils.js.map +1 -1
  288. package/dist/esm/guidance/lifecycle-state.shared.resources-config.schemas.d.ts +1 -1
  289. package/dist/esm/guidance/lifecycle-state.shared.resources-config.schemas.d.ts.map +1 -1
  290. package/dist/esm/guidance/lifecycle-state.shared.resources-config.schemas.js +51 -0
  291. package/dist/esm/guidance/lifecycle-state.shared.resources-config.schemas.js.map +1 -1
  292. package/dist/esm/guidance/lifecycle-state.shared.schemas.d.ts.map +1 -1
  293. package/dist/esm/guidance/lifecycle-state.shared.schemas.js +28 -3
  294. package/dist/esm/guidance/lifecycle-state.shared.schemas.js.map +1 -1
  295. package/dist/esm/guidance/progression-state.shared.resources-config.schemas.d.ts +9 -1
  296. package/dist/esm/guidance/progression-state.shared.resources-config.schemas.d.ts.map +1 -1
  297. package/dist/esm/guidance/progression-state.shared.resources-config.schemas.js +51 -0
  298. package/dist/esm/guidance/progression-state.shared.resources-config.schemas.js.map +1 -1
  299. package/dist/esm/guidance/progression-state.shared.schemas.d.ts +46 -0
  300. package/dist/esm/guidance/progression-state.shared.schemas.d.ts.map +1 -1
  301. package/dist/esm/guidance/progression-state.shared.schemas.js +67 -4
  302. package/dist/esm/guidance/progression-state.shared.schemas.js.map +1 -1
  303. package/dist/esm/http-api-binding/http-api-binding.shared.schemas.d.ts +356 -52
  304. package/dist/esm/http-api-binding/http-api-binding.shared.schemas.d.ts.map +1 -1
  305. package/dist/esm/http-api-binding/http-api-binding.shared.schemas.js +166 -39
  306. package/dist/esm/http-api-binding/http-api-binding.shared.schemas.js.map +1 -1
  307. package/dist/esm/index.d.ts +15 -0
  308. package/dist/esm/index.d.ts.map +1 -1
  309. package/dist/esm/index.js +15 -0
  310. package/dist/esm/index.js.map +1 -1
  311. package/dist/esm/notifications/email/email-template-registry.shared.schemas.d.ts +11 -2
  312. package/dist/esm/notifications/email/email-template-registry.shared.schemas.d.ts.map +1 -1
  313. package/dist/esm/notifications/email/email-template-registry.shared.schemas.js.map +1 -1
  314. package/dist/esm/notifications/email/email-template.shared.enums.d.ts +15 -0
  315. package/dist/esm/notifications/email/email-template.shared.enums.d.ts.map +1 -1
  316. package/dist/esm/notifications/email/email-template.shared.enums.js +15 -0
  317. package/dist/esm/notifications/email/email-template.shared.enums.js.map +1 -1
  318. package/dist/esm/notifications/m2m/m2m-webhook-delivery-contract.shared.d.ts +70 -0
  319. package/dist/esm/notifications/m2m/m2m-webhook-delivery-contract.shared.d.ts.map +1 -0
  320. package/dist/esm/notifications/m2m/m2m-webhook-delivery-contract.shared.js +71 -0
  321. package/dist/esm/notifications/m2m/m2m-webhook-delivery-contract.shared.js.map +1 -0
  322. package/dist/esm/notifications/m2m/webhook-config.shared.resources-config.schemas.d.ts +1 -0
  323. package/dist/esm/notifications/m2m/webhook-config.shared.resources-config.schemas.d.ts.map +1 -1
  324. package/dist/esm/notifications/m2m/webhook-config.shared.resources-config.schemas.js +19 -0
  325. package/dist/esm/notifications/m2m/webhook-config.shared.resources-config.schemas.js.map +1 -1
  326. package/dist/esm/notifications/m2m/webhook-config.shared.schemas.d.ts +30 -0
  327. package/dist/esm/notifications/m2m/webhook-config.shared.schemas.d.ts.map +1 -1
  328. package/dist/esm/notifications/m2m/webhook-config.shared.schemas.js +65 -1
  329. package/dist/esm/notifications/m2m/webhook-config.shared.schemas.js.map +1 -1
  330. package/dist/esm/notifications/notification-badges.core.definitions.d.ts +6 -4
  331. package/dist/esm/notifications/notification-badges.core.definitions.d.ts.map +1 -1
  332. package/dist/esm/notifications/notification-badges.core.definitions.js +6 -4
  333. package/dist/esm/notifications/notification-badges.core.definitions.js.map +1 -1
  334. package/dist/esm/notifications/notification-badges.schemas.d.ts +167 -5
  335. package/dist/esm/notifications/notification-badges.schemas.d.ts.map +1 -1
  336. package/dist/esm/notifications/notification-badges.schemas.js +191 -6
  337. package/dist/esm/notifications/notification-badges.schemas.js.map +1 -1
  338. package/dist/esm/notifications/notification-badges.shared.resources-config.schemas.d.ts +1 -1
  339. package/dist/esm/notifications/notification-badges.shared.resources-config.schemas.d.ts.map +1 -1
  340. package/dist/esm/notifications/notification-badges.shared.resources-config.schemas.js +36 -0
  341. package/dist/esm/notifications/notification-badges.shared.resources-config.schemas.js.map +1 -1
  342. package/dist/esm/notifications/notifications.shared.schemas.d.ts +107 -0
  343. package/dist/esm/notifications/notifications.shared.schemas.d.ts.map +1 -1
  344. package/dist/esm/notifications/notifications.shared.schemas.js +149 -1
  345. package/dist/esm/notifications/notifications.shared.schemas.js.map +1 -1
  346. package/dist/esm/organizations/organization-members.shared.resources-config.schemas.d.ts +1 -1
  347. package/dist/esm/organizations/organization-members.shared.resources-config.schemas.d.ts.map +1 -1
  348. package/dist/esm/organizations/organization-members.shared.resources-config.schemas.js +44 -0
  349. package/dist/esm/organizations/organization-members.shared.resources-config.schemas.js.map +1 -1
  350. package/dist/esm/organizations/organization-members.shared.schemas.d.ts.map +1 -1
  351. package/dist/esm/organizations/organization-members.shared.schemas.js +15 -4
  352. package/dist/esm/organizations/organization-members.shared.schemas.js.map +1 -1
  353. package/dist/esm/organizations/organization-notifications.shared.schemas.d.ts.map +1 -1
  354. package/dist/esm/organizations/organization-notifications.shared.schemas.js +22 -1
  355. package/dist/esm/organizations/organization-notifications.shared.schemas.js.map +1 -1
  356. package/dist/esm/organizations/organization-preferences.shared.schemas.d.ts +26 -0
  357. package/dist/esm/organizations/organization-preferences.shared.schemas.d.ts.map +1 -1
  358. package/dist/esm/organizations/organization-preferences.shared.schemas.js +25 -0
  359. package/dist/esm/organizations/organization-preferences.shared.schemas.js.map +1 -1
  360. package/dist/esm/organizations/organization-profile.shared.schemas.d.ts +25 -0
  361. package/dist/esm/organizations/organization-profile.shared.schemas.d.ts.map +1 -1
  362. package/dist/esm/organizations/organization-profile.shared.schemas.js +42 -17
  363. package/dist/esm/organizations/organization-profile.shared.schemas.js.map +1 -1
  364. package/dist/esm/organizations/organization-unit-narrowing.shared.d.ts +3 -2
  365. package/dist/esm/organizations/organization-unit-narrowing.shared.d.ts.map +1 -1
  366. package/dist/esm/organizations/organization-unit-narrowing.shared.js +9 -2
  367. package/dist/esm/organizations/organization-unit-narrowing.shared.js.map +1 -1
  368. package/dist/esm/organizations/organizations.shared.resources-config.schemas.d.ts.map +1 -1
  369. package/dist/esm/organizations/organizations.shared.resources-config.schemas.js +35 -12
  370. package/dist/esm/organizations/organizations.shared.resources-config.schemas.js.map +1 -1
  371. package/dist/esm/public-runtime/index.d.ts +49 -2
  372. package/dist/esm/public-runtime/index.d.ts.map +1 -1
  373. package/dist/esm/public-runtime/index.js +48 -1
  374. package/dist/esm/public-runtime/index.js.map +1 -1
  375. package/dist/esm/queue/jobs.shared.resources-config.schemas.d.ts +6 -5
  376. package/dist/esm/queue/jobs.shared.resources-config.schemas.d.ts.map +1 -1
  377. package/dist/esm/queue/jobs.shared.resources-config.schemas.js +23 -5
  378. package/dist/esm/queue/jobs.shared.resources-config.schemas.js.map +1 -1
  379. package/dist/esm/queue/jobs.shared.schemas.d.ts +16 -3
  380. package/dist/esm/queue/jobs.shared.schemas.d.ts.map +1 -1
  381. package/dist/esm/queue/jobs.shared.schemas.js +16 -3
  382. package/dist/esm/queue/jobs.shared.schemas.js.map +1 -1
  383. package/dist/esm/requests/manual-controllers-routes-documentation.d.ts +137 -0
  384. package/dist/esm/requests/manual-controllers-routes-documentation.d.ts.map +1 -0
  385. package/dist/esm/requests/manual-controllers-routes-documentation.js +1201 -0
  386. package/dist/esm/requests/manual-controllers-routes-documentation.js.map +1 -0
  387. package/dist/esm/requests/manual-controllers-routes-urls.d.ts +67 -0
  388. package/dist/esm/requests/manual-controllers-routes-urls.d.ts.map +1 -1
  389. package/dist/esm/requests/manual-controllers-routes-urls.js +78 -0
  390. package/dist/esm/requests/manual-controllers-routes-urls.js.map +1 -1
  391. package/dist/esm/requests/rate-limits.shared.schemas.d.ts +11 -1
  392. package/dist/esm/requests/rate-limits.shared.schemas.d.ts.map +1 -1
  393. package/dist/esm/requests/rate-limits.shared.schemas.js +11 -1
  394. package/dist/esm/requests/rate-limits.shared.schemas.js.map +1 -1
  395. package/dist/esm/requests/websocket.shared.schemas.d.ts +86 -4
  396. package/dist/esm/requests/websocket.shared.schemas.d.ts.map +1 -1
  397. package/dist/esm/requests/websocket.shared.schemas.js +138 -0
  398. package/dist/esm/requests/websocket.shared.schemas.js.map +1 -1
  399. package/dist/esm/resources/collection-query-parameters.shared.d.ts +22 -0
  400. package/dist/esm/resources/collection-query-parameters.shared.d.ts.map +1 -0
  401. package/dist/esm/resources/collection-query-parameters.shared.js +22 -0
  402. package/dist/esm/resources/collection-query-parameters.shared.js.map +1 -0
  403. package/dist/esm/resources/resources-config.shared.factory.d.ts +1 -0
  404. package/dist/esm/resources/resources-config.shared.factory.d.ts.map +1 -1
  405. package/dist/esm/resources/resources-config.shared.factory.js +189 -31
  406. package/dist/esm/resources/resources-config.shared.factory.js.map +1 -1
  407. package/dist/esm/resources/resources-config.shared.schemas.d.ts +395 -92
  408. package/dist/esm/resources/resources-config.shared.schemas.d.ts.map +1 -1
  409. package/dist/esm/resources/resources-config.shared.schemas.js +109 -20
  410. package/dist/esm/resources/resources-config.shared.schemas.js.map +1 -1
  411. package/dist/esm/resources/resources-registry.shared.core.definitions.d.ts.map +1 -1
  412. package/dist/esm/resources/resources-registry.shared.core.definitions.js +97 -5
  413. package/dist/esm/resources/resources-registry.shared.core.definitions.js.map +1 -1
  414. package/dist/esm/resources/resources-relationships.shared.factory.d.ts.map +1 -1
  415. package/dist/esm/resources/resources-relationships.shared.factory.js +15 -0
  416. package/dist/esm/resources/resources-relationships.shared.factory.js.map +1 -1
  417. package/dist/esm/resources/resources.shared.core.definitions.d.ts +37 -0
  418. package/dist/esm/resources/resources.shared.core.definitions.d.ts.map +1 -1
  419. package/dist/esm/resources/resources.shared.core.definitions.js +51 -0
  420. package/dist/esm/resources/resources.shared.core.definitions.js.map +1 -1
  421. package/dist/esm/resources/resources.shared.schemas.d.ts +11 -2
  422. package/dist/esm/resources/resources.shared.schemas.d.ts.map +1 -1
  423. package/dist/esm/resources/resources.shared.schemas.js +34 -3
  424. package/dist/esm/resources/resources.shared.schemas.js.map +1 -1
  425. package/dist/esm/resources/utils/field-value-disclosure.utils.d.ts +51 -0
  426. package/dist/esm/resources/utils/field-value-disclosure.utils.d.ts.map +1 -0
  427. package/dist/esm/resources/utils/field-value-disclosure.utils.js +53 -0
  428. package/dist/esm/resources/utils/field-value-disclosure.utils.js.map +1 -0
  429. package/dist/esm/resources/utils/resources-config-operations.dtos-builder.utils.d.ts.map +1 -1
  430. package/dist/esm/resources/utils/resources-config-operations.dtos-builder.utils.js +21 -6
  431. package/dist/esm/resources/utils/resources-config-operations.dtos-builder.utils.js.map +1 -1
  432. package/dist/esm/resources/utils/resources-summary.utils.d.ts +16 -2
  433. package/dist/esm/resources/utils/resources-summary.utils.d.ts.map +1 -1
  434. package/dist/esm/resources/utils/resources-summary.utils.js +19 -5
  435. package/dist/esm/resources/utils/resources-summary.utils.js.map +1 -1
  436. package/dist/esm/resources/utils/shared-persistence-collection.utils.d.ts.map +1 -1
  437. package/dist/esm/resources/utils/shared-persistence-collection.utils.js +11 -0
  438. package/dist/esm/resources/utils/shared-persistence-collection.utils.js.map +1 -1
  439. package/dist/esm/runtime/domain-module.shared.definitions.d.ts +25 -0
  440. package/dist/esm/runtime/domain-module.shared.definitions.d.ts.map +1 -1
  441. package/dist/esm/runtime/domain-module.shared.definitions.js.map +1 -1
  442. package/dist/esm/security/api-keys/api-keys-application.shared.resources-config.schemas.d.ts +1 -0
  443. package/dist/esm/security/api-keys/api-keys-application.shared.resources-config.schemas.d.ts.map +1 -1
  444. package/dist/esm/security/api-keys/api-keys-application.shared.resources-config.schemas.js +38 -0
  445. package/dist/esm/security/api-keys/api-keys-application.shared.resources-config.schemas.js.map +1 -1
  446. package/dist/esm/security/api-keys/api-keys-organization.shared.resources-config.schemas.d.ts +1 -0
  447. package/dist/esm/security/api-keys/api-keys-organization.shared.resources-config.schemas.d.ts.map +1 -1
  448. package/dist/esm/security/api-keys/api-keys-organization.shared.resources-config.schemas.js +38 -0
  449. package/dist/esm/security/api-keys/api-keys-organization.shared.resources-config.schemas.js.map +1 -1
  450. package/dist/esm/security/authentications/authentication.shared.dto.schemas.d.ts +4 -11
  451. package/dist/esm/security/authentications/authentication.shared.dto.schemas.d.ts.map +1 -1
  452. package/dist/esm/security/authentications/authentication.shared.dto.schemas.js +0 -1
  453. package/dist/esm/security/authentications/authentication.shared.dto.schemas.js.map +1 -1
  454. package/dist/esm/security/authentications/authentication.shared.schemas.d.ts +141 -5
  455. package/dist/esm/security/authentications/authentication.shared.schemas.d.ts.map +1 -1
  456. package/dist/esm/security/authentications/authentication.shared.schemas.js +147 -3
  457. package/dist/esm/security/authentications/authentication.shared.schemas.js.map +1 -1
  458. package/dist/esm/security/authentications/consumable-token.shared.schemas.d.ts +17 -1
  459. package/dist/esm/security/authentications/consumable-token.shared.schemas.d.ts.map +1 -1
  460. package/dist/esm/security/authentications/consumable-token.shared.schemas.js +16 -0
  461. package/dist/esm/security/authentications/consumable-token.shared.schemas.js.map +1 -1
  462. package/dist/esm/security/authentications/mfa-backup-code-contract.shared.d.ts +28 -0
  463. package/dist/esm/security/authentications/mfa-backup-code-contract.shared.d.ts.map +1 -0
  464. package/dist/esm/security/authentications/mfa-backup-code-contract.shared.js +28 -0
  465. package/dist/esm/security/authentications/mfa-backup-code-contract.shared.js.map +1 -0
  466. package/dist/esm/security/authentications/registration.shared.dto.schemas.d.ts +1 -0
  467. package/dist/esm/security/authentications/registration.shared.dto.schemas.d.ts.map +1 -1
  468. package/dist/esm/security/authentications/registration.shared.dto.schemas.js +11 -0
  469. package/dist/esm/security/authentications/registration.shared.dto.schemas.js.map +1 -1
  470. package/dist/esm/security/authentications/scim/scim-provisioning-config.shared.schemas.d.ts +15 -0
  471. package/dist/esm/security/authentications/scim/scim-provisioning-config.shared.schemas.d.ts.map +1 -1
  472. package/dist/esm/security/authentications/scim/scim-provisioning-config.shared.schemas.js +21 -4
  473. package/dist/esm/security/authentications/scim/scim-provisioning-config.shared.schemas.js.map +1 -1
  474. package/dist/esm/security/authentications/siem/siem-delivery-reliability-contract.shared.d.ts +21 -0
  475. package/dist/esm/security/authentications/siem/siem-delivery-reliability-contract.shared.d.ts.map +1 -0
  476. package/dist/esm/security/authentications/siem/siem-delivery-reliability-contract.shared.js +21 -0
  477. package/dist/esm/security/authentications/siem/siem-delivery-reliability-contract.shared.js.map +1 -0
  478. package/dist/esm/security/authentications/sso/sso-config.shared.resources-config.schemas.d.ts +61 -1
  479. package/dist/esm/security/authentications/sso/sso-config.shared.resources-config.schemas.d.ts.map +1 -1
  480. package/dist/esm/security/authentications/sso/sso-config.shared.resources-config.schemas.js +208 -6
  481. package/dist/esm/security/authentications/sso/sso-config.shared.resources-config.schemas.js.map +1 -1
  482. package/dist/esm/security/authentications/sso/sso-config.shared.schemas.d.ts +37 -27
  483. package/dist/esm/security/authentications/sso/sso-config.shared.schemas.d.ts.map +1 -1
  484. package/dist/esm/security/authentications/sso/sso-config.shared.schemas.js +134 -12
  485. package/dist/esm/security/authentications/sso/sso-config.shared.schemas.js.map +1 -1
  486. package/dist/esm/security/authentications/sso/sso-connection.shared.schemas.d.ts +0 -6
  487. package/dist/esm/security/authentications/sso/sso-connection.shared.schemas.d.ts.map +1 -1
  488. package/dist/esm/security/authentications/sso/sso-connection.shared.schemas.js +17 -8
  489. package/dist/esm/security/authentications/sso/sso-connection.shared.schemas.js.map +1 -1
  490. package/dist/esm/security/authorizations/platform-access-grants.shared.resources-config.schemas.d.ts +1 -1
  491. package/dist/esm/security/authorizations/platform-access-grants.shared.resources-config.schemas.d.ts.map +1 -1
  492. package/dist/esm/security/authorizations/platform-access-grants.shared.resources-config.schemas.js +70 -0
  493. package/dist/esm/security/authorizations/platform-access-grants.shared.resources-config.schemas.js.map +1 -1
  494. package/dist/esm/security/authorizations/platform-access-grants.shared.schemas.d.ts +45 -8
  495. package/dist/esm/security/authorizations/platform-access-grants.shared.schemas.d.ts.map +1 -1
  496. package/dist/esm/security/authorizations/platform-access-grants.shared.schemas.js +56 -10
  497. package/dist/esm/security/authorizations/platform-access-grants.shared.schemas.js.map +1 -1
  498. package/dist/esm/security/authorizations/roles.shared.schemas.d.ts +16 -1
  499. package/dist/esm/security/authorizations/roles.shared.schemas.d.ts.map +1 -1
  500. package/dist/esm/security/authorizations/roles.shared.schemas.js +16 -1
  501. package/dist/esm/security/authorizations/roles.shared.schemas.js.map +1 -1
  502. package/dist/esm/security/authorizations/roles.shared.utils.d.ts +54 -0
  503. package/dist/esm/security/authorizations/roles.shared.utils.d.ts.map +1 -1
  504. package/dist/esm/security/authorizations/roles.shared.utils.js +59 -0
  505. package/dist/esm/security/authorizations/roles.shared.utils.js.map +1 -1
  506. package/dist/esm/security/connected-accounts/provider-credentials-organization.shared.resources-config.schemas.d.ts +31 -0
  507. package/dist/esm/security/connected-accounts/provider-credentials-organization.shared.resources-config.schemas.d.ts.map +1 -0
  508. package/dist/esm/security/connected-accounts/provider-credentials-organization.shared.resources-config.schemas.js +198 -0
  509. package/dist/esm/security/connected-accounts/provider-credentials-organization.shared.resources-config.schemas.js.map +1 -0
  510. package/dist/esm/security/connected-accounts/provider-credentials-user.shared.resources-config.schemas.d.ts +31 -0
  511. package/dist/esm/security/connected-accounts/provider-credentials-user.shared.resources-config.schemas.d.ts.map +1 -0
  512. package/dist/esm/security/connected-accounts/provider-credentials-user.shared.resources-config.schemas.js +191 -0
  513. package/dist/esm/security/connected-accounts/provider-credentials-user.shared.resources-config.schemas.js.map +1 -0
  514. package/dist/esm/security/connected-accounts/provider-credentials.shared.schemas.d.ts +250 -0
  515. package/dist/esm/security/connected-accounts/provider-credentials.shared.schemas.d.ts.map +1 -0
  516. package/dist/esm/security/connected-accounts/provider-credentials.shared.schemas.js +486 -0
  517. package/dist/esm/security/connected-accounts/provider-credentials.shared.schemas.js.map +1 -0
  518. package/dist/esm/security/oauth-clients/oauth-clients-application.shared.resources-config.schemas.d.ts +4 -1
  519. package/dist/esm/security/oauth-clients/oauth-clients-application.shared.resources-config.schemas.d.ts.map +1 -1
  520. package/dist/esm/security/oauth-clients/oauth-clients-application.shared.resources-config.schemas.js +29 -0
  521. package/dist/esm/security/oauth-clients/oauth-clients-application.shared.resources-config.schemas.js.map +1 -1
  522. package/dist/esm/security/oauth-clients/oauth-clients-organization.shared.resources-config.schemas.d.ts +4 -1
  523. package/dist/esm/security/oauth-clients/oauth-clients-organization.shared.resources-config.schemas.d.ts.map +1 -1
  524. package/dist/esm/security/oauth-clients/oauth-clients-organization.shared.resources-config.schemas.js +29 -0
  525. package/dist/esm/security/oauth-clients/oauth-clients-organization.shared.resources-config.schemas.js.map +1 -1
  526. package/dist/esm/security/oauth-clients/oauth-clients.shared.schemas.d.ts +67 -0
  527. package/dist/esm/security/oauth-clients/oauth-clients.shared.schemas.d.ts.map +1 -1
  528. package/dist/esm/security/oauth-clients/oauth-clients.shared.schemas.js +44 -1
  529. package/dist/esm/security/oauth-clients/oauth-clients.shared.schemas.js.map +1 -1
  530. package/dist/esm/security/oauth-clients/oauth-consent-grants.shared.resources-config.schemas.d.ts +1 -1
  531. package/dist/esm/security/oauth-clients/oauth-consent-grants.shared.resources-config.schemas.d.ts.map +1 -1
  532. package/dist/esm/security/oauth-clients/oauth-consent-grants.shared.resources-config.schemas.js +35 -0
  533. package/dist/esm/security/oauth-clients/oauth-consent-grants.shared.resources-config.schemas.js.map +1 -1
  534. package/dist/esm/security/oauth-clients/oauth-consent-grants.shared.schemas.d.ts +13 -0
  535. package/dist/esm/security/oauth-clients/oauth-consent-grants.shared.schemas.d.ts.map +1 -1
  536. package/dist/esm/security/oauth-clients/oauth-consent-grants.shared.schemas.js +31 -4
  537. package/dist/esm/security/oauth-clients/oauth-consent-grants.shared.schemas.js.map +1 -1
  538. package/dist/esm/users/inbound-contacts.shared.resources-config.schemas.d.ts +1 -1
  539. package/dist/esm/users/inbound-contacts.shared.resources-config.schemas.d.ts.map +1 -1
  540. package/dist/esm/users/inbound-contacts.shared.resources-config.schemas.js +34 -0
  541. package/dist/esm/users/inbound-contacts.shared.resources-config.schemas.js.map +1 -1
  542. package/dist/esm/users/inbound-contacts.shared.schemas.d.ts.map +1 -1
  543. package/dist/esm/users/inbound-contacts.shared.schemas.js +7 -4
  544. package/dist/esm/users/inbound-contacts.shared.schemas.js.map +1 -1
  545. package/dist/esm/users/user-credentials.shared.resources-config.schemas.d.ts +1 -1
  546. package/dist/esm/users/user-credentials.shared.resources-config.schemas.d.ts.map +1 -1
  547. package/dist/esm/users/user-credentials.shared.resources-config.schemas.js +37 -0
  548. package/dist/esm/users/user-credentials.shared.resources-config.schemas.js.map +1 -1
  549. package/dist/esm/users/user-credentials.shared.schemas.d.ts.map +1 -1
  550. package/dist/esm/users/user-credentials.shared.schemas.js +17 -2
  551. package/dist/esm/users/user-credentials.shared.schemas.js.map +1 -1
  552. package/dist/esm/users/user-identity-links.shared.resources-config.schemas.d.ts +1 -1
  553. package/dist/esm/users/user-identity-links.shared.resources-config.schemas.d.ts.map +1 -1
  554. package/dist/esm/users/user-identity-links.shared.resources-config.schemas.js +36 -0
  555. package/dist/esm/users/user-identity-links.shared.resources-config.schemas.js.map +1 -1
  556. package/dist/esm/users/user-identity-links.shared.schemas.d.ts.map +1 -1
  557. package/dist/esm/users/user-identity-links.shared.schemas.js +15 -5
  558. package/dist/esm/users/user-identity-links.shared.schemas.js.map +1 -1
  559. package/dist/esm/users/user-preferences.shared.resources-config.schemas.d.ts +5 -5
  560. package/dist/esm/users/user-preferences.shared.resources-config.schemas.d.ts.map +1 -1
  561. package/dist/esm/users/user-preferences.shared.resources-config.schemas.js +53 -0
  562. package/dist/esm/users/user-preferences.shared.resources-config.schemas.js.map +1 -1
  563. package/dist/esm/users/user-profiles.shared.resources-config.schemas.d.ts +1 -1
  564. package/dist/esm/users/user-profiles.shared.resources-config.schemas.d.ts.map +1 -1
  565. package/dist/esm/users/user-profiles.shared.resources-config.schemas.js +62 -0
  566. package/dist/esm/users/user-profiles.shared.resources-config.schemas.js.map +1 -1
  567. package/dist/esm/users/user-self-preferences.shared.resources-config.schemas.d.ts +5 -5
  568. package/dist/esm/users/user-self-preferences.shared.resources-config.schemas.d.ts.map +1 -1
  569. package/dist/esm/users/user-self-preferences.shared.resources-config.schemas.js +53 -0
  570. package/dist/esm/users/user-self-preferences.shared.resources-config.schemas.js.map +1 -1
  571. package/dist/esm/users/user-self-profiles.shared.resources-config.schemas.d.ts +1 -1
  572. package/dist/esm/users/user-self-profiles.shared.resources-config.schemas.d.ts.map +1 -1
  573. package/dist/esm/users/user-self-profiles.shared.resources-config.schemas.js +62 -0
  574. package/dist/esm/users/user-self-profiles.shared.resources-config.schemas.js.map +1 -1
  575. package/dist/esm/users/user-self.shared.resources-config.schemas.d.ts.map +1 -1
  576. package/dist/esm/users/user-self.shared.resources-config.schemas.js +33 -3
  577. package/dist/esm/users/user-self.shared.resources-config.schemas.js.map +1 -1
  578. package/dist/esm/users/users.shared.resources-config.schemas.d.ts +17 -1
  579. package/dist/esm/users/users.shared.resources-config.schemas.d.ts.map +1 -1
  580. package/dist/esm/users/users.shared.resources-config.schemas.js +136 -5
  581. package/dist/esm/users/users.shared.resources-config.schemas.js.map +1 -1
  582. package/dist/esm/users/users.shared.schemas.d.ts +62 -12
  583. package/dist/esm/users/users.shared.schemas.d.ts.map +1 -1
  584. package/dist/esm/users/users.shared.schemas.js +79 -23
  585. package/dist/esm/users/users.shared.schemas.js.map +1 -1
  586. package/dist/tsconfig.build.tsbuildinfo +1 -1
  587. package/package.json +5 -6
  588. package/dist/esm/.builder.pid +0 -9
@@ -1 +1 @@
1
- {"version":3,"file":"authentication.shared.schemas.js","sourceRoot":"","sources":["../../../../../src/security/authentications/authentication.shared.schemas.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EAAE,gBAAgB,EAAE,kCAAkC,EAAE,MAAM,mDAAmD,CAAC;AAGzH;;;;;;;GAOG;AAGH,MAAM,CAAC,MAAM,mBAAmB,GAAmC;IACjE,EAAE,kBAAkB,EAAE,gBAAgB,CAAC,aAAa,EAAE,qBAAqB,EAAE,kCAAkC,CAAC,gBAAgB,CAAC,aAAa,CAAC,EAAE,cAAc,EAAE,IAAI,EAAE;IACvK,EAAE,kBAAkB,EAAE,gBAAgB,CAAC,WAAW,EAAI,qBAAqB,EAAE,kCAAkC,CAAC,gBAAgB,CAAC,WAAW,CAAC,EAAI,cAAc,EAAE,IAAI,EAAE;CACxK,CAAC;AAGF,kCAAkC;AAClC,oCAAoC;AACpC,kCAAkC;AAElC;;;GAGG;AACH,MAAM,CAAN,IAAY,cAKX;AALD,WAAY,cAAc;IACxB,2CAAyB,CAAA;IACzB,6CAA2B,CAAA;IAC3B,qDAAmC,CAAA;IACnC,6BAAW,CAAA,CAAsB,4DAA4D;AAC/F,CAAC,EALW,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,CAAA;IACrC,4DAAmC,CAAA;IACnC,0DAAiC,CAAA;IACjC,sDAA6B,CAAA;AAC/B,CAAC,EANW,qBAAqB,KAArB,qBAAqB,QAMhC;AAED;;;;;;GAMG;AACH,MAAM,CAAN,IAAY,iBAGX;AAHD,WAAY,iBAAiB;IAC3B,sCAAiB,CAAA;IACjB,8CAAyB,CAAA;AAC3B,CAAC,EAHW,iBAAiB,KAAjB,iBAAiB,QAG5B;AAED;;;;;GAKG;AACH,MAAM,CAAN,IAAY,sBAKX;AALD,WAAY,sBAAsB;IAChC,2CAAiB,CAAA;IACjB,uCAAa,CAAA;IACb,uCAAa,CAAA;IACb,uCAAa,CAAA;AACf,CAAC,EALW,sBAAsB,KAAtB,sBAAsB,QAKjC","sourcesContent":["/**\n * Authentication Shared Schemas\n *\n * Core authentication schemas shared between frontend and backend\n */\n\nimport { z } from 'zod';\n\nimport { CoreResourceType, coreResourceShared_FieldIdentifier } from '../../resources/resources.shared.core.definitions';\nimport type { PolymorphicVariantDefinition } from '../../resources/utils/resource-polymorphism.schemas';\n\n/**\n * Auth Scope Variants (Shared)\n *\n * The 2 auth scope variants — shared across all auth polymorphic resources\n * (SsoConfig, SsoConnection, SiemExportConfig, SiemDeliveryDlq,\n * ScimTokens, ScimProvisioningConfig).\n *\n */\n\n\nexport const AUTH_SCOPE_VARIANTS: PolymorphicVariantDefinition[] = [\n { parentResourceType: CoreResourceType.ORGANIZATIONS, parentFieldIdentifier: coreResourceShared_FieldIdentifier[CoreResourceType.ORGANIZATIONS], isPrimaryScope: true },\n { parentResourceType: CoreResourceType.APPLICATION, parentFieldIdentifier: coreResourceShared_FieldIdentifier[CoreResourceType.APPLICATION], isPrimaryScope: true },\n];\n\n\n// ===============================\n// AUTHENTICATION METHOD DEFINITIONS\n// ===============================\n\n/**\n * Authentication Factor Classification\n * Defines when an authentication method can be used in the flow\n */\nexport enum AuthFactorType {\n FIRST_ONLY = 'FIRST_ONLY', // Can only be used as first factor (primary auth)\n SECOND_ONLY = 'SECOND_ONLY', // Can only be used as second factor (MFA)\n FIRST_OR_SECOND = 'FIRST_OR_SECOND', // Can be used as either first or second factor\n ANY = 'ANY' // Can be used in any context (first, second, or standalone)\n}\n\n/**\n * Authentication Method Categories\n * Separates different types of authentication methods by scope and configuration\n */\nexport enum AuthMethodCategory {\n CREDENTIAL = 'CREDENTIAL', // Password-based credentials\n EXTERNAL_OAUTH2 = 'EXTERNAL_OAUTH2', // Extensible third-party SaaS OAuth2 (application-level)\n ORG_SSO = 'ORG_SSO', // Organization-restricted SSO (SAML/OpenID Connect)\n MFA_TOKEN = 'MFA_TOKEN', // Time-based or generated tokens for MFA\n BIOMETRIC = 'BIOMETRIC' // Modern biometric/passwordless methods\n}\n\n/**\n * Authentication Method Types with Factor Classification and Categories\n * Core authentication methods - extensible at application level\n */\nexport enum AuthMethod {\n // Credential-based (First factor only)\n PASSWORD = 'PASSWORD',\n\n // Third-party SaaS OAuth2 (Application-level, extensible, any factor)\n EXTERNAL_OAUTH2 = 'EXTERNAL_OAUTH2', // Generic extensible OAuth2 provider\n\n // Organization-restricted SSO (First or second factor)\n ORG_SAML = 'ORG_SAML', // Organization SAML SSO\n ORG_OPENID_CONNECT = 'ORG_OPENID_CONNECT', // Organization OpenID Connect SSO\n\n // Passwordless (First factor only)\n MAGIC_LINK = 'MAGIC_LINK', // Magic Link via email\n\n // MFA tokens (Second factor only, except SMS_OTP which is FIRST_OR_SECOND)\n TOTP = 'TOTP', // Time-based One-Time Password\n SMS_OTP = 'SMS_OTP', // SMS One-Time Password\n EMAIL_OTP = 'EMAIL_OTP', // Email One-Time Password\n\n // Biometric/Modern (First or second factor)\n PASSKEY = 'PASSKEY' // WebAuthn/FIDO2 Passkeys\n}\n\n/**\n * Authentication Factor Levels\n */\nexport enum AuthFactor {\n SINGLE = 'SINGLE', // Single factor authentication\n MULTI = 'MULTI' // Multi-factor authentication required\n}\n\n/**\n * Authentication Factor Level (First or Second Factor)\n */\nexport enum AuthFactorLevel {\n IDENTIFICATION = 'IDENTIFICATION', // Identification only\n FIRST = 'FIRST', // First factor authentication\n SECOND = 'SECOND' // Second factor authentication (MFA)\n}\n\n/**\n * W4: Next step hint for frontend routing after auth state transitions.\n * Drives UI flow (MFA enrollment, onboarding, email verification, etc.).\n */\nexport enum AuthNextStep {\n MFA_ENROLLMENT = 'mfa_enrollment',\n ONBOARDING = 'onboarding',\n COMPLETE = 'complete',\n EMAIL_VERIFICATION = 'email_verification',\n PASSWORD_CHANGE = 'password_change',\n}\n\n/**\n * W4.2: Session purpose — drives UI rendering and valid state transitions.\n */\nexport enum AuthSessionPurpose {\n LOGIN = 'login',\n REGISTRATION = 'registration',\n INVITATION = 'invitation',\n REAUTH = 'reauth',\n DEVICE_AUTH = 'device_auth',\n}\n\n/**\n * W4.6: MFA enrollment lifecycle state on UserCredentials.\n * Computed at user creation and updated on enrollment completion.\n */\nexport enum MfaEnrollmentState {\n NOT_REQUIRED = 'not_required',\n PENDING = 'pending',\n GRACE = 'grace',\n ENROLLED = 'enrolled',\n}\n\n// ===============================\n// AUTHENTICATION METHOD CLASSIFICATION\n// ===============================\n\n/**\n * Authentication Method Factor Classification Map\n */\nexport const AUTH_METHOD_FACTOR_MAP: Record<AuthMethod, AuthFactorType> = {\n // First factor only - Primary credentials\n [AuthMethod.PASSWORD]: AuthFactorType.FIRST_ONLY,\n\n // First factor only - Passwordless via email\n [AuthMethod.MAGIC_LINK]: AuthFactorType.FIRST_ONLY,\n\n // First factor only - SSO redirect flows are not MFA ceremonies (B-SEC-1)\n [AuthMethod.EXTERNAL_OAUTH2]: AuthFactorType.FIRST_ONLY,\n [AuthMethod.ORG_SAML]: AuthFactorType.FIRST_ONLY,\n [AuthMethod.ORG_OPENID_CONNECT]: AuthFactorType.FIRST_ONLY,\n\n // Second factor only - MFA tokens (except SMS_OTP which can be first or second)\n [AuthMethod.TOTP]: AuthFactorType.SECOND_ONLY,\n [AuthMethod.SMS_OTP]: AuthFactorType.FIRST_OR_SECOND,\n [AuthMethod.EMAIL_OTP]: AuthFactorType.SECOND_ONLY,\n\n // First or second factor - Modern biometric\n [AuthMethod.PASSKEY]: AuthFactorType.FIRST_OR_SECOND\n};\n\n/**\n * Authentication Method Category Map\n */\nexport const AUTH_METHOD_CATEGORY_MAP: Record<AuthMethod, AuthMethodCategory> = {\n [AuthMethod.PASSWORD]: AuthMethodCategory.CREDENTIAL,\n [AuthMethod.MAGIC_LINK]: AuthMethodCategory.CREDENTIAL,\n [AuthMethod.EXTERNAL_OAUTH2]: AuthMethodCategory.EXTERNAL_OAUTH2,\n [AuthMethod.ORG_SAML]: AuthMethodCategory.ORG_SSO,\n [AuthMethod.ORG_OPENID_CONNECT]: AuthMethodCategory.ORG_SSO,\n [AuthMethod.TOTP]: AuthMethodCategory.MFA_TOKEN,\n [AuthMethod.SMS_OTP]: AuthMethodCategory.MFA_TOKEN,\n [AuthMethod.EMAIL_OTP]: AuthMethodCategory.MFA_TOKEN,\n [AuthMethod.PASSKEY]: AuthMethodCategory.BIOMETRIC\n};\n\n/**\n * Scope type for auth policies — organization-level vs application-level.\n *\n * Declared before the browser-safe available-method schema because that schema\n * evaluates this enum at module initialization time.\n */\nexport enum AuthScopeType {\n ORGANIZATION = 'organization',\n APPLICATION = 'application',\n}\n\n/**\n * Public, browser-safe configuration attached to an available auth method.\n *\n * The fields span passkey and enterprise-SSO methods, but every field is named\n * and typed: this cross-layer contract must never collapse back to\n * `Record<string, any>`, which previously forced frontend assertions for the\n * tenant scope and connection identity.\n */\nexport const AvailableMethodConfigSchema = z.object({\n rpName: z.string().optional(),\n rpId: z.string().optional(),\n registeredPasskeyCount: z.number().int().nonnegative().optional(),\n displayName: z.string().optional(),\n providerRef: z.string().optional(),\n connectionId: z.string().optional(),\n scopeType: z.enum(AuthScopeType).optional(),\n scopeId: z.string().optional(),\n loginUrl: z.string().optional(),\n});\n\nexport type AvailableMethodConfig = z.infer<typeof AvailableMethodConfigSchema>;\n\nexport const AvailableMethodSchema = z.object({\n method: z.enum(AuthMethod),\n factorType: z.enum(AuthFactorType),\n category: z.enum(AuthMethodCategory),\n canBeFirstFactor: z.boolean(),\n canBeSecondFactor: z.boolean(),\n required: z.boolean(),\n\n // Provider-specific information\n oauth2ProviderRefs: z.array(z.string()).optional(), // For third-party OAuth2\n ssoIds: z.array(z.string()).optional(), // For organization SSO\n organizationRestricted: z.boolean().default(false),\n\n // Integration capabilities\n supportsIntegrations: z.boolean().default(false),\n availableIntegrations: z.array(z.string()).default([]).optional(),\n\n // Public configuration\n config: AvailableMethodConfigSchema.optional()\n});\n\n\nexport type AvailableMethod = z.infer<typeof AvailableMethodSchema>;\n\n// ===============================\n// CROSS-LAYER CONSTANTS\n// ===============================\n\n/**\n * Error codes used in redirect query params (backend → frontend).\n * Backend appends `?error=<code>` to redirect URLs; frontend reads and displays.\n */\nexport enum AuthRedirectErrorCode {\n SAML_LOGIN_FAILED = 'saml_login_failed',\n SAML_AUTH_FAILED = 'saml_auth_failed',\n SAML_SLO_FAILED = 'saml_slo_failed',\n MISSING_PARAMS = 'missing_params',\n OAUTH_FAILED = 'oauth_failed',\n}\n\n/**\n * Ownership class of an external authentication connection.\n *\n * This is intentionally independent from {@link AuthScopeType}: a social\n * connection has no enterprise tenant scope, while an enterprise connection\n * must carry one.\n */\nexport enum SsoConnectionType {\n SOCIAL = 'social',\n ENTERPRISE = 'enterprise',\n}\n\n/**\n * Mechanism that established an external identity.\n *\n * This is wider than the SSO protocol vocabulary because SCIM establishes and\n * maintains identity links without being an interactive SSO protocol.\n */\nexport enum ExternalIdentitySource {\n OAUTH2 = 'oauth2',\n OIDC = 'oidc',\n SAML = 'saml',\n SCIM = 'scim',\n}\n"]}
1
+ {"version":3,"file":"authentication.shared.schemas.js","sourceRoot":"","sources":["../../../../../src/security/authentications/authentication.shared.schemas.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EAAE,gBAAgB,EAAE,kCAAkC,E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OAAO,CAAC,EAAE,CAAC,CAAC,QAAQ,EAAE;IAEjE,uBAAuB;IACvB,MAAM,EAAE,2BAA2B,CAAC,QAAQ,EAAE;CAC/C,CAAC,CAAC;AAKH,kCAAkC;AAClC,wBAAwB;AACxB,kCAAkC;AAElC;;;GAGG;AACH,MAAM,CAAN,IAAY,qBAMX;AAND,WAAY,qBAAqB;IAC/B,gEAAuC,CAAA;IACvC,8DAAqC,CAAA;IACrC,4DAAmC,CAAA;IACnC,0DAAiC,CAAA;IACjC,sDAA6B,CAAA;AAC/B,CAAC,EANW,qBAAqB,KAArB,qBAAqB,QAMhC;AAED;;;;;;GAMG;AACH,MAAM,CAAN,IAAY,iBAGX;AAHD,WAAY,iBAAiB;IAC3B,sCAAiB,CAAA;IACjB,8CAAyB,CAAA;AAC3B,CAAC,EAHW,iBAAiB,KAAjB,iBAAiB,QAG5B;AAED;;;;;GAKG;AACH,MAAM,CAAN,IAAY,sBAKX;AALD,WAAY,sBAAsB;IAChC,2CAAiB,CAAA;IACjB,uCAAa,CAAA;IACb,uCAAa,CAAA;IACb,uCAAa,CAAA;AACf,CAAC,EALW,sBAAsB,KAAtB,sBAAsB,QAKjC","sourcesContent":["/**\n * Authentication Shared Schemas\n *\n * Core authentication schemas shared between frontend and backend\n */\n\nimport { z } from 'zod';\n\nimport { CoreResourceType, coreResourceShared_FieldIdentifier } from '../../resources/resources.shared.core.definitions';\nimport type { PolymorphicVariantDefinition } from '../../resources/utils/resource-polymorphism.schemas';\n\n/**\n * Auth Scope Variants (Shared)\n *\n * The 2 auth scope variants — shared across all auth polymorphic resources\n * (SsoConfig, SsoConnection, SiemExportConfig, SiemDeliveryDlq,\n * ScimTokens, ScimProvisioningConfig).\n *\n */\n\n\nexport const AUTH_SCOPE_VARIANTS: PolymorphicVariantDefinition[] = [\n { parentResourceType: CoreResourceType.ORGANIZATIONS, parentFieldIdentifier: coreResourceShared_FieldIdentifier[CoreResourceType.ORGANIZATIONS], isPrimaryScope: true },\n { parentResourceType: CoreResourceType.APPLICATION, parentFieldIdentifier: coreResourceShared_FieldIdentifier[CoreResourceType.APPLICATION], isPrimaryScope: true },\n];\n\n\n// ===============================\n// AUTHENTICATION METHOD DEFINITIONS\n// ===============================\n\n/**\n * Authentication Factor Classification\n * Defines when an authentication method can be used in the flow\n */\nexport enum AuthFactorType {\n FIRST_ONLY = 'FIRST_ONLY', // Can only be used as first factor (primary auth)\n SECOND_ONLY = 'SECOND_ONLY', // Can only be used as second factor (MFA)\n FIRST_OR_SECOND = 'FIRST_OR_SECOND', // Can be used as either first or second factor\n ANY = 'ANY' // Can be used in any context (first, second, or standalone)\n}\n\n/**\n * Authentication Method Categories\n * Separates different types of authentication methods by scope and configuration\n */\nexport enum AuthMethodCategory {\n CREDENTIAL = 'CREDENTIAL', // Password-based credentials\n EXTERNAL_OAUTH2 = 'EXTERNAL_OAUTH2', // Extensible third-party SaaS OAuth2 (application-level)\n ORG_SSO = 'ORG_SSO', // Organization-restricted SSO (SAML/OpenID Connect)\n MFA_TOKEN = 'MFA_TOKEN', // Time-based or generated tokens for MFA\n BIOMETRIC = 'BIOMETRIC' // Modern biometric/passwordless methods\n}\n\n/**\n * The signing-key purposes an application holds, and the platform-service keys it verifies against.\n *\n * MOVED HERE FROM `saas-backend-lib` on 2026-09-02. These name identities that CROSS A PROCESS\n * BOUNDARY — the platform issues a token, the application verifies it; the application signs a\n * webhook, an integrator verifies it — and a name that crosses a boundary belongs in the shared\n * package rather than in the runtime on one side of it. The signing and verification MACHINERY did\n * not move; `jwt.backend.schemas.ts` re-exports both so no consumer changed.\n *\n * It also unblocked attesting `WILDO.IDENTITY.SIGNING_KEY_LIFECYCLE`: the retirement guarantee is\n * per key, and the assurance layer could not name the keys it applies to from a package it must not\n * depend on.\n *\n * Storage locations (unchanged, and stated here because the names are meaningless without them):\n * - private: `wildo_application_secrets.security.jwt.privateKey[key]`\n * - public: `wildo_application_config.jwt.publicKey[key]`, env `PLATFORM_<SERVICE_NAME>_PUBLIC_KEY`\n */\n/**\n * `iss` claim on every JWT the application signs, whichever key kind signs it. Receivers of\n * webhooks, workers and platform services pin this value; it is application-wide, not per key.\n */\nexport const APPLICATION_JWT_ISSUER = 'wildo-application' as const;\n\nexport enum JwtPrivateKeys {\n /** Application signing requests to platform services */\n APPLICATION_PLATFORM_REQUEST = 'APPLICATION_PLATFORM_REQUEST',\n /** Application signing requests to worker runtimes */\n APPLICATION_WORKER_REQUEST = 'APPLICATION_WORKER_REQUEST',\n /** Application signing webhooks */\n APPLICATION_WEBHOOK = 'APPLICATION_WEBHOOK',\n /** Application signing auth tokens */\n APPLICATION_AUTH_TOKEN = 'APPLICATION_AUTH_TOKEN',\n}\n\n/**\n * Platform Service JWT Public Keys\n * \n * Used to verify JWTs from platform services.\n * Public keys are stored in apps-manager env config.\n * Env var pattern: PLATFORM_<SERVICE_NAME>_PUBLIC_KEY\n */\nexport enum JwtPublicKeys {\n /** Platform service: apps-manager - central platform orchestrator */\n PLATFORM_APPS_MANAGER = 'PLATFORM_APPS_MANAGER',\n\n /** Platform service: crontabs-batches-manager - handles scheduled jobs */\n PLATFORM_CRONTABS_BATCHES_MANAGER = 'PLATFORM_CRONTABS_BATCHES_MANAGER',\n}\n\n/**\n * The OIDC / RFC 7519 protocol + security claim names the ID-token builder OWNS. `extraClaims` (the\n * scope-gated IDENTITY claims from the userinfo/ID-token resolver) must carry ONLY identity claims — these\n * reserved names are stripped BEFORE `extraClaims` is spread, so a same-named entry can never ride into the\n * ID token uncontrolled: a smuggled `nbf` (which would later make the token fail verification), a forged\n * `nonce` / `acr` / `amr` / `at_hash`, or a spoofed `iss` / `aud` / `sub` (the last are already overridden by\n * the server-set claims below — these are the ones the builder does NOT otherwise re-set). ONE named source\n * (closed vocabulary) so the strip list can never drift from the builder's own claim set.\n * semantic-literal-boundary: OIDC Core / RFC 7519 registered claim names.\n * assurance-control: WILDO.IDENTITY.TOKEN_INTEGRITY — an ID token's protocol/security claims are server-authored only.\n */\nexport const OIDC_RESERVED_ID_TOKEN_CLAIM_NAMES: ReadonlySet<string> = new Set([\n // `sid` (OIDC Session Management / Front-Channel & Back-Channel Logout) is SERVER-AUTHORED here — it is\n // the End-User's OP session id the RP-Initiated Logout endpoint keys on (revocation-C). Reserving it bars\n // a client from smuggling its own `sid` via `extraClaims`, exactly like `nonce`/`acr`/`azp` below.\n 'iss', 'sub', 'aud', 'exp', 'nbf', 'iat', 'jti', 'azp', 'nonce', 'auth_time', 'at_hash', 'c_hash', 'acr', 'amr', 'sid',\n]);\n\n/**\n * @wildo_source:part:start saas.models.auth.methods facet:layer:shared facet:audience:app-developer\n *\n * Every way a person can prove who they are. An application chooses per USER TYPE which of these are\n * enabled, under `authMethodsEnabled` in the backend-authored config.\n *\n * Imported from `@wildo-ai/saas-models`.\n *\n * ## Enabling a method is necessary, and for four of them it is not sufficient\n *\n * | method | may be | also required before it works |\n * |---|---|---|\n * | `PASSWORD` | first | a `passwordPolicy` on the user type |\n * | `MAGIC_LINK` | first | — |\n * | `PASSKEY` | first or second | `auth.passkeyConfig` (`rpName`, `rpId`) — the app does not boot without it |\n * | `SMS_OTP` | first or second | a verified phone number on the account |\n * | `TOTP` | second | enrolment (authenticator app or backup codes) |\n * | `EMAIL_OTP` | second | — |\n * | `EXTERNAL_OAUTH2` | any | a `socialOAuth2Providers` entry (client id + secret reference) AND a declared provider scope |\n * | `ORG_SAML` | first or second | a connection resource on the organization, AND a Java runtime with the schema-validation helper compiled on every host that serves SAML |\n * | `ORG_OPENID_CONNECT` | first or second | a connection resource on the organization |\n *\n * ## ⚠️ The organization SSO methods are gated by the USER TYPE first\n *\n * A perfectly configured SSO connection is never offered unless the user type enables `ORG_SAML` /\n * `ORG_OPENID_CONNECT`: the connection lookup only runs when the resolved policy already has the\n * method, so the organization is never consulted. The symptom is a login screen that simply does not\n * show the option, with nothing wrong on the connection and nothing in the logs. Enable the method on\n * the user type BEFORE debugging the connection.\n *\n * ## Other refusals worth knowing before you pick one\n *\n * - **`EXTERNAL_OAUTH2` will not link or create an account from a provider that does not report the\n * email address as VERIFIED.** That is a refusal, not a warning — a provider whose claim mapping\n * does not surface a verified flag cannot be used for sign-up until the mapping is corrected.\n * - **A missing SAML validation helper surfaces as an invalid signature**, not as a missing\n * dependency, which sends an operator to the certificate instead of to the host.\n * - **A person in an actively directory-managed organization loses every LOCAL first factor**, by\n * design, so a credential minted before the directory took over cannot complete a session.\n * `EMAIL_OTP` is deliberately exempt because it is a second factor.\n *\n * ## ⚠️ Signing IN and signing UP are two different lists\n *\n * `authMethodsEnabled` decides how an EXISTING account authenticates. It does not create accounts.\n * Public registration is gated separately by `registration.allowedMethods` on the same user type,\n * which **defaults to `[PASSWORD]`** — so enabling `MAGIC_LINK` for sign-in and expecting people to\n * sign up with it gets a password-only signup and no error.\n *\n * Only four methods have a public-signup implementation — `PASSWORD`, `EXTERNAL_OAUTH2`,\n * `MAGIC_LINK`, `PASSKEY`. Listing any other (an SSO method, an MFA factor) is refused when the\n * config is built, deliberately: a method advertised to a registrant that the runtime cannot execute\n * fails them AFTER they have committed to it. Open registration also requires the list to be\n * non-empty.\n *\n * ## Which methods count as a second factor is a separate question\n *\n * `mfaPolicy` on the user type decides whether a second factor is required and narrows which of these\n * count. The guard that stops somebody removing their last second factor counts passkeys and a\n * verified phone number — it does NOT count `EMAIL_OTP`, so the arithmetic differs from what a person\n * might expect.\n *\n * Extensible at application level for `EXTERNAL_OAUTH2` providers; the method vocabulary itself is\n * closed.\n */\nexport enum AuthMethod {\n // Credential-based (First factor only)\n PASSWORD = 'PASSWORD',\n\n // Third-party SaaS OAuth2 (Application-level, extensible, any factor)\n EXTERNAL_OAUTH2 = 'EXTERNAL_OAUTH2', // Generic extensible OAuth2 provider\n\n // Organization-restricted SSO (First or second factor)\n ORG_SAML = 'ORG_SAML', // Organization SAML SSO\n ORG_OPENID_CONNECT = 'ORG_OPENID_CONNECT', // Organization OpenID Connect SSO\n\n // Passwordless (First factor only)\n MAGIC_LINK = 'MAGIC_LINK', // Magic Link via email\n\n // MFA tokens (Second factor only, except SMS_OTP which is FIRST_OR_SECOND)\n TOTP = 'TOTP', // Time-based One-Time Password\n SMS_OTP = 'SMS_OTP', // SMS One-Time Password\n EMAIL_OTP = 'EMAIL_OTP', // Email One-Time Password\n\n // Biometric/Modern (First or second factor)\n PASSKEY = 'PASSKEY' // WebAuthn/FIDO2 Passkeys\n}\n/** @wildo_source:part:end saas.models.auth.methods */\n\n/**\n * Authentication Factor Levels\n */\nexport enum AuthFactor {\n SINGLE = 'SINGLE', // Single factor authentication\n MULTI = 'MULTI' // Multi-factor authentication required\n}\n\n/**\n * Authentication Factor Level (First or Second Factor)\n */\nexport enum AuthFactorLevel {\n IDENTIFICATION = 'IDENTIFICATION', // Identification only\n FIRST = 'FIRST', // First factor authentication\n SECOND = 'SECOND' // Second factor authentication (MFA)\n}\n\n/**\n * W4: Next step hint for frontend routing after auth state transitions.\n * Drives UI flow (MFA enrollment, onboarding, email verification, etc.).\n */\nexport enum AuthNextStep {\n MFA_ENROLLMENT = 'mfa_enrollment',\n ONBOARDING = 'onboarding',\n COMPLETE = 'complete',\n EMAIL_VERIFICATION = 'email_verification',\n PASSWORD_CHANGE = 'password_change',\n /**\n * A password-less public registration completed and a magic link is on its way (#463). Clicking it\n * proves the address and establishes the first session — there is nothing else for the registrant\n * to do, and nothing to authenticate with until they do it.\n */\n MAGIC_LINK_SENT = 'magic_link_sent',\n /**\n * As {@link MAGIC_LINK_SENT}, and the click leads to enrolling a passkey.\n *\n * A separate member rather than a flag on the one above, because the client renders different copy\n * from the first screen onward — \"check your email to finish\" versus \"check your email, then set up\n * your passkey\" — and a registrant told the wrong one abandons at the step they were not warned\n * about.\n *\n * The magic link is not incidental here: a passkey proves possession of an authenticator and says\n * nothing about an address, so a public passkey signup must prove the address some other way, and\n * the link is that proof. It is also, permanently, the recovery path — see the note on\n * `registerUser`.\n */\n PASSKEY_ENROLLMENT = 'passkey_enrollment',\n}\n\n/**\n * W4.2: Session purpose — drives UI rendering and valid state transitions.\n */\nexport enum AuthSessionPurpose {\n LOGIN = 'login',\n REGISTRATION = 'registration',\n INVITATION = 'invitation',\n REAUTH = 'reauth',\n DEVICE_AUTH = 'device_auth',\n}\n\n/**\n * W4.6: MFA enrollment lifecycle state on UserCredentials.\n * Computed at user creation and updated on enrollment completion.\n */\nexport enum MfaEnrollmentState {\n NOT_REQUIRED = 'not_required',\n PENDING = 'pending',\n GRACE = 'grace',\n ENROLLED = 'enrolled',\n}\n\n// ===============================\n// AUTHENTICATION METHOD CLASSIFICATION\n// ===============================\n\n/**\n * Authentication Method Factor Classification Map\n */\nexport const AUTH_METHOD_FACTOR_MAP: Record<AuthMethod, AuthFactorType> = {\n // First factor only - Primary credentials\n [AuthMethod.PASSWORD]: AuthFactorType.FIRST_ONLY,\n\n // First factor only - Passwordless via email\n [AuthMethod.MAGIC_LINK]: AuthFactorType.FIRST_ONLY,\n\n // First factor only - SSO redirect flows are not MFA ceremonies (B-SEC-1)\n [AuthMethod.EXTERNAL_OAUTH2]: AuthFactorType.FIRST_ONLY,\n [AuthMethod.ORG_SAML]: AuthFactorType.FIRST_ONLY,\n [AuthMethod.ORG_OPENID_CONNECT]: AuthFactorType.FIRST_ONLY,\n\n // Second factor only - MFA tokens (except SMS_OTP which can be first or second)\n [AuthMethod.TOTP]: AuthFactorType.SECOND_ONLY,\n [AuthMethod.SMS_OTP]: AuthFactorType.FIRST_OR_SECOND,\n [AuthMethod.EMAIL_OTP]: AuthFactorType.SECOND_ONLY,\n\n // First or second factor - Modern biometric\n [AuthMethod.PASSKEY]: AuthFactorType.FIRST_OR_SECOND\n};\n\n/**\n * Authentication Method Category Map\n */\nexport const AUTH_METHOD_CATEGORY_MAP: Record<AuthMethod, AuthMethodCategory> = {\n [AuthMethod.PASSWORD]: AuthMethodCategory.CREDENTIAL,\n [AuthMethod.MAGIC_LINK]: AuthMethodCategory.CREDENTIAL,\n [AuthMethod.EXTERNAL_OAUTH2]: AuthMethodCategory.EXTERNAL_OAUTH2,\n [AuthMethod.ORG_SAML]: AuthMethodCategory.ORG_SSO,\n [AuthMethod.ORG_OPENID_CONNECT]: AuthMethodCategory.ORG_SSO,\n [AuthMethod.TOTP]: AuthMethodCategory.MFA_TOKEN,\n [AuthMethod.SMS_OTP]: AuthMethodCategory.MFA_TOKEN,\n [AuthMethod.EMAIL_OTP]: AuthMethodCategory.MFA_TOKEN,\n [AuthMethod.PASSKEY]: AuthMethodCategory.BIOMETRIC\n};\n\n/**\n * Scope type for auth policies — organization-level vs application-level.\n *\n * Declared before the browser-safe available-method schema because that schema\n * evaluates this enum at module initialization time.\n */\nexport enum AuthScopeType {\n ORGANIZATION = 'organization',\n APPLICATION = 'application',\n}\n\n/**\n * Public, browser-safe configuration attached to an available auth method.\n *\n * The fields span passkey and enterprise-SSO methods, but every field is named\n * and typed: this cross-layer contract must never collapse back to\n * `Record<string, any>`, which previously forced frontend assertions for the\n * tenant scope and connection identity.\n */\nexport const AvailableMethodConfigSchema = z.object({\n rpName: z.string().optional(),\n rpId: z.string().optional(),\n displayName: z.string().optional(),\n providerRef: z.string().optional(),\n connectionId: z.string().optional(),\n scopeType: z.enum(AuthScopeType).optional(),\n scopeId: z.string().optional(),\n loginUrl: z.string().optional(),\n});\n\nexport type AvailableMethodConfig = z.infer<typeof AvailableMethodConfigSchema>;\n\nexport const AvailableMethodSchema = z.object({\n method: z.enum(AuthMethod),\n factorType: z.enum(AuthFactorType),\n category: z.enum(AuthMethodCategory),\n canBeFirstFactor: z.boolean(),\n canBeSecondFactor: z.boolean(),\n required: z.boolean(),\n\n // Provider-specific information\n oauth2ProviderRefs: z.array(z.string()).optional(), // For third-party OAuth2\n ssoIds: z.array(z.string()).optional(), // For organization SSO\n organizationRestricted: z.boolean().default(false),\n\n // Integration capabilities\n supportsIntegrations: z.boolean().default(false),\n availableIntegrations: z.array(z.string()).default([]).optional(),\n\n // Public configuration\n config: AvailableMethodConfigSchema.optional()\n});\n\n\nexport type AvailableMethod = z.infer<typeof AvailableMethodSchema>;\n\n// ===============================\n// CROSS-LAYER CONSTANTS\n// ===============================\n\n/**\n * Error codes used in redirect query params (backend → frontend).\n * Backend appends `?error=<code>` to redirect URLs; frontend reads and displays.\n */\nexport enum AuthRedirectErrorCode {\n SAML_LOGIN_FAILED = 'saml_login_failed',\n SAML_AUTH_FAILED = 'saml_auth_failed',\n SAML_SLO_FAILED = 'saml_slo_failed',\n MISSING_PARAMS = 'missing_params',\n OAUTH_FAILED = 'oauth_failed',\n}\n\n/**\n * Ownership class of an external authentication connection.\n *\n * This is intentionally independent from {@link AuthScopeType}: a social\n * connection has no enterprise tenant scope, while an enterprise connection\n * must carry one.\n */\nexport enum SsoConnectionType {\n SOCIAL = 'social',\n ENTERPRISE = 'enterprise',\n}\n\n/**\n * Mechanism that established an external identity.\n *\n * This is wider than the SSO protocol vocabulary because SCIM establishes and\n * maintains identity links without being an interactive SSO protocol.\n */\nexport enum ExternalIdentitySource {\n OAUTH2 = 'oauth2',\n OIDC = 'oidc',\n SAML = 'saml',\n SCIM = 'scim',\n}\n"]}
@@ -52,7 +52,23 @@ export declare enum CoreConsumableTokenTypes {
52
52
  * lands on `/oauth/logged-out`. A trusted RP logout (valid hint + exact-match registered redirect)
53
53
  * skips this entirely and terminates + redirects to the RP directly — the Keycloak-style posture.
54
54
  */
55
- OIDC_LOGOUT_CONFIRMATION = "oidc_logout_confirmation"
55
+ OIDC_LOGOUT_CONFIRMATION = "oidc_logout_confirmation",
56
+ /**
57
+ * A single-use grant to upload ONE file into ONE resource file field, minted by a principal who
58
+ * could perform the target CREATE/UPDATE and redeemed by whoever holds it — an AI agent's `curl`,
59
+ * or a human on the drop page — without the minter's own credential ever leaving the server.
60
+ *
61
+ * Exists because MCP tool arguments are model-generated JSON and cannot carry bytes; see #312.
62
+ * `SINGLE_USE` only (a reusable upload credential is the presigned-URL defect rebuilt inside
63
+ * the API). Typed fields carry identity — `userId`/`organizationId`/`roles` snapshot of the
64
+ * minter, `resourceIdentifier` = target resource, `relatedId` = target row for UPDATE — and
65
+ * `metadata` carries the ROUTE binding (`fieldName`, `operation`, `minter`, `producedFileId`),
66
+ * which the upload middleware checks and the identity layer deliberately ignores. Lifetime is
67
+ * bounded at the mint by `FILE_UPLOAD_GRANT_ABSOLUTE_MAX_MINUTES`, rejecting rather than
68
+ * clamping: this credential is designed to leave the trust boundary (a transcript, a shell
69
+ * history), so the engine owns the bound.
70
+ */
71
+ FILE_UPLOAD_GRANT = "file_upload_grant"
56
72
  }
57
73
  export declare const ConsumableTokenTypesSchema: z.ZodUnion<readonly [z.ZodEnum<typeof CoreConsumableTokenTypes>, z.ZodString]>;
58
74
  export type ConsumableTokenTypes = z.infer<typeof ConsumableTokenTypesSchema>;
@@ -1 +1 @@
1
- {"version":3,"file":"consumable-token.shared.schemas.d.ts","sourceRoot":"","sources":["../../../../../src/security/authentications/consumable-token.shared.schemas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAC;AAClE,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,gDAAgD,CAAC;AAOhG,oBAAY,wBAAwB;IAChC,8BAA8B,mCAAmC;IACjE,cAAc,mBAAmC;IACjD,kBAAkB,uBAAmC;IACrD,kBAAkB,uBAAmC;IACrD,YAAY,iBAAmC;IAC/C,uBAAuB,4BAAmC;IAC1D,oBAAoB,yBAAmC;IACvD,wFAAwF;IACxF,kBAAkB,uBAAmC;IACrD,kEAAkE;IAClE,SAAS,cAAmC;IAC5C,+EAA+E;IAC/E,UAAU,eAAmC;IAC7C,qEAAqE;IACrE,OAAO,YAAmC;IAC1C,sFAAsF;IACtF,kBAAkB,uBAAmC;IACrD,yEAAyE;IACzE,eAAe,oBAAmC;IAClD,kEAAkE;IAClE,MAAM,WAAmC;IACzC;;;;;OAKG;IACH,uBAAuB,4BAAmC;IAC1D;;;;;;;;OAQG;IACH,oBAAoB,yBAAmC;IACvD;;;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AC,EAAE,OAAO,CAAC;IAE/B;;;;;OAKG;IACH,SAAS,CAAC,EAAE,UAAU,GAAG,kBAAkB,CAAC;IAE5C;;;;;;;OAOG;IACH,eAAe,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAEzC;;;;;;;;OAQG;IACH,aAAa,CAAC,EAAE,MAAM,CAAC;CAC1B,CAAC;AACF,0EAA0E;AAE1E;;;;;;;;;GASG;AACH,MAAM,MAAM,qBAAqB,GAAG;IAChC,+DAA+D;IAC/D,UAAU,EAAE,oBAAoB,EAAE,CAAC;IAEnC,0FAA0F;IAC1F,cAAc,CAAC,EAAE,MAAM,CAAC;CAC3B,CAAC;AAEF;;;;GAIG;AACH,oBAAY,yBAAyB;IACjC,WAAW,gBAAgB;IAC3B,QAAQ,aAAa;CACxB;AAED;;;;;;;GAOG;AACH,MAAM,MAAM,yBAAyB,GAAG;IACpC,kEAAkE;IAClE,KAAK,EAAE,oBAAoB,EAAE,CAAC;IAC9B,MAAM,EAAE,yBAAyB,CAAC;CACrC,CAAC"}
1
+ {"version":3,"file":"consumable-token.shared.schemas.d.ts","sourceRoot":"","sources":["../../../../../src/security/authentications/consumable-token.shared.schemas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAC;AAClE,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,gDAAgD,CAAC;AAOhG,oBAAY,wBAAwB;IAChC,8BAA8B,mCAAmC;IACjE,cAAc,mBAAmC;IACjD,kBAAkB,uBAAmC;IACrD,kBAAkB,uBAAmC;IACrD,YAAY,iBAAmC;IAC/C,uBAAuB,4BAAmC;IAC1D,oBAAoB,yBAAmC;IACvD,wFAAwF;IACxF,kBAAkB,uBAAmC;IACrD,kEAAkE;IAClE,SAAS,cAAmC;IAC5C,+EAA+E;IAC/E,UAAU,eAAmC;IAC7C,qEA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CAAC,yBAAyB,EAAE,CAAC,CAAC;IAE5D,uFAAuF;IACvF,OAAO,CAAC,EAAE,MAAM,CAAC;IAEjB,oGAAoG;IACpG,4BAA4B,CAAC,EAAE,OAAO,CAAC;IAEvC,4FAA4F;IAC5F,cAAc,CAAC,EAAE,MAAM,CAAC;IAExB;;;OAGG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IAErB;;;OAGG;IACH,oBAAoB,CAAC,EAAE,OAAO,CAAC;IAE/B;;;;;OAKG;IACH,SAAS,CAAC,EAAE,UAAU,GAAG,kBAAkB,CAAC;IAE5C;;;;;;;OAOG;IACH,eAAe,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAEzC;;;;;;;;OAQG;IACH,aAAa,CAAC,EAAE,MAAM,CAAC;CAC1B,CAAC;AACF,0EAA0E;AAE1E;;;;;;;;;GASG;AACH,MAAM,MAAM,qBAAqB,GAAG;IAChC,+DAA+D;IAC/D,UAAU,EAAE,oBAAoB,EAAE,CAAC;IAEnC,0FAA0F;IAC1F,cAAc,CAAC,EAAE,MAAM,CAAC;CAC3B,CAAC;AAEF;;;;GAIG;AACH,oBAAY,yBAAyB;IACjC,WAAW,gBAAgB;IAC3B,QAAQ,aAAa;CACxB;AAED;;;;;;;GAOG;AACH,MAAM,MAAM,yBAAyB,GAAG;IACpC,kEAAkE;IAClE,KAAK,EAAE,oBAAoB,EAAE,CAAC;IAC9B,MAAM,EAAE,yBAAyB,CAAC;CACrC,CAAC"}
@@ -55,6 +55,22 @@ export var CoreConsumableTokenTypes;
55
55
  * skips this entirely and terminates + redirects to the RP directly — the Keycloak-style posture.
56
56
  */
57
57
  CoreConsumableTokenTypes["OIDC_LOGOUT_CONFIRMATION"] = "oidc_logout_confirmation";
58
+ /**
59
+ * A single-use grant to upload ONE file into ONE resource file field, minted by a principal who
60
+ * could perform the target CREATE/UPDATE and redeemed by whoever holds it — an AI agent's `curl`,
61
+ * or a human on the drop page — without the minter's own credential ever leaving the server.
62
+ *
63
+ * Exists because MCP tool arguments are model-generated JSON and cannot carry bytes; see #312.
64
+ * `SINGLE_USE` only (a reusable upload credential is the presigned-URL defect rebuilt inside
65
+ * the API). Typed fields carry identity — `userId`/`organizationId`/`roles` snapshot of the
66
+ * minter, `resourceIdentifier` = target resource, `relatedId` = target row for UPDATE — and
67
+ * `metadata` carries the ROUTE binding (`fieldName`, `operation`, `minter`, `producedFileId`),
68
+ * which the upload middleware checks and the identity layer deliberately ignores. Lifetime is
69
+ * bounded at the mint by `FILE_UPLOAD_GRANT_ABSOLUTE_MAX_MINUTES`, rejecting rather than
70
+ * clamping: this credential is designed to leave the trust boundary (a transcript, a shell
71
+ * history), so the engine owns the bound.
72
+ */
73
+ CoreConsumableTokenTypes["FILE_UPLOAD_GRANT"] = "file_upload_grant";
58
74
  })(CoreConsumableTokenTypes || (CoreConsumableTokenTypes = {}));
59
75
  export const ConsumableTokenTypesSchema = z.union([
60
76
  z.enum(CoreConsumableTokenTypes),
@@ -1 +1 @@
1
- {"version":3,"file":"consumable-token.shared.schemas.js","sourceRoot":"","sources":["../../../../../src/security/authentications/consumable-token.shared.schemas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAKxB,+EAA+E;AAC/E,uEAAuE;AACvE,+EAA+E;AAE/E,MAAM,CAAN,IAAY,wBAoDX;AApDD,WAAY,wBAAwB;IAChC,6FAAiE,CAAA;IACjE,6DAAiD,CAAA;IACjD,qEAAqD,CAAA;IACrD,qEAAqD,CAAA;IACrD,yDAA+C,CAAA;IAC/C,+EAA0D,CAAA;IAC1D,yEAAuD,CAAA;IACvD,wFAAwF;IACxF,qEAAqD,CAAA;IACrD,kEAAkE;IAClE,mDAA4C,CAAA;IAC5C,+EAA+E;IAC/E,qDAA6C,CAAA;IAC7C,qEAAqE;IACrE,+CAA0C,CAAA;IAC1C,sFAAsF;IACtF,qEAAqD,CAAA;IACrD,yEAAyE;IACzE,+DAAkD,CAAA;IAClD,kEAAkE;IAClE,6CAAyC,CAAA;IACzC;;;;;OAKG;IACH,+EAA0D,CAAA;IAC1D;;;;;;;;OAQG;IACH,yEAAuD,CAAA;IACvD;;;;;;;;;;;OAWG;IACH,iFAA2D,CAAA;AAC/D,CAAC,EApDW,wBAAwB,KAAxB,wBAAwB,QAoDnC;AAED,MAAM,CAAC,MAAM,0BAA0B,GAAG,CAAC,CAAC,KAAK,CAAC;IAC9C,CAAC,CAAC,IAAI,CAAC,wBAAwB,CAAC;IAChC,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;CACpB,CAAC,CAAC;AAMH,+EAA+E;AAC/E,qEAAqE;AACrE,+EAA+E;AAE/E;;;;;;GAMG;AACH,MAAM,CAAN,IAAY,+BAIX;AAJD,WAAY,+BAA+B;IACvC,4DAA8B,CAAA;IAC9B,kEAAiC,CAAA;IACjC,sEAAmC,CAAA;AACvC,CAAC,EAJW,+BAA+B,KAA/B,+BAA+B,QAI1C;AAkLD;;;;GAIG;AACH,MAAM,CAAN,IAAY,yBAGX;AAHD,WAAY,yBAAyB;IACjC,wDAA2B,CAAA;IAC3B,kDAAqB,CAAA;AACzB,CAAC,EAHW,yBAAyB,KAAzB,yBAAyB,QAGpC","sourcesContent":["import { z } from \"zod\";\nimport type { ExpiresInDuration } from \"@wildo-ai/zod-decorators\";\nimport type { ExecutionContext_RoleInfo } from \"../../runtime/execution-context.shared.schemas\";\n\n\n// ============================================================================\n// CONSUMABLE TOKEN TYPES — Extensible enum of engine-level token types\n// ============================================================================\n\nexport enum CoreConsumableTokenTypes {\n ORGANIZATION_MEMBER_INVITATION = 'organization_member_invitation',\n PASSWORD_RESET = 'password_reset',\n EMAIL_VERIFICATION = 'email_verification',\n FILE_PUBLIC_ACCESS = 'file_public_access',\n OAUTH2_STATE = 'oauth2_state',\n EXTERNAL_CALLBACK_STATE = 'external_callback_state',\n WEBHOOK_VERIFICATION = 'webhook_verification',\n /** Delivers JWT tokens to the frontend after OAuth2 callback processing (Decision 7) */\n AUTH_CODE_EXCHANGE = 'auth_code_exchange',\n /** Email OTP code for MFA second factor verification (Step 10) */\n EMAIL_OTP = 'email_otp',\n /** Magic link token for passwordless first-factor authentication (Phase G2) */\n MAGIC_LINK = 'magic_link',\n /** SMS OTP code for first/second factor authentication (Phase G2) */\n SMS_OTP = 'sms_otp',\n /** Phone number verification code — not an auth flow, just verification (Phase G2) */\n PHONE_VERIFICATION = 'phone_verification',\n /** SAML AuthnRequest correlation state (AUTH-2: SAML Protocol Engine) */\n SAML_AUTH_STATE = 'saml_auth_state',\n /** Re-authentication token for sensitive method changes (#13f) */\n REAUTH = 'reauth',\n /**\n * OIDC authorization code (Wildo-as-provider authorization_code flow). Single-use,\n * short-TTL; its metadata binds the code to the authenticated `userId`, the requesting\n * `clientId`, the granted `scope`, the `redirectUri`, the PKCE `codeChallenge`, and the\n * optional `nonce`. Redeemed at the token endpoint for an ID token + access + refresh.\n */\n OIDC_AUTHORIZATION_CODE = 'oidc_authorization_code',\n /**\n * OIDC interactive-consent request (Wildo-as-provider authorization_code consent gate). Minted at\n * `/oauth/authorize` for a client whose `requiresConsent` is true, INSTEAD of auto-issuing the\n * code. Single-use, short-TTL; its metadata carries the SAME authorization request the code would\n * bind (`clientId`, `scope`, `redirectUri`, `codeChallenge`, `nonce?`, `resource?`, `state?`)\n * plus the authenticated `userId`. Consumed at `/oauth/authorize/decision`: on APPROVE it mints\n * the authorization code from the stored request; on DENY the flow ends with `access_denied`.\n * Storing the request server-side means the consent decision cannot tamper with the parameters.\n */\n OIDC_CONSENT_REQUEST = 'oidc_consent_request',\n /**\n * OIDC RP-Initiated Logout confirmation (revocation-C §6 — the logout-confirmation prompt that\n * mitigates BROWSER-based logout CSRF; a cross-origin page cannot read this token from the victim's\n * URL to complete the confirm). Minted at `GET /oauth/end-session` for any request that is NOT a\n * trusted RP logout (no/forged `id_token_hint`, or a valid hint whose `post_logout_redirect_uri`\n * is absent / unregistered / mismatched), INSTEAD of terminating the session inline. Single-use,\n * short-TTL; its metadata carries the already-validated `{ userId?, sessionId? }` the confirm step\n * acts on (storing it server-side means the confirmation cannot tamper with WHICH session ends).\n * Consumed at `POST /oauth/end-session/confirm`: on confirm it terminates that session (if any) and\n * lands on `/oauth/logged-out`. A trusted RP logout (valid hint + exact-match registered redirect)\n * skips this entirely and terminates + redirects to the RP directly — the Keycloak-style posture.\n */\n OIDC_LOGOUT_CONFIRMATION = 'oidc_logout_confirmation',\n}\n\nexport const ConsumableTokenTypesSchema = z.union([\n z.enum(CoreConsumableTokenTypes),\n z.string().min(1),\n]);\n\n\nexport type ConsumableTokenTypes = z.infer<typeof ConsumableTokenTypesSchema>;\n\n\n// ============================================================================\n// CONSUMPTION MODE — Three behavioral categories for token lifecycle\n// ============================================================================\n\n/**\n * Defines how a token behaves when used.\n *\n * - `SINGLE_USE`: Consumed after first successful use (password reset, invitation acceptance)\n * - `BOUNDED_REUSE`: Can be used N times or until expiry (file sharing link, meeting join link)\n * - `EPHEMERAL_STATE`: Carries state through a redirect, consumed on callback (OAuth state, payment callback)\n */\nexport enum ConsumableToken_ConsumptionMode {\n SINGLE_USE = 'SINGLE_USE',\n BOUNDED_REUSE = 'BOUNDED_REUSE',\n EPHEMERAL_STATE = 'EPHEMERAL_STATE',\n}\n\n\n// ============================================================================\n// UTILITY TYPE — StaticOrDerived<T>\n// ============================================================================\n\n/**\n * A value that can either be provided statically or derived from the operation result at runtime.\n *\n * Static: `{ value: 7, unit: 'days' }`\n * Derived: `(currentObject) => ({ value: currentObject.shareDurationDays, unit: 'days' })`\n *\n * NOTE: This is intentionally NOT `ResourceConfiguration_FunctionWithContextNeeds` (R5).\n * `FunctionWithContextNeeds` wraps functions with metadata flags (`needsObjectContext`, `needsUserContext`)\n * for factory introspection. `StaticOrDerived<T>` is simpler — it's just \"literal value OR function from\n * currentObject\" with no metadata flags. The factory marks dynamic values as `_isDynamic` during\n * processing, which is a different mechanism entirely.\n */\nexport type StaticOrDerived<T> = T | ((currentObject: Record<string, any>) => T);\n\n\n// ============================================================================\n// DECLARATIVE CONFIG TYPES — For operation variant configuration\n// ============================================================================\n\n/** @wildo_source:part:start saas.models.resource-config.token-generation facet:layer:shared facet:family:resource-config\n *\n * Config-declared gate deciding whether a `tokenGeneration` side-effect actually\n * mints a token, evaluated against the POST-operation row (`currentObject`).\n *\n * WHY the destructured params-object shape `({ currentObject }) => boolean` and NOT\n * the positional `StaticOrDerived` shape used by `expiresIn`/`grantedRoles` above (R5):\n * this deliberately mirrors the operation-variant `enabledCondition` predicate (see the\n * org-members REVOKE/RESEND configs) so an app author writes ONE predicate form for every\n * \"config-declared gate over currentObject\". The trade-off is worth it — cross-surface\n * authoring consistency beats intra-type consistency with the positional derivers.\n *\n * WHY the params object carries ONLY `currentObject` (unlike the notification `condition`,\n * which also gets `inputDto`/`objectContext`/`initiatorIds`): a token is a PERSISTED\n * side-effect keyed on the resulting row, so its gate must depend only on the persisted\n * result — never on raw request input. Narrowing the params to `currentObject` makes that\n * guarantee structural. (It also keeps this type free of the `resources-config` params type,\n * which would be a circular import — `resources-config.shared.schemas` imports FROM here.)\n */\nexport type TokenGenerationCondition = (params: { currentObject: Record<string, any> }) => boolean;\n/** @wildo_source:part:end saas.models.resource-config.token-generation */\n\n/** @wildo_source:part:start saas.models.resource-config.token-generation facet:layer:shared facet:family:resource-config\n *\n * Declarative config for automatic token generation on an operation variant.\n * Placed on CREATE/RESEND-like operations to generate a token as a side-effect.\n *\n * Import from `@wildo-ai/saas-models`; application authors normally provide\n * this shape through an API-call variant in\n * `createResourceConfiguration_Initialization(...)`.\n *\n * The operation pipeline creates the token in the same persistence transaction\n * as the resource mutation, then injects `additionalContext.tokenValue` into\n * post-commit notification dispatch.\n *\n * The contract requires one canonical persisted resource state. It cannot be\n * authored on a collection/aggregate operation, a core bulk mutation, or a\n * variant with `haveBulkOperation: true`; those operations do not expose one\n * unambiguous related resource identity for the generated token.\n *\n * @example\n * `tokenGeneration: { tokenType: MyTokenType.INVITATION, consumptionMode:\n * ConsumableToken_ConsumptionMode.SINGLE_USE, expiresIn: { value: 7, unit:\n * DurationUnit.DAYS }, relatedIdField: '_id' }`\n */\nexport type TokenGenerationConfig = {\n /** Token type identifier (from CoreConsumableTokenTypes or custom app enum) */\n tokenType: ConsumableTokenTypes;\n\n /** How the token behaves when used */\n consumptionMode: ConsumableToken_ConsumptionMode;\n\n /**\n * Expiration duration — static or derived from currentObject.\n * Units: minutes, hours, or days only. Value must be ≥ 1.\n * Static: `{ value: 7, unit: DurationUnit.DAYS }`\n * Derived: `(currentObject) => ({ value: currentObject.shareDurationDays, unit: 'days' })`\n */\n expiresIn: StaticOrDerived<ExpiresInDuration>;\n\n /**\n * Optional gate — mint this token ONLY when the predicate returns truthy against the\n * post-operation row. Absent = always mint.\n *\n * Canonical use: a POLYMORPHIC CREATE (org-member INVITE vs DIRECT-ADD) mints the\n * single-use accept token ONLY for the INVITED branch. A direct-add (founder / SSO-JIT /\n * SCIM) persists `ACTIVE` with nothing to accept, so minting a token there would leave a\n * live single-use accept token dangling on an already-ACTIVE row (a hygiene/security\n * hole). Keying on the resulting `status` — the semantic driver, uniformly present on\n * every branch's `currentObject` — auto-covers any future non-INVITED direct-add path.\n *\n * @example `({ currentObject }) => currentObject.status === OrganizationMemberStatus.INVITED`\n */\n condition?: TokenGenerationCondition;\n\n /**\n * Roles granted when the token is used for authentication.\n * Static: `[{ roles: ['ORG_MEMBER'], relatedPrimaryScope: 'ORGANIZATIONS' }]`\n * Derived: `(currentObject) => [{ roles: [currentObject.assignedRole], relatedPrimaryScope: 'ORGANIZATIONS' }]`\n */\n grantedRoles?: StaticOrDerived<ExecutionContext_RoleInfo[]>;\n\n /** Max uses for BOUNDED_REUSE mode. Required when consumptionMode is BOUNDED_REUSE. */\n maxUses?: number;\n\n /** Revoke existing tokens of same type for same relatedId before creating new one (e.g., RESEND) */\n revokeExistingForSameRelated?: boolean;\n\n /** Field in currentState to use as relatedId. Defaults to '_id' (the resource's own ID). */\n relatedIdField?: string;\n\n /**\n * Field in currentState to capture as the token's userId (user_self pattern).\n * e.g., 'invitedUserId' — if not set, no userId stored on token.\n */\n userIdField?: string;\n\n /**\n * W7.3b: Marks the generated token as exchangeable for a one-off session JWT.\n * When true, the token can be used via POST /auth/one-off-session/exchange.\n */\n createsOneOffSession?: boolean;\n\n /**\n * W7.3b: When the token is consumed — at exchange time or at target operation time.\n * Required when `createsOneOffSession` is true.\n * - `EXCHANGE`: consumed immediately when exchanged for a JWT (no token carried into session)\n * - `TARGET_OPERATION`: carried through the session, consumed when the target operation executes\n */\n consumeAt?: 'EXCHANGE' | 'TARGET_OPERATION';\n\n /**\n * W7.3b: Builds targeting.initiatorIds for frontend URL resolution.\n * Maps field identifier names to field paths in currentState.\n * organizationId is auto-included from execution context if not specified.\n *\n * Example: `{ taskId: '_id' }` → on a Tasks resource, reads `currentState._id` as the taskId.\n * The frontend uses these to resolve the target URL after session exchange.\n */\n targetingFields?: Record<string, string>;\n\n /**\n * Public path of the frontend page that consumes this token (e.g. `/invitation`).\n * When set, the notification dispatcher builds\n * `additionalContext.acceptUrl = <frontendPublicUrl><emailLinkPath>?token=<tokenValue>`\n * for the token-bearing notification email, so the recipient can act on the\n * token straight from the email. Without it, only the raw `tokenValue` is\n * exposed and the email falls back to its generic (sign-in) CTA. Use a stable\n * framework route — the backend cannot import frontend route constants.\n */\n emailLinkPath?: string;\n};\n/** @wildo_source:part:end saas.models.resource-config.token-generation */\n\n/**\n * Declarative config for automatic token revocation on an operation variant.\n * Placed on DELETE-like operations to revoke associated tokens before the resource is removed.\n *\n * Pipeline placement: BEFORE the core operation (pre-operation step).\n * Like token generation, revocation requires one canonical current resource\n * state and cannot be combined with collection/aggregate or authored/generated\n * bulk mutation semantics. It also cannot run on CREATE because no current\n * resource exists before persistence.\n */\nexport type TokenRevocationConfig = {\n /** Which token types to revoke when this operation executes */\n tokenTypes: ConsumableTokenTypes[];\n\n /** Field in currentState to use as relatedId for revocation lookup. Defaults to '_id'. */\n relatedIdField?: string;\n};\n\n/**\n * How a consumable token interacts with JWT/API-key authentication on an operation.\n * ALTERNATIVE: token alone is sufficient (replaces JWT). Used by PASSWORD_RESET, MAGIC_LINK, etc.\n * ADDITIVE: token is required ON TOP of JWT auth. Used by one-off session target operations.\n */\nexport enum TokenAuthenticationPolicy {\n ALTERNATIVE = 'ALTERNATIVE',\n ADDITIVE = 'ADDITIVE',\n}\n\n/**\n * Declarative config declaring that an operation accepts consumable tokens for authentication.\n * Replaces the old `ResourceConfiguration_OperationVariant_ApiCall_ConsumableToken`.\n *\n * NOTE: No `isConsumed` field — consumption is controlled by the token user's `consumptionMode`\n * (set at creation time), not by the operation config. This avoids contradictions between config\n * and entity state (Trap 5).\n */\nexport type TokenAuthenticationConfig = {\n /** Which token types this operation accepts for authentication */\n types: ConsumableTokenTypes[];\n policy: TokenAuthenticationPolicy;\n};\n"]}
1
+ {"version":3,"file":"consumable-token.shared.schemas.js","sourceRoot":"","sources":["../../../../../src/security/authentications/consumable-token.shared.schemas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAKxB,+EAA+E;AAC/E,uEAAuE;AACvE,+EAA+E;AAE/E,MAAM,CAAN,IAAY,wBAoEX;AApED,WAAY,wBAAwB;IAChC,6FAAiE,CAAA;IACjE,6DAAiD,CAAA;IACjD,qEAAqD,CAAA;IACrD,qEAAqD,CAAA;IACrD,yDAA+C,CAAA;IAC/C,+EAA0D,CAAA;IAC1D,yEAAuD,CAAA;IACvD,wFAAwF;IACxF,qEAAqD,CAAA;IACrD,kEAAkE;IAClE,mDAA4C,CAAA;IAC5C,+EAA+E;IAC/E,qDAA6C,CAAA;IAC7C,qEAAqE;IACrE,+CAA0C,CAAA;IAC1C,sFAAsF;IACtF,qEAAqD,CAAA;IACrD,yEAAyE;IACzE,+DAAkD,CAAA;IAClD,kEAAkE;IAClE,6CAAyC,CAAA;IACzC;;;;;OAKG;IACH,+EAA0D,CAAA;IAC1D;;;;;;;;OAQG;IACH,yEAAuD,CAAA;IACvD;;;;;;;;;;;OAWG;IACH,iFAA2D,CAAA;IAC3D;;;;;;;;;;;;;;OAcG;IACH,mEAAoD,CAAA;AACxD,CAAC,EApEW,wBAAwB,KAAxB,wBAAwB,QAoEnC;AAED,MAAM,CAAC,MAAM,0BAA0B,GAAG,CAAC,CAAC,KAAK,CAAC;IAC9C,CAAC,CAAC,IAAI,CAAC,wBAAwB,CAAC;IAChC,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;CACpB,CAAC,CAAC;AAMH,+EAA+E;AAC/E,qEAAqE;AACrE,+EAA+E;AAE/E;;;;;;GAMG;AACH,MAAM,CAAN,IAAY,+BAIX;AAJD,WAAY,+BAA+B;IACvC,4DAA8B,CAAA;IAC9B,kEAAiC,CAAA;IACjC,sEAAmC,CAAA;AACvC,CAAC,EAJW,+BAA+B,KAA/B,+BAA+B,QAI1C;AAkLD;;;;GAIG;AACH,MAAM,CAAN,IAAY,yBAGX;AAHD,WAAY,yBAAyB;IACjC,wDAA2B,CAAA;IAC3B,kDAAqB,CAAA;AACzB,CAAC,EAHW,yBAAyB,KAAzB,yBAAyB,QAGpC","sourcesContent":["import { z } from \"zod\";\nimport type { ExpiresInDuration } from \"@wildo-ai/zod-decorators\";\nimport type { ExecutionContext_RoleInfo } from \"../../runtime/execution-context.shared.schemas\";\n\n\n// ============================================================================\n// CONSUMABLE TOKEN TYPES — Extensible enum of engine-level token types\n// ============================================================================\n\nexport enum CoreConsumableTokenTypes {\n ORGANIZATION_MEMBER_INVITATION = 'organization_member_invitation',\n PASSWORD_RESET = 'password_reset',\n EMAIL_VERIFICATION = 'email_verification',\n FILE_PUBLIC_ACCESS = 'file_public_access',\n OAUTH2_STATE = 'oauth2_state',\n EXTERNAL_CALLBACK_STATE = 'external_callback_state',\n WEBHOOK_VERIFICATION = 'webhook_verification',\n /** Delivers JWT tokens to the frontend after OAuth2 callback processing (Decision 7) */\n AUTH_CODE_EXCHANGE = 'auth_code_exchange',\n /** Email OTP code for MFA second factor verification (Step 10) */\n EMAIL_OTP = 'email_otp',\n /** Magic link token for passwordless first-factor authentication (Phase G2) */\n MAGIC_LINK = 'magic_link',\n /** SMS OTP code for first/second factor authentication (Phase G2) */\n SMS_OTP = 'sms_otp',\n /** Phone number verification code — not an auth flow, just verification (Phase G2) */\n PHONE_VERIFICATION = 'phone_verification',\n /** SAML AuthnRequest correlation state (AUTH-2: SAML Protocol Engine) */\n SAML_AUTH_STATE = 'saml_auth_state',\n /** Re-authentication token for sensitive method changes (#13f) */\n REAUTH = 'reauth',\n /**\n * OIDC authorization code (Wildo-as-provider authorization_code flow). Single-use,\n * short-TTL; its metadata binds the code to the authenticated `userId`, the requesting\n * `clientId`, the granted `scope`, the `redirectUri`, the PKCE `codeChallenge`, and the\n * optional `nonce`. Redeemed at the token endpoint for an ID token + access + refresh.\n */\n OIDC_AUTHORIZATION_CODE = 'oidc_authorization_code',\n /**\n * OIDC interactive-consent request (Wildo-as-provider authorization_code consent gate). Minted at\n * `/oauth/authorize` for a client whose `requiresConsent` is true, INSTEAD of auto-issuing the\n * code. Single-use, short-TTL; its metadata carries the SAME authorization request the code would\n * bind (`clientId`, `scope`, `redirectUri`, `codeChallenge`, `nonce?`, `resource?`, `state?`)\n * plus the authenticated `userId`. Consumed at `/oauth/authorize/decision`: on APPROVE it mints\n * the authorization code from the stored request; on DENY the flow ends with `access_denied`.\n * Storing the request server-side means the consent decision cannot tamper with the parameters.\n */\n OIDC_CONSENT_REQUEST = 'oidc_consent_request',\n /**\n * OIDC RP-Initiated Logout confirmation (revocation-C §6 — the logout-confirmation prompt that\n * mitigates BROWSER-based logout CSRF; a cross-origin page cannot read this token from the victim's\n * URL to complete the confirm). Minted at `GET /oauth/end-session` for any request that is NOT a\n * trusted RP logout (no/forged `id_token_hint`, or a valid hint whose `post_logout_redirect_uri`\n * is absent / unregistered / mismatched), INSTEAD of terminating the session inline. Single-use,\n * short-TTL; its metadata carries the already-validated `{ userId?, sessionId? }` the confirm step\n * acts on (storing it server-side means the confirmation cannot tamper with WHICH session ends).\n * Consumed at `POST /oauth/end-session/confirm`: on confirm it terminates that session (if any) and\n * lands on `/oauth/logged-out`. A trusted RP logout (valid hint + exact-match registered redirect)\n * skips this entirely and terminates + redirects to the RP directly — the Keycloak-style posture.\n */\n OIDC_LOGOUT_CONFIRMATION = 'oidc_logout_confirmation',\n /**\n * A single-use grant to upload ONE file into ONE resource file field, minted by a principal who\n * could perform the target CREATE/UPDATE and redeemed by whoever holds it — an AI agent's `curl`,\n * or a human on the drop page — without the minter's own credential ever leaving the server.\n *\n * Exists because MCP tool arguments are model-generated JSON and cannot carry bytes; see #312.\n * `SINGLE_USE` only (a reusable upload credential is the presigned-URL defect rebuilt inside\n * the API). Typed fields carry identity — `userId`/`organizationId`/`roles` snapshot of the\n * minter, `resourceIdentifier` = target resource, `relatedId` = target row for UPDATE — and\n * `metadata` carries the ROUTE binding (`fieldName`, `operation`, `minter`, `producedFileId`),\n * which the upload middleware checks and the identity layer deliberately ignores. Lifetime is\n * bounded at the mint by `FILE_UPLOAD_GRANT_ABSOLUTE_MAX_MINUTES`, rejecting rather than\n * clamping: this credential is designed to leave the trust boundary (a transcript, a shell\n * history), so the engine owns the bound.\n */\n FILE_UPLOAD_GRANT = 'file_upload_grant',\n}\n\nexport const ConsumableTokenTypesSchema = z.union([\n z.enum(CoreConsumableTokenTypes),\n z.string().min(1),\n]);\n\n\nexport type ConsumableTokenTypes = z.infer<typeof ConsumableTokenTypesSchema>;\n\n\n// ============================================================================\n// CONSUMPTION MODE — Three behavioral categories for token lifecycle\n// ============================================================================\n\n/**\n * Defines how a token behaves when used.\n *\n * - `SINGLE_USE`: Consumed after first successful use (password reset, invitation acceptance)\n * - `BOUNDED_REUSE`: Can be used N times or until expiry (file sharing link, meeting join link)\n * - `EPHEMERAL_STATE`: Carries state through a redirect, consumed on callback (OAuth state, payment callback)\n */\nexport enum ConsumableToken_ConsumptionMode {\n SINGLE_USE = 'SINGLE_USE',\n BOUNDED_REUSE = 'BOUNDED_REUSE',\n EPHEMERAL_STATE = 'EPHEMERAL_STATE',\n}\n\n\n// ============================================================================\n// UTILITY TYPE — StaticOrDerived<T>\n// ============================================================================\n\n/**\n * A value that can either be provided statically or derived from the operation result at runtime.\n *\n * Static: `{ value: 7, unit: 'days' }`\n * Derived: `(currentObject) => ({ value: currentObject.shareDurationDays, unit: 'days' })`\n *\n * NOTE: This is intentionally NOT `ResourceConfiguration_FunctionWithContextNeeds` (R5).\n * `FunctionWithContextNeeds` wraps functions with metadata flags (`needsObjectContext`, `needsUserContext`)\n * for factory introspection. `StaticOrDerived<T>` is simpler — it's just \"literal value OR function from\n * currentObject\" with no metadata flags. The factory marks dynamic values as `_isDynamic` during\n * processing, which is a different mechanism entirely.\n */\nexport type StaticOrDerived<T> = T | ((currentObject: Record<string, any>) => T);\n\n\n// ============================================================================\n// DECLARATIVE CONFIG TYPES — For operation variant configuration\n// ============================================================================\n\n/** @wildo_source:part:start saas.models.resource-config.token-generation facet:layer:shared facet:family:resource-config\n *\n * Config-declared gate deciding whether a `tokenGeneration` side-effect actually\n * mints a token, evaluated against the POST-operation row (`currentObject`).\n *\n * WHY the destructured params-object shape `({ currentObject }) => boolean` and NOT\n * the positional `StaticOrDerived` shape used by `expiresIn`/`grantedRoles` above (R5):\n * this deliberately mirrors the operation-variant `enabledCondition` predicate (see the\n * org-members REVOKE/RESEND configs) so an app author writes ONE predicate form for every\n * \"config-declared gate over currentObject\". The trade-off is worth it — cross-surface\n * authoring consistency beats intra-type consistency with the positional derivers.\n *\n * WHY the params object carries ONLY `currentObject` (unlike the notification `condition`,\n * which also gets `inputDto`/`objectContext`/`initiatorIds`): a token is a PERSISTED\n * side-effect keyed on the resulting row, so its gate must depend only on the persisted\n * result — never on raw request input. Narrowing the params to `currentObject` makes that\n * guarantee structural. (It also keeps this type free of the `resources-config` params type,\n * which would be a circular import — `resources-config.shared.schemas` imports FROM here.)\n */\nexport type TokenGenerationCondition = (params: { currentObject: Record<string, any> }) => boolean;\n/** @wildo_source:part:end saas.models.resource-config.token-generation */\n\n/** @wildo_source:part:start saas.models.resource-config.token-generation facet:layer:shared facet:family:resource-config\n *\n * Declarative config for automatic token generation on an operation variant.\n * Placed on CREATE/RESEND-like operations to generate a token as a side-effect.\n *\n * Import from `@wildo-ai/saas-models`; application authors normally provide\n * this shape through an API-call variant in\n * `createResourceConfiguration_Initialization(...)`.\n *\n * The operation pipeline creates the token in the same persistence transaction\n * as the resource mutation, then injects `additionalContext.tokenValue` into\n * post-commit notification dispatch.\n *\n * The contract requires one canonical persisted resource state. It cannot be\n * authored on a collection/aggregate operation, a core bulk mutation, or a\n * variant with `haveBulkOperation: true`; those operations do not expose one\n * unambiguous related resource identity for the generated token.\n *\n * @example\n * `tokenGeneration: { tokenType: MyTokenType.INVITATION, consumptionMode:\n * ConsumableToken_ConsumptionMode.SINGLE_USE, expiresIn: { value: 7, unit:\n * DurationUnit.DAYS }, relatedIdField: '_id' }`\n */\nexport type TokenGenerationConfig = {\n /** Token type identifier (from CoreConsumableTokenTypes or custom app enum) */\n tokenType: ConsumableTokenTypes;\n\n /** How the token behaves when used */\n consumptionMode: ConsumableToken_ConsumptionMode;\n\n /**\n * Expiration duration — static or derived from currentObject.\n * Units: minutes, hours, or days only. Value must be ≥ 1.\n * Static: `{ value: 7, unit: DurationUnit.DAYS }`\n * Derived: `(currentObject) => ({ value: currentObject.shareDurationDays, unit: 'days' })`\n */\n expiresIn: StaticOrDerived<ExpiresInDuration>;\n\n /**\n * Optional gate — mint this token ONLY when the predicate returns truthy against the\n * post-operation row. Absent = always mint.\n *\n * Canonical use: a POLYMORPHIC CREATE (org-member INVITE vs DIRECT-ADD) mints the\n * single-use accept token ONLY for the INVITED branch. A direct-add (founder / SSO-JIT /\n * SCIM) persists `ACTIVE` with nothing to accept, so minting a token there would leave a\n * live single-use accept token dangling on an already-ACTIVE row (a hygiene/security\n * hole). Keying on the resulting `status` — the semantic driver, uniformly present on\n * every branch's `currentObject` — auto-covers any future non-INVITED direct-add path.\n *\n * @example `({ currentObject }) => currentObject.status === OrganizationMemberStatus.INVITED`\n */\n condition?: TokenGenerationCondition;\n\n /**\n * Roles granted when the token is used for authentication.\n * Static: `[{ roles: ['ORG_MEMBER'], relatedPrimaryScope: 'ORGANIZATIONS' }]`\n * Derived: `(currentObject) => [{ roles: [currentObject.assignedRole], relatedPrimaryScope: 'ORGANIZATIONS' }]`\n */\n grantedRoles?: StaticOrDerived<ExecutionContext_RoleInfo[]>;\n\n /** Max uses for BOUNDED_REUSE mode. Required when consumptionMode is BOUNDED_REUSE. */\n maxUses?: number;\n\n /** Revoke existing tokens of same type for same relatedId before creating new one (e.g., RESEND) */\n revokeExistingForSameRelated?: boolean;\n\n /** Field in currentState to use as relatedId. Defaults to '_id' (the resource's own ID). */\n relatedIdField?: string;\n\n /**\n * Field in currentState to capture as the token's userId (user_self pattern).\n * e.g., 'invitedUserId' — if not set, no userId stored on token.\n */\n userIdField?: string;\n\n /**\n * W7.3b: Marks the generated token as exchangeable for a one-off session JWT.\n * When true, the token can be used via POST /auth/one-off-session/exchange.\n */\n createsOneOffSession?: boolean;\n\n /**\n * W7.3b: When the token is consumed — at exchange time or at target operation time.\n * Required when `createsOneOffSession` is true.\n * - `EXCHANGE`: consumed immediately when exchanged for a JWT (no token carried into session)\n * - `TARGET_OPERATION`: carried through the session, consumed when the target operation executes\n */\n consumeAt?: 'EXCHANGE' | 'TARGET_OPERATION';\n\n /**\n * W7.3b: Builds targeting.initiatorIds for frontend URL resolution.\n * Maps field identifier names to field paths in currentState.\n * organizationId is auto-included from execution context if not specified.\n *\n * Example: `{ taskId: '_id' }` → on a Tasks resource, reads `currentState._id` as the taskId.\n * The frontend uses these to resolve the target URL after session exchange.\n */\n targetingFields?: Record<string, string>;\n\n /**\n * Public path of the frontend page that consumes this token (e.g. `/invitation`).\n * When set, the notification dispatcher builds\n * `additionalContext.acceptUrl = <frontendPublicUrl><emailLinkPath>?token=<tokenValue>`\n * for the token-bearing notification email, so the recipient can act on the\n * token straight from the email. Without it, only the raw `tokenValue` is\n * exposed and the email falls back to its generic (sign-in) CTA. Use a stable\n * framework route — the backend cannot import frontend route constants.\n */\n emailLinkPath?: string;\n};\n/** @wildo_source:part:end saas.models.resource-config.token-generation */\n\n/**\n * Declarative config for automatic token revocation on an operation variant.\n * Placed on DELETE-like operations to revoke associated tokens before the resource is removed.\n *\n * Pipeline placement: BEFORE the core operation (pre-operation step).\n * Like token generation, revocation requires one canonical current resource\n * state and cannot be combined with collection/aggregate or authored/generated\n * bulk mutation semantics. It also cannot run on CREATE because no current\n * resource exists before persistence.\n */\nexport type TokenRevocationConfig = {\n /** Which token types to revoke when this operation executes */\n tokenTypes: ConsumableTokenTypes[];\n\n /** Field in currentState to use as relatedId for revocation lookup. Defaults to '_id'. */\n relatedIdField?: string;\n};\n\n/**\n * How a consumable token interacts with JWT/API-key authentication on an operation.\n * ALTERNATIVE: token alone is sufficient (replaces JWT). Used by PASSWORD_RESET, MAGIC_LINK, etc.\n * ADDITIVE: token is required ON TOP of JWT auth. Used by one-off session target operations.\n */\nexport enum TokenAuthenticationPolicy {\n ALTERNATIVE = 'ALTERNATIVE',\n ADDITIVE = 'ADDITIVE',\n}\n\n/**\n * Declarative config declaring that an operation accepts consumable tokens for authentication.\n * Replaces the old `ResourceConfiguration_OperationVariant_ApiCall_ConsumableToken`.\n *\n * NOTE: No `isConsumed` field — consumption is controlled by the token user's `consumptionMode`\n * (set at creation time), not by the operation config. This avoids contradictions between config\n * and entity state (Trap 5).\n */\nexport type TokenAuthenticationConfig = {\n /** Which token types this operation accepts for authentication */\n types: ConsumableTokenTypes[];\n policy: TokenAuthenticationPolicy;\n};\n"]}
@@ -0,0 +1,28 @@
1
+ /**
2
+ * What a person is handed when they enrol a second factor, and what they can rely on afterwards.
3
+ *
4
+ * These values were literals inside the MFA service (`for (let i = 0; i < 10; i++)` and
5
+ * `randomBytes(4)`), which meant the documentation could only describe them by copying them —
6
+ * and the pages that should have told a reader how many codes they get, and what to do when the
7
+ * last one is used, said nothing at all rather than risk being wrong.
8
+ *
9
+ * The enrolment path derives from this object and the customer documentation projects it, so the
10
+ * count on the page is the count the person receives.
11
+ */
12
+ export declare const MFA_BACKUP_CODE_CONTRACT: {
13
+ /** How many single-use recovery codes an enrolment issues. */
14
+ readonly codeCount: 10;
15
+ /**
16
+ * Bytes of randomness per code. Each byte is rendered as two hexadecimal characters, so the code
17
+ * a person sees is twice this many characters.
18
+ */
19
+ readonly codeRandomBytes: 4;
20
+ /**
21
+ * A code works once. Using it removes it from the person's remaining set; the application never
22
+ * re-issues the same code, and a fresh enrolment replaces the whole set.
23
+ */
24
+ readonly singleUse: true;
25
+ };
26
+ /** Characters in one backup code as the person sees it. */
27
+ export declare const MFA_BACKUP_CODE_CHARACTER_LENGTH: number;
28
+ //# sourceMappingURL=mfa-backup-code-contract.shared.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"mfa-backup-code-contract.shared.d.ts","sourceRoot":"","sources":["../../../../../src/security/authentications/mfa-backup-code-contract.shared.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AACH,eAAO,MAAM,wBAAwB;IACnC,8DAA8D;;IAE9D;;;OAGG;;IAEH;;;OAGG;;CAEK,CAAC;AAEX,2DAA2D;AAC3D,eAAO,MAAM,gCAAgC,EAAE,MAAqD,CAAC"}
@@ -0,0 +1,28 @@
1
+ /**
2
+ * What a person is handed when they enrol a second factor, and what they can rely on afterwards.
3
+ *
4
+ * These values were literals inside the MFA service (`for (let i = 0; i < 10; i++)` and
5
+ * `randomBytes(4)`), which meant the documentation could only describe them by copying them —
6
+ * and the pages that should have told a reader how many codes they get, and what to do when the
7
+ * last one is used, said nothing at all rather than risk being wrong.
8
+ *
9
+ * The enrolment path derives from this object and the customer documentation projects it, so the
10
+ * count on the page is the count the person receives.
11
+ */
12
+ export const MFA_BACKUP_CODE_CONTRACT = {
13
+ /** How many single-use recovery codes an enrolment issues. */
14
+ codeCount: 10,
15
+ /**
16
+ * Bytes of randomness per code. Each byte is rendered as two hexadecimal characters, so the code
17
+ * a person sees is twice this many characters.
18
+ */
19
+ codeRandomBytes: 4,
20
+ /**
21
+ * A code works once. Using it removes it from the person's remaining set; the application never
22
+ * re-issues the same code, and a fresh enrolment replaces the whole set.
23
+ */
24
+ singleUse: true,
25
+ };
26
+ /** Characters in one backup code as the person sees it. */
27
+ export const MFA_BACKUP_CODE_CHARACTER_LENGTH = MFA_BACKUP_CODE_CONTRACT.codeRandomBytes * 2;
28
+ //# sourceMappingURL=mfa-backup-code-contract.shared.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"mfa-backup-code-contract.shared.js","sourceRoot":"","sources":["../../../../../src/security/authentications/mfa-backup-code-contract.shared.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AACH,MAAM,CAAC,MAAM,wBAAwB,GAAG;IACtC,8DAA8D;IAC9D,SAAS,EAAE,EAAE;IACb;;;OAGG;IACH,eAAe,EAAE,CAAC;IAClB;;;OAGG;IACH,SAAS,EAAE,IAAI;CACP,CAAC;AAEX,2DAA2D;AAC3D,MAAM,CAAC,MAAM,gCAAgC,GAAW,wBAAwB,CAAC,eAAe,GAAG,CAAC,CAAC","sourcesContent":["/**\n * What a person is handed when they enrol a second factor, and what they can rely on afterwards.\n *\n * These values were literals inside the MFA service (`for (let i = 0; i < 10; i++)` and\n * `randomBytes(4)`), which meant the documentation could only describe them by copying them —\n * and the pages that should have told a reader how many codes they get, and what to do when the\n * last one is used, said nothing at all rather than risk being wrong.\n *\n * The enrolment path derives from this object and the customer documentation projects it, so the\n * count on the page is the count the person receives.\n */\nexport const MFA_BACKUP_CODE_CONTRACT = {\n /** How many single-use recovery codes an enrolment issues. */\n codeCount: 10,\n /**\n * Bytes of randomness per code. Each byte is rendered as two hexadecimal characters, so the code\n * a person sees is twice this many characters.\n */\n codeRandomBytes: 4,\n /**\n * A code works once. Using it removes it from the person's remaining set; the application never\n * re-issues the same code, and a fresh enrolment replaces the whole set.\n */\n singleUse: true,\n} as const;\n\n/** Characters in one backup code as the person sees it. */\nexport const MFA_BACKUP_CODE_CHARACTER_LENGTH: number = MFA_BACKUP_CODE_CONTRACT.codeRandomBytes * 2;\n"]}
@@ -37,6 +37,7 @@ export declare const UserRegisterApiDtoSchema: z.ZodObject<{
37
37
  lastName: z.ZodString;
38
38
  password: z.ZodOptional<z.ZodString>;
39
39
  organizationName: z.ZodOptional<z.ZodString>;
40
+ method: z.ZodOptional<z.ZodEnum<typeof AuthMethod>>;
40
41
  }, z.core.$strip>;
41
42
  export type UserRegisterApiDto = z.infer<typeof UserRegisterApiDtoSchema>;
42
43
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"registration.shared.dto.schemas.d.ts","sourceRoot":"","sources":["../../../../../src/security/authentications/registration.shared.dto.schemas.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EAAE,UAAU,EAAE,MAAM,iCAAiC,CAAC;AAM7D;;;;;;;;;;GAUG;AACH,eAAO,MAAM,yBAAyB;;;;;;;iBAoBpC,CAAC;AAGH,MAAM,MAAM,mBAAmB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,yBAAyB,CAAC,CAAC;AAE5E;;;;GAIG;AACH,eAAO,MAAM,wBAAwB;;;;;;iBAOnC,CAAC;AAGH,MAAM,MAAM,kBAAkB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,wBAAwB,CAAC,CAAC;AAM1E;;;;;;;;GAQG;AACH,eAAO,MAAM,2BAA2B;;;;;iBAqBtC,CAAC;AAEH,MAAM,MAAM,qBAAqB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,2BAA2B,CAAC,CAAC;AAEhF;;;;;;;;;;;;GAYG;AACH,eAAO,MAAM,oCAAoC,2EAIvC,CAAC;AAEX;;;;;;GAMG;AACH,MAAM,MAAM,gCAAgC,GAAG,CAAC,OAAO,oCAAoC,CAAC,CAAC,MAAM,CAAC,CAAC;AAErG;;;;;;;GAOG;AACH,eAAO,MAAM,0BAA0B;;;;;;;;;;iBASrC,CAAC;AAEH,MAAM,MAAM,oBAAoB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,0BAA0B,CAAC,CAAC;AAE9E;;GAEG;AACH,eAAO,MAAM,gCAAgC;;;iBAG3C,CAAC;AAEH,MAAM,MAAM,0BAA0B,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,gCAAgC,CAAC,CAAC;AAM1F;;;;GAIG;AACH,eAAO,MAAM,oBAAoB;;;iBAG/B,CAAC;AAEH,MAAM,MAAM,cAAc,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,oBAAoB,CAAC,CAAC"}
1
+ {"version":3,"file":"registration.shared.dto.schemas.d.ts","sourceRoot":"","sources":["../../../../../src/security/authentications/registration.shared.dto.schemas.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EAAE,UAAU,EAAE,MAAM,iCAAiC,CAAC;AAM7D;;;;;;;;;;GAUG;AACH,eAAO,MAAM,yBAAyB;;;;;;;iBAoBpC,CAAC;AAGH,MAAM,MAAM,mBAAmB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,yBAAyB,CAAC,CAAC;AAE5E;;;;GAIG;AACH,eAAO,MAAM,wBAAwB;;;;;;;iBAkBnC,CAAC;AAGH,MAAM,MAAM,kBAAkB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,wBAAwB,CAAC,CAAC;AAM1E;;;;;;;;GAQG;AACH,eAAO,MAAM,2BAA2B;;;;;iBAqBtC,CAAC;AAEH,MAAM,MAAM,qBAAqB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,2BAA2B,CAAC,CAAC;AAEhF;;;;;;;;;;;;GAYG;AACH,eAAO,MAAM,oCAAoC,2EAIvC,CAAC;AAEX;;;;;;GAMG;AACH,MAAM,MAAM,gCAAgC,GAAG,CAAC,OAAO,oCAAoC,CAAC,CAAC,MAAM,CAAC,CAAC;AAErG;;;;;;;GAOG;AACH,eAAO,MAAM,0BAA0B;;;;;;;;;;iBASrC,CAAC;AAEH,MAAM,MAAM,oBAAoB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,0BAA0B,CAAC,CAAC;AAE9E;;GAEG;AACH,eAAO,MAAM,gCAAgC;;;iBAG3C,CAAC;AAEH,MAAM,MAAM,0BAA0B,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,gCAAgC,CAAC,CAAC;AAM1F;;;;GAIG;AACH,eAAO,MAAM,oBAAoB;;;iBAG/B,CAAC;AAEH,MAAM,MAAM,cAAc,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,oBAAoB,CAAC,CAAC"}
@@ -54,6 +54,17 @@ export const UserRegisterApiDtoSchema = z.object({
54
54
  password: z.string().min(1).optional(),
55
55
  /** W6.2: Org name when orgNameSource is 'ask'. */
56
56
  organizationName: z.string().min(1).max(200).optional(),
57
+ /**
58
+ * How the registrant will authenticate afterwards (#463). Absent ⇒ PASSWORD, so a client that
59
+ * predates password-less signup keeps working unchanged.
60
+ *
61
+ * Typed as the whole `AuthMethod` vocabulary rather than a narrowed subset, deliberately: the set
62
+ * a given application accepts is `registration.allowedMethods`, which is per user type and
63
+ * authored, and duplicating a narrower list here would be a second place for it to drift. A method
64
+ * this application does not allow is refused by the service with the allowed set in the message,
65
+ * which is a better answer than a schema rejection that cannot say what IS allowed.
66
+ */
67
+ method: z.enum(AuthMethod).optional(),
57
68
  });
58
69
  // ═══════════════════════════════════════════════════════════════
59
70
  // Invitation Acceptance DTOs
@@ -1 +1 @@
1
- {"version":3,"file":"registration.shared.dto.schemas.js","sourceRoot":"","sources":["../../../../../src/security/authentications/registration.shared.dto.schemas.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,CAAC,EAAE,MAA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;IAC1C,QAAQ,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAC/B,gBAAgB,EAAE,CAAC,CAAC,IAAI,CAAC,oCAAoC,CAAC,CAAC,QAAQ,EAAE;CAC1E,CAAC,CAAC;AAIH;;GAEG;AACH,MAAM,CAAC,MAAM,gCAAgC,GAAG,CAAC,CAAC,MAAM,CAAC;IACvD,eAAe,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;IAClC,eAAe,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,QAAQ,EAAE;CAChD,CAAC,CAAC;AAIH,kEAAkE;AAClE,6BAA6B;AAC7B,kEAAkE;AAElE;;;;GAIG;AACH,MAAM,CAAC,MAAM,oBAAoB,GAAG,CAAC,CAAC,MAAM,CAAC;IAC3C,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;IACxB,KAAK,EAAE,CAAC,CAAC,KAAK,EAAE,CAAC,WAAW,EAAE;CAC/B,CAAC,CAAC","sourcesContent":["/**\n * User Registration — Shared DTO Schemas\n *\n * Single source of truth for user registration validation.\n * Used by both frontend (AutomatedForm component) and backend (req.body parsing).\n */\n\nimport { z } from 'zod';\nimport { AutocompleteFieldIdentifier } from '@wildo-ai/zod-decorators';\nimport { AuthMethod } from './authentication.shared.schemas';\n\n// ═══════════════════════════════════════════════════════════════\n// Registration Form + API DTO\n// ═══════════════════════════════════════════════════════════════\n\n/**\n * POST /auth/register — registration form fields.\n * Used as:\n * - Frontend: AutomatedForm schema (all 5 fields rendered)\n * - Backend: req.body parsing (minus confirmPassword)\n *\n * confirmPassword is a frontend-only field for client-side match validation.\n * The .refine() for password match is applied at the component level\n * (not here) because the error message needs i18n.\n * The .isPassword() decorator tells FormField to render password inputs.\n */\nexport const UserRegisterFormDtoSchema = z.object({\n email: z.email().toLowerCase().stringUI({\n edit: { autoComplete: AutocompleteFieldIdentifier.EMAIL },\n }),\n firstName: z.string().min(1).max(50).stringUI({\n edit: { autoComplete: AutocompleteFieldIdentifier.GIVEN_NAME },\n }),\n lastName: z.string().min(1).max(50).stringUI({\n edit: { autoComplete: AutocompleteFieldIdentifier.FAMILY_NAME },\n }),\n /** W6.2: Org name when orgNameSource is 'ask'. Conditionally shown on frontend. */\n organizationName: z.string().min(1).max(200).stringUI({\n edit: { autoComplete: AutocompleteFieldIdentifier.ORGANIZATION },\n }).optional(),\n password: z.string().min(1).isPassword().stringUI({\n edit: { autoComplete: AutocompleteFieldIdentifier.NEW_PASSWORD },\n }).optional(),\n confirmPassword: z.string().min(1).isPassword().stringUI({\n edit: { autoComplete: AutocompleteFieldIdentifier.NEW_PASSWORD },\n }).optional(),\n});\n\n\nexport type UserRegisterFormDto = z.infer<typeof UserRegisterFormDtoSchema>;\n\n/**\n * POST /auth/register — API contract (what goes over the wire).\n * Backend uses this for req.body parsing.\n * confirmPassword is NOT sent to the backend.\n */\nexport const UserRegisterApiDtoSchema = z.object({\n email: z.email().toLowerCase(),\n firstName: z.string().min(1).max(50),\n lastName: z.string().min(1).max(50),\n password: z.string().min(1).optional(),\n /** W6.2: Org name when orgNameSource is 'ask'. */\n organizationName: z.string().min(1).max(200).optional(),\n});\n\n\nexport type UserRegisterApiDto = z.infer<typeof UserRegisterApiDtoSchema>;\n\n// ═══════════════════════════════════════════════════════════════\n// Invitation Acceptance DTOs\n// ═══════════════════════════════════════════════════════════════\n\n/**\n * POST /auth/invitation/accept — public invitation-acceptance form fields.\n *\n * The invitation token identifies the target invitation. Name/password fields are optional\n * because an existing invited user may only need to confirm the invitation, while a new\n * invited user can provide profile/password data in the same flow.\n *\n * confirmPassword is frontend-only and excluded from the API DTO.\n */\nexport const UserInvitationFormDtoSchema = z.object({\n // Required, mirroring registration: the invitee establishes their identity at acceptance, and\n // the profile seed keys on non-empty first+last (UserProfileSchema requires both).\n // `.regex(/\\S/)` rejects a WHITESPACE-ONLY name client-side — which `.min(1)` alone would PASS\n // (\" \" has length 2), then the frontend `normalizeText`/`.trim()` collapses it to `undefined`\n // and the required API DTO 400s AFTER the form said the field was valid. It is a CHECK,\n // deliberately NOT a `.trim()` TRANSFORM: a transform ahead of `.stringUI()` disrupts the\n // decorator's introspection surface (`getFieldUIEditConfig`). Trailing/leading whitespace is\n // normalized at the authoritative boundary (`UserInvitationApiDtoSchema`, `.trim().min(1)`).\n firstName: z.string().min(1).max(50).regex(/\\S/).stringUI({\n edit: { autoComplete: AutocompleteFieldIdentifier.GIVEN_NAME },\n }),\n lastName: z.string().min(1).max(50).regex(/\\S/).stringUI({\n edit: { autoComplete: AutocompleteFieldIdentifier.FAMILY_NAME },\n }),\n password: z.string().isPassword().stringUI({\n edit: { autoComplete: AutocompleteFieldIdentifier.NEW_PASSWORD },\n }).optional(),\n confirmPassword: z.string().isPassword().stringUI({\n edit: { autoComplete: AutocompleteFieldIdentifier.NEW_PASSWORD },\n }).optional(),\n});\n\nexport type UserInvitationFormDto = z.infer<typeof UserInvitationFormDtoSchema>;\n\n/**\n * The first-factor credential the invitee chooses to establish at acceptance.\n *\n * The invitation-accept endpoint supports exactly three establishment paths (SSO-managed\n * invitees are routed to the IdP's enterprise-authorize flow, NOT this endpoint):\n * - `PASSWORD` — set a password now. When both `credentialMethod` and\n * `password` are omitted, intentionally activate with no local credential;\n * another configured authentication method can establish later sessions.\n * - `MAGIC_LINK` — activate with no local credential; a magic link is emailed and the\n * session is established when the invitee clicks it.\n * - `PASSKEY` — enroll a NEW WebAuthn credential at accept; the invitation token bootstraps\n * the session and the passkey is registered as the go-forward credential.\n */\nexport const INVITATION_ACCEPT_CREDENTIAL_METHODS = [\n AuthMethod.PASSWORD,\n AuthMethod.MAGIC_LINK,\n AuthMethod.PASSKEY,\n] as const;\n\n/**\n * The subset of {@link AuthMethod} an invitee may establish at accept time. Enterprise-SSO / social-\n * OAuth invitees are routed to the IdP authorize flow, NOT the accept endpoint, so those members are\n * intentionally absent. Single source of truth for BOTH the request DTO (`credentialMethod` enum) and\n * the backend `AcceptInvitationParams.credentialMethod` — so the service signature can never drift\n * wider than the wire contract it is fed from.\n */\nexport type InvitationAcceptCredentialMethod = (typeof INVITATION_ACCEPT_CREDENTIAL_METHODS)[number];\n\n/**\n * POST /auth/invitation/accept — API contract.\n *\n * `credentialMethod` is optional by design. When absent, a provided `password`\n * establishes a password credential; without one, acceptance activates the\n * membership without a local credential. `MAGIC_LINK` and `PASSKEY` are\n * explicit because they initiate method-specific work.\n */\nexport const UserInvitationApiDtoSchema = z.object({\n invitationToken: z.string().min(1),\n // Required (min 1), mirroring registration — see UserInvitationFormDtoSchema.\n // `.trim()` before `.min(1)` fail-closes a whitespace-only name at the boundary\n // (a direct API caller can't seed a blank profile name).\n firstName: z.string().trim().min(1).max(50),\n lastName: z.string().trim().min(1).max(50),\n password: z.string().optional(),\n credentialMethod: z.enum(INVITATION_ACCEPT_CREDENTIAL_METHODS).optional(),\n});\n\nexport type UserInvitationApiDto = z.infer<typeof UserInvitationApiDtoSchema>;\n\n/**\n * POST /auth/invitation/reject — API contract.\n */\nexport const UserInvitationRejectApiDtoSchema = z.object({\n invitationToken: z.string().min(1),\n rejectionReason: z.string().max(500).optional(),\n});\n\nexport type UserInvitationRejectApiDto = z.infer<typeof UserInvitationRejectApiDtoSchema>;\n\n// ═══════════════════════════════════════════════════════════════\n// Email Verification API DTO\n// ═══════════════════════════════════════════════════════════════\n\n/**\n * POST /auth/verify-email — API contract.\n * Token and email are extracted from URL query parameters on the frontend.\n * Email is required for defense-in-depth constant-time comparison against token metadata.\n */\nexport const EmailVerifyDtoSchema = z.object({\n token: z.string().min(1),\n email: z.email().toLowerCase(),\n});\n\nexport type EmailVerifyDto = z.infer<typeof EmailVerifyDtoSchema>;\n"]}
1
+ {"version":3,"file":"registration.shared.dto.schemas.js","sourceRoot":"","sources":["../../../../../src/security/authentications/registration.shared.dto.schemas.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EA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AQ,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,IAAI,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,EAAE,CAAC;IAC1C,QAAQ,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAC/B,gBAAgB,EAAE,CAAC,CAAC,IAAI,CAAC,oCAAoC,CAAC,CAAC,QAAQ,EAAE;CAC1E,CAAC,CAAC;AAIH;;GAEG;AACH,MAAM,CAAC,MAAM,gCAAgC,GAAG,CAAC,CAAC,MAAM,CAAC;IACvD,eAAe,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;IAClC,eAAe,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,QAAQ,EAAE;CAChD,CAAC,CAAC;AAIH,kEAAkE;AAClE,6BAA6B;AAC7B,kEAAkE;AAElE;;;;GAIG;AACH,MAAM,CAAC,MAAM,oBAAoB,GAAG,CAAC,CAAC,MAAM,CAAC;IAC3C,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;IACxB,KAAK,EAAE,CAAC,CAAC,KAAK,EAAE,CAAC,WAAW,EAAE;CAC/B,CAAC,CAAC","sourcesContent":["/**\n * User Registration — Shared DTO Schemas\n *\n * Single source of truth for user registration validation.\n * Used by both frontend (AutomatedForm component) and backend (req.body parsing).\n */\n\nimport { z } from 'zod';\nimport { AutocompleteFieldIdentifier } from '@wildo-ai/zod-decorators';\nimport { AuthMethod } from './authentication.shared.schemas';\n\n// ═══════════════════════════════════════════════════════════════\n// Registration Form + API DTO\n// ═══════════════════════════════════════════════════════════════\n\n/**\n * POST /auth/register — registration form fields.\n * Used as:\n * - Frontend: AutomatedForm schema (all 5 fields rendered)\n * - Backend: req.body parsing (minus confirmPassword)\n *\n * confirmPassword is a frontend-only field for client-side match validation.\n * The .refine() for password match is applied at the component level\n * (not here) because the error message needs i18n.\n * The .isPassword() decorator tells FormField to render password inputs.\n */\nexport const UserRegisterFormDtoSchema = z.object({\n email: z.email().toLowerCase().stringUI({\n edit: { autoComplete: AutocompleteFieldIdentifier.EMAIL },\n }),\n firstName: z.string().min(1).max(50).stringUI({\n edit: { autoComplete: AutocompleteFieldIdentifier.GIVEN_NAME },\n }),\n lastName: z.string().min(1).max(50).stringUI({\n edit: { autoComplete: AutocompleteFieldIdentifier.FAMILY_NAME },\n }),\n /** W6.2: Org name when orgNameSource is 'ask'. Conditionally shown on frontend. */\n organizationName: z.string().min(1).max(200).stringUI({\n edit: { autoComplete: AutocompleteFieldIdentifier.ORGANIZATION },\n }).optional(),\n password: z.string().min(1).isPassword().stringUI({\n edit: { autoComplete: AutocompleteFieldIdentifier.NEW_PASSWORD },\n }).optional(),\n confirmPassword: z.string().min(1).isPassword().stringUI({\n edit: { autoComplete: AutocompleteFieldIdentifier.NEW_PASSWORD },\n }).optional(),\n});\n\n\nexport type UserRegisterFormDto = z.infer<typeof UserRegisterFormDtoSchema>;\n\n/**\n * POST /auth/register — API contract (what goes over the wire).\n * Backend uses this for req.body parsing.\n * confirmPassword is NOT sent to the backend.\n */\nexport const UserRegisterApiDtoSchema = z.object({\n email: z.email().toLowerCase(),\n firstName: z.string().min(1).max(50),\n lastName: z.string().min(1).max(50),\n password: z.string().min(1).optional(),\n /** W6.2: Org name when orgNameSource is 'ask'. */\n organizationName: z.string().min(1).max(200).optional(),\n /**\n * How the registrant will authenticate afterwards (#463). Absent ⇒ PASSWORD, so a client that\n * predates password-less signup keeps working unchanged.\n *\n * Typed as the whole `AuthMethod` vocabulary rather than a narrowed subset, deliberately: the set\n * a given application accepts is `registration.allowedMethods`, which is per user type and\n * authored, and duplicating a narrower list here would be a second place for it to drift. A method\n * this application does not allow is refused by the service with the allowed set in the message,\n * which is a better answer than a schema rejection that cannot say what IS allowed.\n */\n method: z.enum(AuthMethod).optional(),\n});\n\n\nexport type UserRegisterApiDto = z.infer<typeof UserRegisterApiDtoSchema>;\n\n// ═══════════════════════════════════════════════════════════════\n// Invitation Acceptance DTOs\n// ═══════════════════════════════════════════════════════════════\n\n/**\n * POST /auth/invitation/accept — public invitation-acceptance form fields.\n *\n * The invitation token identifies the target invitation. Name/password fields are optional\n * because an existing invited user may only need to confirm the invitation, while a new\n * invited user can provide profile/password data in the same flow.\n *\n * confirmPassword is frontend-only and excluded from the API DTO.\n */\nexport const UserInvitationFormDtoSchema = z.object({\n // Required, mirroring registration: the invitee establishes their identity at acceptance, and\n // the profile seed keys on non-empty first+last (UserProfileSchema requires both).\n // `.regex(/\\S/)` rejects a WHITESPACE-ONLY name client-side — which `.min(1)` alone would PASS\n // (\" \" has length 2), then the frontend `normalizeText`/`.trim()` collapses it to `undefined`\n // and the required API DTO 400s AFTER the form said the field was valid. It is a CHECK,\n // deliberately NOT a `.trim()` TRANSFORM: a transform ahead of `.stringUI()` disrupts the\n // decorator's introspection surface (`getFieldUIEditConfig`). Trailing/leading whitespace is\n // normalized at the authoritative boundary (`UserInvitationApiDtoSchema`, `.trim().min(1)`).\n firstName: z.string().min(1).max(50).regex(/\\S/).stringUI({\n edit: { autoComplete: AutocompleteFieldIdentifier.GIVEN_NAME },\n }),\n lastName: z.string().min(1).max(50).regex(/\\S/).stringUI({\n edit: { autoComplete: AutocompleteFieldIdentifier.FAMILY_NAME },\n }),\n password: z.string().isPassword().stringUI({\n edit: { autoComplete: AutocompleteFieldIdentifier.NEW_PASSWORD },\n }).optional(),\n confirmPassword: z.string().isPassword().stringUI({\n edit: { autoComplete: AutocompleteFieldIdentifier.NEW_PASSWORD },\n }).optional(),\n});\n\nexport type UserInvitationFormDto = z.infer<typeof UserInvitationFormDtoSchema>;\n\n/**\n * The first-factor credential the invitee chooses to establish at acceptance.\n *\n * The invitation-accept endpoint supports exactly three establishment paths (SSO-managed\n * invitees are routed to the IdP's enterprise-authorize flow, NOT this endpoint):\n * - `PASSWORD` — set a password now. When both `credentialMethod` and\n * `password` are omitted, intentionally activate with no local credential;\n * another configured authentication method can establish later sessions.\n * - `MAGIC_LINK` — activate with no local credential; a magic link is emailed and the\n * session is established when the invitee clicks it.\n * - `PASSKEY` — enroll a NEW WebAuthn credential at accept; the invitation token bootstraps\n * the session and the passkey is registered as the go-forward credential.\n */\nexport const INVITATION_ACCEPT_CREDENTIAL_METHODS = [\n AuthMethod.PASSWORD,\n AuthMethod.MAGIC_LINK,\n AuthMethod.PASSKEY,\n] as const;\n\n/**\n * The subset of {@link AuthMethod} an invitee may establish at accept time. Enterprise-SSO / social-\n * OAuth invitees are routed to the IdP authorize flow, NOT the accept endpoint, so those members are\n * intentionally absent. Single source of truth for BOTH the request DTO (`credentialMethod` enum) and\n * the backend `AcceptInvitationParams.credentialMethod` — so the service signature can never drift\n * wider than the wire contract it is fed from.\n */\nexport type InvitationAcceptCredentialMethod = (typeof INVITATION_ACCEPT_CREDENTIAL_METHODS)[number];\n\n/**\n * POST /auth/invitation/accept — API contract.\n *\n * `credentialMethod` is optional by design. When absent, a provided `password`\n * establishes a password credential; without one, acceptance activates the\n * membership without a local credential. `MAGIC_LINK` and `PASSKEY` are\n * explicit because they initiate method-specific work.\n */\nexport const UserInvitationApiDtoSchema = z.object({\n invitationToken: z.string().min(1),\n // Required (min 1), mirroring registration — see UserInvitationFormDtoSchema.\n // `.trim()` before `.min(1)` fail-closes a whitespace-only name at the boundary\n // (a direct API caller can't seed a blank profile name).\n firstName: z.string().trim().min(1).max(50),\n lastName: z.string().trim().min(1).max(50),\n password: z.string().optional(),\n credentialMethod: z.enum(INVITATION_ACCEPT_CREDENTIAL_METHODS).optional(),\n});\n\nexport type UserInvitationApiDto = z.infer<typeof UserInvitationApiDtoSchema>;\n\n/**\n * POST /auth/invitation/reject — API contract.\n */\nexport const UserInvitationRejectApiDtoSchema = z.object({\n invitationToken: z.string().min(1),\n rejectionReason: z.string().max(500).optional(),\n});\n\nexport type UserInvitationRejectApiDto = z.infer<typeof UserInvitationRejectApiDtoSchema>;\n\n// ═══════════════════════════════════════════════════════════════\n// Email Verification API DTO\n// ═══════════════════════════════════════════════════════════════\n\n/**\n * POST /auth/verify-email — API contract.\n * Token and email are extracted from URL query parameters on the frontend.\n * Email is required for defense-in-depth constant-time comparison against token metadata.\n */\nexport const EmailVerifyDtoSchema = z.object({\n token: z.string().min(1),\n email: z.email().toLowerCase(),\n});\n\nexport type EmailVerifyDto = z.infer<typeof EmailVerifyDtoSchema>;\n"]}
@@ -30,6 +30,21 @@ export declare const ScimAttributeMappingSchema: z.ZodObject<{
30
30
  displayName: z.ZodDefault<z.ZodString>;
31
31
  }, z.core.$strip>;
32
32
  export type ScimAttributeMapping = z.infer<typeof ScimAttributeMappingSchema>;
33
+ /**
34
+ * The API-relative base an external identity provider pushes SCIM traffic to.
35
+ *
36
+ * ONE named source for a path that four different surfaces need to agree on: the virtual
37
+ * `scimEndpointUrl` below, the SCIM controller's own mount, the specification that documents the
38
+ * field, and the customer documentation that tells an administrator what to paste into their IdP.
39
+ * Before this existed the documentation's worked example was `https://api.example.com/api/v1/scim/v2`
40
+ * — a real path under a host that does not exist, which an administrator cannot tell from a value
41
+ * they are meant to use.
42
+ *
43
+ * Built from {@link MAIN_API_BASE_PATH}, so a mount change moves every consumer with it rather than
44
+ * stranding a literal. That is not hypothetical here: this field replaced a dead custom
45
+ * implementation that hardcoded `/api/scim/v2` and was simply wrong for missing the version prefix.
46
+ */
47
+ export declare const SCIM_SERVICE_BASE_PATH: string;
33
48
  export declare const ScimProvisioningConfigBaseSchema: z.ZodObject<{
34
49
  _id: import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<z.ZodString>>;
35
50
  autoCreateUsers: import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<z.ZodDefault<z.ZodBoolean>>>;
@@ -1 +1 @@
1
- {"version":3,"file":"scim-provisioning-config.shared.schemas.d.ts","sourceRoot":"","sources":["../../../../../../src/security/authentications/scim/scim-provisioning-config.shared.schemas.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAQxB;;;;;;;;;;;;;GAaG;AACH,eAAO,MAAM,0BAA0B;;;;;iBAKrC,CAAC;AACH,MAAM,MAAM,oBAAoB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,0BAA0B,CAAC,CAAC;AAa9E,eAAO,MAAM,gCAAgC;;;;;;;;;;;;;;;;;;;;;iBAsJ3C,CAAC;AAEH,MAAM,MAAM,0BAA0B,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,gCAAgC,CAAC,CAAC;AAE1F,eAAO,MAAM,4CAA4C;;;;;;;;;;;;;;;;;;;;;kBAMvD,CAAC"}
1
+ {"version":3,"file":"scim-provisioning-config.shared.schemas.d.ts","sourceRoot":"","sources":["../../../../../../src/security/authentications/scim/scim-provisioning-config.shared.schemas.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAQxB;;;;;;;;;;;;;GAaG;AACH,eAAO,MAAM,0BAA0B;;;;;iBAKrC,CAAC;AACH,MAAM,MAAM,oBAAoB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,0BAA0B,CAAC,CAAC;AAa9E;;;;;;;;;;;;;GAaG;AACH,eAAO,MAAM,sBAAsB,EAAE,MAAwC,CAAC;AAE9E,eAAO,MAAM,gCAAgC;;;;;;;;;;;;;;;;;;;;;iBAsJ3C,CAAC;AAEH,MAAM,MAAM,0BAA0B,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,gCAAgC,CAAC,CAAC;AAE1F,eAAO,MAAM,4CAA4C;;;;;;;;;;;;;;;;;;;;;kBAMvD,CAAC"}
@@ -13,7 +13,7 @@ import { AUTH_SCOPE_VARIANTS } from '../authentication.shared.schemas.js';
13
13
  import { declarePolymorphicSchemas } from '../../../resources/utils/resource-polymorphism.schemas.js';
14
14
  import { CoreResourceType } from '../../../resources/resources.shared.core.definitions.js';
15
15
  import { MAIN_API_BASE_PATH } from '../../../requests/manual-controllers-routes-urls.js';
16
- import { DomainVerificationStatus } from '../sso/sso-config.shared.schemas.js';
16
+ import { resolveVerifiedDomains } from '../sso/sso-config.shared.schemas.js';
17
17
  import { ScimOrganizationUnitMappingEntrySchema } from './scim-organization-unit-mapping.shared.js';
18
18
  /**
19
19
  * Maps a Wildo profile field to a PATH into the inbound SCIM User JSON. Each value is a
@@ -44,6 +44,21 @@ const SCIM_SCOPE_FK_TO_SSO_CONFIG = [
44
44
  ['organizationId', CoreResourceType.ORGANIZATION_SSO_CONFIG],
45
45
  ['applicationId', CoreResourceType.APPLICATION_SSO_CONFIG],
46
46
  ];
47
+ /**
48
+ * The API-relative base an external identity provider pushes SCIM traffic to.
49
+ *
50
+ * ONE named source for a path that four different surfaces need to agree on: the virtual
51
+ * `scimEndpointUrl` below, the SCIM controller's own mount, the specification that documents the
52
+ * field, and the customer documentation that tells an administrator what to paste into their IdP.
53
+ * Before this existed the documentation's worked example was `https://api.example.com/api/v1/scim/v2`
54
+ * — a real path under a host that does not exist, which an administrator cannot tell from a value
55
+ * they are meant to use.
56
+ *
57
+ * Built from {@link MAIN_API_BASE_PATH}, so a mount change moves every consumer with it rather than
58
+ * stranding a literal. That is not hypothetical here: this field replaced a dead custom
59
+ * implementation that hardcoded `/api/scim/v2` and was simply wrong for missing the version prefix.
60
+ */
61
+ export const SCIM_SERVICE_BASE_PATH = `${MAIN_API_BASE_PATH}/scim/v2`;
47
62
  export const ScimProvisioningConfigBaseSchema = z.object({
48
63
  _id: z.string().min(1).isPrimaryKey().isSummaryField(),
49
64
  // NOTE: there is deliberately NO `scimEnabled` field. Whether SCIM is AVAILABLE for an org is a
@@ -127,7 +142,7 @@ export const ScimProvisioningConfigBaseSchema = z.object({
127
142
  * separates tenants by bearer token, not by path.
128
143
  */
129
144
  scimEndpointUrl: z.string().optional().isVirtual({
130
- calculate: () => `${MAIN_API_BASE_PATH}/scim/v2`,
145
+ calculate: () => SCIM_SERVICE_BASE_PATH,
131
146
  }),
132
147
  /**
133
148
  * The email domains SCIM provisioning will accept, mirroring the gate actually enforced at
@@ -169,8 +184,10 @@ export const ScimProvisioningConfigBaseSchema = z.object({
169
184
  const domains = rowsByScopeId.get(scopeId)?.['domains'];
170
185
  if (!domains)
171
186
  return undefined;
172
- const verificationStatus = domains.domainVerificationStatus ?? {};
173
- return (domains.verifiedDomains ?? []).filter((domain) => verificationStatus[domain] === DomainVerificationStatus.VERIFIED);
187
+ // The one derivation (#457), not a sixth hand-written join. `undefined` above is still
188
+ // DISTINCT from the `[]` this can return — see the field's docstring; the helper answers
189
+ // "which are verified", and only the caller knows whether the config was readable at all.
190
+ return resolveVerifiedDomains(domains);
174
191
  }
175
192
  catch (error) {
176
193
  utils?.logger?.warn?.(`[scimProvisioningConfig.allowedDomains] SSO config read failed for ${scope.fk}=${scopeId}; reporting undetermined`, error);