@memberjunction/server 6.2.0-edge.3 → 6.2.0-edge.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (346) hide show
  1. package/dist/.tsbuildinfo +1 -1
  2. package/dist/agentSessions/BridgeHostInstance.d.ts +25 -0
  3. package/dist/agentSessions/BridgeHostInstance.d.ts.map +1 -0
  4. package/dist/agentSessions/BridgeHostInstance.js +30 -0
  5. package/dist/agentSessions/BridgeHostInstance.js.map +1 -0
  6. package/dist/agentSessions/HostInstance.d.ts +75 -11
  7. package/dist/agentSessions/HostInstance.d.ts.map +1 -1
  8. package/dist/agentSessions/HostInstance.js +99 -28
  9. package/dist/agentSessions/HostInstance.js.map +1 -1
  10. package/dist/agentSessions/ReturningVisitorRecap.d.ts.map +1 -1
  11. package/dist/agentSessions/ReturningVisitorRecap.js +7 -3
  12. package/dist/agentSessions/ReturningVisitorRecap.js.map +1 -1
  13. package/dist/agentSessions/SessionJanitor.d.ts +173 -25
  14. package/dist/agentSessions/SessionJanitor.d.ts.map +1 -1
  15. package/dist/agentSessions/SessionJanitor.js +452 -54
  16. package/dist/agentSessions/SessionJanitor.js.map +1 -1
  17. package/dist/agentSessions/SessionManager.d.ts +43 -2
  18. package/dist/agentSessions/SessionManager.d.ts.map +1 -1
  19. package/dist/agentSessions/SessionManager.js +99 -8
  20. package/dist/agentSessions/SessionManager.js.map +1 -1
  21. package/dist/agentSessions/SessionRunIDVerifier.d.ts +63 -0
  22. package/dist/agentSessions/SessionRunIDVerifier.d.ts.map +1 -0
  23. package/dist/agentSessions/SessionRunIDVerifier.js +129 -0
  24. package/dist/agentSessions/SessionRunIDVerifier.js.map +1 -0
  25. package/dist/agentSessions/index.d.ts +2 -0
  26. package/dist/agentSessions/index.d.ts.map +1 -1
  27. package/dist/agentSessions/index.js +10 -3
  28. package/dist/agentSessions/index.js.map +1 -1
  29. package/dist/auth/actionAuthorization.d.ts +40 -0
  30. package/dist/auth/actionAuthorization.d.ts.map +1 -0
  31. package/dist/auth/actionAuthorization.js +94 -0
  32. package/dist/auth/actionAuthorization.js.map +1 -0
  33. package/dist/auth/index.d.ts.map +1 -1
  34. package/dist/auth/index.js +3 -10
  35. package/dist/auth/index.js.map +1 -1
  36. package/dist/auth/magicLink/MagicLinkService.d.ts.map +1 -1
  37. package/dist/auth/magicLink/MagicLinkService.js +6 -3
  38. package/dist/auth/magicLink/MagicLinkService.js.map +1 -1
  39. package/dist/auth/newUsers.d.ts +10 -0
  40. package/dist/auth/newUsers.d.ts.map +1 -1
  41. package/dist/auth/newUsers.js +80 -11
  42. package/dist/auth/newUsers.js.map +1 -1
  43. package/dist/config.d.ts +2378 -0
  44. package/dist/config.d.ts.map +1 -1
  45. package/dist/config.js +123 -0
  46. package/dist/config.js.map +1 -1
  47. package/dist/context.d.ts +8 -0
  48. package/dist/context.d.ts.map +1 -1
  49. package/dist/context.js +14 -11
  50. package/dist/context.js.map +1 -1
  51. package/dist/generated/graphql-schemas/__mj.d.ts +135 -0
  52. package/dist/generated/graphql-schemas/__mj.d.ts.map +1 -1
  53. package/dist/generated/graphql-schemas/__mj.js +706 -0
  54. package/dist/generated/graphql-schemas/__mj.js.map +1 -1
  55. package/dist/generic/OrphanedConversationDetailReconciler.js +3 -3
  56. package/dist/generic/OrphanedConversationDetailReconciler.js.map +1 -1
  57. package/dist/generic/ResolverBase.d.ts +20 -4
  58. package/dist/generic/ResolverBase.d.ts.map +1 -1
  59. package/dist/generic/ResolverBase.js +39 -10
  60. package/dist/generic/ResolverBase.js.map +1 -1
  61. package/dist/generic/RunViewResolver.d.ts.map +1 -1
  62. package/dist/generic/RunViewResolver.js +4 -0
  63. package/dist/generic/RunViewResolver.js.map +1 -1
  64. package/dist/index.d.ts +6 -0
  65. package/dist/index.d.ts.map +1 -1
  66. package/dist/index.js +120 -131
  67. package/dist/index.js.map +1 -1
  68. package/dist/isolatedProvider.d.ts +20 -0
  69. package/dist/isolatedProvider.d.ts.map +1 -0
  70. package/dist/isolatedProvider.js +22 -0
  71. package/dist/isolatedProvider.js.map +1 -0
  72. package/dist/realtimeProxy/RealtimeProxyServer.d.ts +44 -4
  73. package/dist/realtimeProxy/RealtimeProxyServer.d.ts.map +1 -1
  74. package/dist/realtimeProxy/RealtimeProxyServer.js +121 -16
  75. package/dist/realtimeProxy/RealtimeProxyServer.js.map +1 -1
  76. package/dist/realtimeProxy/RealtimeRelayTunnel.d.ts +171 -0
  77. package/dist/realtimeProxy/RealtimeRelayTunnel.d.ts.map +1 -0
  78. package/dist/realtimeProxy/RealtimeRelayTunnel.js +532 -0
  79. package/dist/realtimeProxy/RealtimeRelayTunnel.js.map +1 -0
  80. package/dist/realtimeSessions/RealtimeSessionEventService.d.ts +148 -0
  81. package/dist/realtimeSessions/RealtimeSessionEventService.d.ts.map +1 -0
  82. package/dist/realtimeSessions/RealtimeSessionEventService.js +191 -0
  83. package/dist/realtimeSessions/RealtimeSessionEventService.js.map +1 -0
  84. package/dist/realtimeSessions/RealtimeSessionVerificationService.d.ts +66 -0
  85. package/dist/realtimeSessions/RealtimeSessionVerificationService.d.ts.map +1 -0
  86. package/dist/realtimeSessions/RealtimeSessionVerificationService.js +138 -0
  87. package/dist/realtimeSessions/RealtimeSessionVerificationService.js.map +1 -0
  88. package/dist/realtimeSessions/RealtimeVerifyRouter.d.ts +38 -0
  89. package/dist/realtimeSessions/RealtimeVerifyRouter.d.ts.map +1 -0
  90. package/dist/realtimeSessions/RealtimeVerifyRouter.js +98 -0
  91. package/dist/realtimeSessions/RealtimeVerifyRouter.js.map +1 -0
  92. package/dist/realtimeSessions/SessionVerificationPortsBase.d.ts +61 -0
  93. package/dist/realtimeSessions/SessionVerificationPortsBase.d.ts.map +1 -0
  94. package/dist/realtimeSessions/SessionVerificationPortsBase.js +149 -0
  95. package/dist/realtimeSessions/SessionVerificationPortsBase.js.map +1 -0
  96. package/dist/realtimeSessions/SlidingWindowRateLimiter.d.ts +57 -0
  97. package/dist/realtimeSessions/SlidingWindowRateLimiter.d.ts.map +1 -0
  98. package/dist/realtimeSessions/SlidingWindowRateLimiter.js +69 -0
  99. package/dist/realtimeSessions/SlidingWindowRateLimiter.js.map +1 -0
  100. package/dist/realtimeSessions/index.d.ts +17 -0
  101. package/dist/realtimeSessions/index.d.ts.map +1 -0
  102. package/dist/realtimeSessions/index.js +17 -0
  103. package/dist/realtimeSessions/index.js.map +1 -0
  104. package/dist/realtimeSessions/sessionAccess.d.ts +86 -0
  105. package/dist/realtimeSessions/sessionAccess.d.ts.map +1 -0
  106. package/dist/realtimeSessions/sessionAccess.js +90 -0
  107. package/dist/realtimeSessions/sessionAccess.js.map +1 -0
  108. package/dist/realtimeSessions/sessionConfigStamps.d.ts +70 -0
  109. package/dist/realtimeSessions/sessionConfigStamps.d.ts.map +1 -0
  110. package/dist/realtimeSessions/sessionConfigStamps.js +93 -0
  111. package/dist/realtimeSessions/sessionConfigStamps.js.map +1 -0
  112. package/dist/realtimeSessions/subscriptionAuthorization.d.ts +65 -0
  113. package/dist/realtimeSessions/subscriptionAuthorization.d.ts.map +1 -0
  114. package/dist/realtimeSessions/subscriptionAuthorization.js +71 -0
  115. package/dist/realtimeSessions/subscriptionAuthorization.js.map +1 -0
  116. package/dist/realtimeSessions/verificationCore.d.ts +243 -0
  117. package/dist/realtimeSessions/verificationCore.d.ts.map +1 -0
  118. package/dist/realtimeSessions/verificationCore.js +356 -0
  119. package/dist/realtimeSessions/verificationCore.js.map +1 -0
  120. package/dist/realtimeSessions/verificationPages.d.ts +66 -0
  121. package/dist/realtimeSessions/verificationPages.d.ts.map +1 -0
  122. package/dist/realtimeSessions/verificationPages.js +110 -0
  123. package/dist/realtimeSessions/verificationPages.js.map +1 -0
  124. package/dist/realtimeSessions/verificationPolicy.d.ts +147 -0
  125. package/dist/realtimeSessions/verificationPolicy.d.ts.map +1 -0
  126. package/dist/realtimeSessions/verificationPolicy.js +249 -0
  127. package/dist/realtimeSessions/verificationPolicy.js.map +1 -0
  128. package/dist/realtimeSessions/verificationWorkflow.d.ts +263 -0
  129. package/dist/realtimeSessions/verificationWorkflow.d.ts.map +1 -0
  130. package/dist/realtimeSessions/verificationWorkflow.js +435 -0
  131. package/dist/realtimeSessions/verificationWorkflow.js.map +1 -0
  132. package/dist/realtimeWidget/widgetGuestElevation.d.ts +20 -2
  133. package/dist/realtimeWidget/widgetGuestElevation.d.ts.map +1 -1
  134. package/dist/realtimeWidget/widgetGuestElevation.js +31 -2
  135. package/dist/realtimeWidget/widgetGuestElevation.js.map +1 -1
  136. package/dist/resolvers/ActionResolver.d.ts +31 -5
  137. package/dist/resolvers/ActionResolver.d.ts.map +1 -1
  138. package/dist/resolvers/ActionResolver.js +75 -14
  139. package/dist/resolvers/ActionResolver.js.map +1 -1
  140. package/dist/resolvers/AdhocQueryResolver.d.ts +14 -1
  141. package/dist/resolvers/AdhocQueryResolver.d.ts.map +1 -1
  142. package/dist/resolvers/AdhocQueryResolver.js +21 -5
  143. package/dist/resolvers/AdhocQueryResolver.js.map +1 -1
  144. package/dist/resolvers/CacheStatsResolver.d.ts +27 -0
  145. package/dist/resolvers/CacheStatsResolver.d.ts.map +1 -1
  146. package/dist/resolvers/CacheStatsResolver.js +113 -2
  147. package/dist/resolvers/CacheStatsResolver.js.map +1 -1
  148. package/dist/resolvers/ClientToolRequestResolver.d.ts +4 -2
  149. package/dist/resolvers/ClientToolRequestResolver.d.ts.map +1 -1
  150. package/dist/resolvers/ClientToolRequestResolver.js +28 -10
  151. package/dist/resolvers/ClientToolRequestResolver.js.map +1 -1
  152. package/dist/resolvers/FetchEntityVectorsResolver.d.ts +12 -1
  153. package/dist/resolvers/FetchEntityVectorsResolver.d.ts.map +1 -1
  154. package/dist/resolvers/FetchEntityVectorsResolver.js +83 -2
  155. package/dist/resolvers/FetchEntityVectorsResolver.js.map +1 -1
  156. package/dist/resolvers/HumanHandoffResolver.d.ts.map +1 -1
  157. package/dist/resolvers/HumanHandoffResolver.js +7 -1
  158. package/dist/resolvers/HumanHandoffResolver.js.map +1 -1
  159. package/dist/resolvers/MCPResolver.d.ts.map +1 -1
  160. package/dist/resolvers/MCPResolver.js +9 -4
  161. package/dist/resolvers/MCPResolver.js.map +1 -1
  162. package/dist/resolvers/RealtimeBridgeResolver.d.ts +54 -2
  163. package/dist/resolvers/RealtimeBridgeResolver.d.ts.map +1 -1
  164. package/dist/resolvers/RealtimeBridgeResolver.js +155 -10
  165. package/dist/resolvers/RealtimeBridgeResolver.js.map +1 -1
  166. package/dist/resolvers/RealtimeClientSessionResolver.d.ts +155 -25
  167. package/dist/resolvers/RealtimeClientSessionResolver.d.ts.map +1 -1
  168. package/dist/resolvers/RealtimeClientSessionResolver.js +394 -90
  169. package/dist/resolvers/RealtimeClientSessionResolver.js.map +1 -1
  170. package/dist/resolvers/RealtimeSessionEventsResolver.d.ts +61 -0
  171. package/dist/resolvers/RealtimeSessionEventsResolver.d.ts.map +1 -0
  172. package/dist/resolvers/RealtimeSessionEventsResolver.js +130 -0
  173. package/dist/resolvers/RealtimeSessionEventsResolver.js.map +1 -0
  174. package/dist/resolvers/RealtimeSessionVerificationResolver.d.ts +85 -0
  175. package/dist/resolvers/RealtimeSessionVerificationResolver.d.ts.map +1 -0
  176. package/dist/resolvers/RealtimeSessionVerificationResolver.js +188 -0
  177. package/dist/resolvers/RealtimeSessionVerificationResolver.js.map +1 -0
  178. package/dist/resolvers/RemoteBrowserActionResolver.d.ts +2 -0
  179. package/dist/resolvers/RemoteBrowserActionResolver.d.ts.map +1 -1
  180. package/dist/resolvers/RemoteBrowserActionResolver.js +5 -1
  181. package/dist/resolvers/RemoteBrowserActionResolver.js.map +1 -1
  182. package/dist/resolvers/RunAIAgentResolver.d.ts +10 -0
  183. package/dist/resolvers/RunAIAgentResolver.d.ts.map +1 -1
  184. package/dist/resolvers/RunAIAgentResolver.js +68 -11
  185. package/dist/resolvers/RunAIAgentResolver.js.map +1 -1
  186. package/dist/resolvers/RunTemplateResolver.d.ts.map +1 -1
  187. package/dist/resolvers/RunTemplateResolver.js +12 -11
  188. package/dist/resolvers/RunTemplateResolver.js.map +1 -1
  189. package/dist/resolvers/SyncDataResolver.d.ts.map +1 -1
  190. package/dist/resolvers/SyncDataResolver.js +6 -2
  191. package/dist/resolvers/SyncDataResolver.js.map +1 -1
  192. package/dist/resolvers/SyncRolesUsersResolver.d.ts +2 -0
  193. package/dist/resolvers/SyncRolesUsersResolver.d.ts.map +1 -1
  194. package/dist/resolvers/SyncRolesUsersResolver.js +23 -6
  195. package/dist/resolvers/SyncRolesUsersResolver.js.map +1 -1
  196. package/dist/resolvers/UserAvatarResolver.d.ts +16 -0
  197. package/dist/resolvers/UserAvatarResolver.d.ts.map +1 -0
  198. package/dist/resolvers/UserAvatarResolver.js +124 -0
  199. package/dist/resolvers/UserAvatarResolver.js.map +1 -0
  200. package/dist/resolvers/UserResolver.d.ts.map +1 -1
  201. package/dist/resolvers/UserResolver.js +2 -17
  202. package/dist/resolvers/UserResolver.js.map +1 -1
  203. package/dist/resolvers/agentVisionConsentAudit.d.ts +37 -0
  204. package/dist/resolvers/agentVisionConsentAudit.d.ts.map +1 -0
  205. package/dist/resolvers/agentVisionConsentAudit.js +63 -0
  206. package/dist/resolvers/agentVisionConsentAudit.js.map +1 -0
  207. package/dist/resolvers/avatarInputValidation.d.ts +40 -0
  208. package/dist/resolvers/avatarInputValidation.d.ts.map +1 -0
  209. package/dist/resolvers/avatarInputValidation.js +97 -0
  210. package/dist/resolvers/avatarInputValidation.js.map +1 -0
  211. package/dist/resolvers/currentUserRoles.d.ts +29 -0
  212. package/dist/resolvers/currentUserRoles.d.ts.map +1 -1
  213. package/dist/resolvers/currentUserRoles.js +30 -0
  214. package/dist/resolvers/currentUserRoles.js.map +1 -1
  215. package/dist/resolvers/meetings/meetingMutations.d.ts +6 -0
  216. package/dist/resolvers/meetings/meetingMutations.d.ts.map +1 -1
  217. package/dist/resolvers/meetings/meetingMutations.js +21 -0
  218. package/dist/resolvers/meetings/meetingMutations.js.map +1 -1
  219. package/dist/services/TaskGraphContinuationDeliverer.d.ts +4 -3
  220. package/dist/services/TaskGraphContinuationDeliverer.d.ts.map +1 -1
  221. package/dist/services/TaskGraphContinuationDeliverer.js +13 -7
  222. package/dist/services/TaskGraphContinuationDeliverer.js.map +1 -1
  223. package/dist/sharedCache.d.ts +105 -0
  224. package/dist/sharedCache.d.ts.map +1 -0
  225. package/dist/sharedCache.js +276 -0
  226. package/dist/sharedCache.js.map +1 -0
  227. package/dist/types.d.ts +6 -0
  228. package/dist/types.d.ts.map +1 -1
  229. package/dist/types.js.map +1 -1
  230. package/package.json +97 -95
  231. package/src/__tests__/ActionResolver.authorization.test.ts +353 -0
  232. package/src/__tests__/AdhocQueryResolver.sqlAuthorizer.test.ts +104 -0
  233. package/src/__tests__/BridgeHostInstance.test.ts +232 -0
  234. package/src/__tests__/ClientToolRequestResolver.test.ts +116 -0
  235. package/src/__tests__/FetchEntityVectorsResolver.test.ts +285 -0
  236. package/src/__tests__/HostInstance.test.ts +84 -0
  237. package/src/__tests__/HumanHandoffResolver.test.ts +17 -0
  238. package/src/__tests__/MeetingResolver.test.ts +75 -1
  239. package/src/__tests__/RealtimeBridgeResolver.test.ts +415 -6
  240. package/src/__tests__/RealtimeClientSessionResolver.configTamper.test.ts +383 -0
  241. package/src/__tests__/RealtimeClientSessionResolver.test.ts +682 -58
  242. package/src/__tests__/RealtimeProxyServer.test.ts +16 -1
  243. package/src/__tests__/RealtimeRelay.test.ts +876 -0
  244. package/src/__tests__/RemoteBrowserActionResolver.goalRunLink.test.ts +129 -0
  245. package/src/__tests__/ResolverBase.aggregateScreen.test.ts +174 -0
  246. package/src/__tests__/ResolverBase.clientOldValues.test.ts +6 -3
  247. package/src/__tests__/ReturningVisitorRecap.test.ts +115 -0
  248. package/src/__tests__/RunAIAgentResolver.branch.test.ts +169 -0
  249. package/src/__tests__/RunAIAgentResolver.historyFrom.test.ts +4 -4
  250. package/src/__tests__/RunAIAgentResolver.stoppedPredecessor.test.ts +166 -0
  251. package/src/__tests__/RunTemplateResolver.test.ts +132 -0
  252. package/src/__tests__/RunViewResolver.cacheCheckForwarding.test.ts +63 -0
  253. package/src/__tests__/SessionJanitor.test.ts +845 -18
  254. package/src/__tests__/SessionManager.test.ts +213 -17
  255. package/src/__tests__/SessionRunIDVerifier.test.ts +251 -0
  256. package/src/__tests__/SyncRolesUsersResolver.userRoles.test.ts +97 -0
  257. package/src/__tests__/TaskGraphContinuationDeliverer.test.ts +50 -3
  258. package/src/__tests__/UserAvatarResolver.test.ts +255 -0
  259. package/src/__tests__/UserResolver.currentUser.test.ts +16 -1
  260. package/src/__tests__/actionAuthorization.test.ts +130 -0
  261. package/src/__tests__/agentVisionConsentAudit.test.ts +118 -0
  262. package/src/__tests__/avatarInputValidation.test.ts +160 -0
  263. package/src/__tests__/isolatedProviderTransactions.test.ts +169 -0
  264. package/src/__tests__/magicLinkService.consume.test.ts +6 -0
  265. package/src/__tests__/magicLinkService.provisionLog.test.ts +5 -0
  266. package/src/__tests__/newUsers.template.test.ts +151 -0
  267. package/src/__tests__/newUsers.test.ts +74 -5
  268. package/src/__tests__/orphanedConversationDetailReconciler.test.ts +17 -2
  269. package/src/__tests__/realtimeSessions/RealtimeSessionEventService.test.ts +201 -0
  270. package/src/__tests__/realtimeSessions/RealtimeSessionEventsResolver.test.ts +215 -0
  271. package/src/__tests__/realtimeSessions/RealtimeSessionVerificationResolver.test.ts +102 -0
  272. package/src/__tests__/realtimeSessions/RealtimeSessionVerificationService.test.ts +349 -0
  273. package/src/__tests__/realtimeSessions/RealtimeVerifyRouter.test.ts +131 -0
  274. package/src/__tests__/realtimeSessions/SlidingWindowRateLimiter.test.ts +56 -0
  275. package/src/__tests__/realtimeSessions/helpers.ts +4 -0
  276. package/src/__tests__/realtimeSessions/sessionAccess.test.ts +129 -0
  277. package/src/__tests__/realtimeSessions/sessionConfigStamps.test.ts +124 -0
  278. package/src/__tests__/realtimeSessions/verificationCore.test.ts +355 -0
  279. package/src/__tests__/realtimeSessions/verificationPages.test.ts +84 -0
  280. package/src/__tests__/realtimeSessions/verificationPolicy.test.ts +226 -0
  281. package/src/__tests__/realtimeSessions/verificationWorkflow.test.ts +633 -0
  282. package/src/__tests__/resolverBase.fls.test.ts +87 -4
  283. package/src/__tests__/serverExtensionReservedRoots.test.ts +2 -0
  284. package/src/__tests__/sharedCache.test.ts +310 -0
  285. package/src/__tests__/widgetGuestElevation.test.ts +44 -0
  286. package/src/agentSessions/BridgeHostInstance.ts +32 -0
  287. package/src/agentSessions/HostInstance.ts +124 -28
  288. package/src/agentSessions/ReturningVisitorRecap.ts +7 -3
  289. package/src/agentSessions/SessionJanitor.ts +543 -57
  290. package/src/agentSessions/SessionManager.ts +125 -25
  291. package/src/agentSessions/SessionRunIDVerifier.ts +171 -0
  292. package/src/agentSessions/index.ts +10 -3
  293. package/src/auth/actionAuthorization.ts +116 -0
  294. package/src/auth/index.ts +3 -8
  295. package/src/auth/magicLink/MagicLinkService.ts +6 -3
  296. package/src/auth/newUsers.ts +99 -11
  297. package/src/config.ts +125 -0
  298. package/src/context.ts +15 -10
  299. package/src/generated/graphql-schemas/__mj.ts +496 -1
  300. package/src/generic/OrphanedConversationDetailReconciler.ts +3 -3
  301. package/src/generic/ResolverBase.ts +39 -9
  302. package/src/generic/RunViewResolver.ts +4 -0
  303. package/src/index.ts +132 -143
  304. package/src/isolatedProvider.ts +22 -0
  305. package/src/realtimeProxy/RealtimeProxyServer.ts +148 -16
  306. package/src/realtimeProxy/RealtimeRelayTunnel.ts +645 -0
  307. package/src/realtimeSessions/README.md +179 -0
  308. package/src/realtimeSessions/RealtimeSessionEventService.ts +274 -0
  309. package/src/realtimeSessions/RealtimeSessionVerificationService.ts +167 -0
  310. package/src/realtimeSessions/RealtimeVerifyRouter.ts +108 -0
  311. package/src/realtimeSessions/SessionVerificationPortsBase.ts +189 -0
  312. package/src/realtimeSessions/SlidingWindowRateLimiter.ts +92 -0
  313. package/src/realtimeSessions/index.ts +16 -0
  314. package/src/realtimeSessions/sessionAccess.ts +141 -0
  315. package/src/realtimeSessions/sessionConfigStamps.ts +123 -0
  316. package/src/realtimeSessions/subscriptionAuthorization.ts +116 -0
  317. package/src/realtimeSessions/verificationCore.ts +502 -0
  318. package/src/realtimeSessions/verificationPages.ts +149 -0
  319. package/src/realtimeSessions/verificationPolicy.ts +321 -0
  320. package/src/realtimeSessions/verificationWorkflow.ts +702 -0
  321. package/src/realtimeWidget/widgetGuestElevation.ts +34 -2
  322. package/src/resolvers/ActionResolver.ts +84 -21
  323. package/src/resolvers/AdhocQueryResolver.ts +24 -6
  324. package/src/resolvers/CacheStatsResolver.ts +89 -2
  325. package/src/resolvers/ClientToolRequestResolver.ts +25 -7
  326. package/src/resolvers/FetchEntityVectorsResolver.ts +97 -2
  327. package/src/resolvers/HumanHandoffResolver.ts +8 -0
  328. package/src/resolvers/MCPResolver.ts +8 -5
  329. package/src/resolvers/RealtimeBridgeResolver.ts +163 -11
  330. package/src/resolvers/RealtimeClientSessionResolver.ts +501 -96
  331. package/src/resolvers/RealtimeSessionEventsResolver.ts +133 -0
  332. package/src/resolvers/RealtimeSessionVerificationResolver.ts +174 -0
  333. package/src/resolvers/RemoteBrowserActionResolver.ts +11 -1
  334. package/src/resolvers/RunAIAgentResolver.ts +78 -11
  335. package/src/resolvers/RunTemplateResolver.ts +13 -12
  336. package/src/resolvers/SyncDataResolver.ts +6 -2
  337. package/src/resolvers/SyncRolesUsersResolver.ts +24 -6
  338. package/src/resolvers/UserAvatarResolver.ts +111 -0
  339. package/src/resolvers/UserResolver.ts +2 -16
  340. package/src/resolvers/agentVisionConsentAudit.ts +82 -0
  341. package/src/resolvers/avatarInputValidation.ts +123 -0
  342. package/src/resolvers/currentUserRoles.ts +32 -1
  343. package/src/resolvers/meetings/meetingMutations.ts +21 -0
  344. package/src/services/TaskGraphContinuationDeliverer.ts +13 -7
  345. package/src/sharedCache.ts +302 -0
  346. package/src/types.ts +7 -0
package/dist/config.d.ts CHANGED
@@ -29,6 +29,23 @@ declare const userHandlingInfoSchema: z.ZodObject<{
29
29
  contextUserForNewUserCreation: z.ZodDefault<z.ZodOptional<z.ZodString>>;
30
30
  CreateUserApplicationRecords: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
31
31
  UserApplications: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodString, "many">>>;
32
+ /**
33
+ * Build each auto-created user as a copy of a template user (`User.IsTemplate`), so new people start
34
+ * with its pinned apps, views, settings, dashboards and conversations. `email` names the template;
35
+ * `preset` is the `MJ: Users` clone preset to apply (default `template`). The copy takes the roles
36
+ * and apps of the template, so `newUserRoles`, `CreateUserApplicationRecords` and `UserApplications`
37
+ * apply only when the template can't be used, in which case a plain user is created as before.
38
+ */
39
+ newUserTemplate: z.ZodOptional<z.ZodObject<{
40
+ email: z.ZodString;
41
+ preset: z.ZodDefault<z.ZodOptional<z.ZodString>>;
42
+ }, "strip", z.ZodTypeAny, {
43
+ email?: string;
44
+ preset?: string;
45
+ }, {
46
+ email?: string;
47
+ preset?: string;
48
+ }>>;
32
49
  }, "strip", z.ZodTypeAny, {
33
50
  autoCreateNewUsers?: boolean;
34
51
  newUserLimitedToAuthorizedDomains?: boolean;
@@ -39,6 +56,10 @@ declare const userHandlingInfoSchema: z.ZodObject<{
39
56
  contextUserForNewUserCreation?: string;
40
57
  CreateUserApplicationRecords?: boolean;
41
58
  UserApplications?: string[];
59
+ newUserTemplate?: {
60
+ email?: string;
61
+ preset?: string;
62
+ };
42
63
  }, {
43
64
  autoCreateNewUsers?: boolean;
44
65
  newUserLimitedToAuthorizedDomains?: boolean;
@@ -49,6 +70,10 @@ declare const userHandlingInfoSchema: z.ZodObject<{
49
70
  contextUserForNewUserCreation?: string;
50
71
  CreateUserApplicationRecords?: boolean;
51
72
  UserApplications?: string[];
73
+ newUserTemplate?: {
74
+ email?: string;
75
+ preset?: string;
76
+ };
52
77
  }>;
53
78
  declare const databaseSettingsInfoSchema: z.ZodObject<{
54
79
  connectionTimeout: z.ZodNumber;
@@ -494,6 +519,38 @@ declare const cacheSettingsSchema: z.ZodObject<{
494
519
  * every signed-in user may read every row of every entity.
495
520
  */
496
521
  recordDataBroadcastEntities: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodString, "many">>>;
522
+ /**
523
+ * Expiry, in seconds, of entries in the shared Redis cache (used when REDIS_URL is set). The
524
+ * REDIS_TTL_SECONDS environment variable overrides it. 0 stores entries without expiry. When
525
+ * neither is set, the Redis provider's default applies (one hour).
526
+ */
527
+ sharedCacheTTLSeconds: z.ZodOptional<z.ZodNumber>;
528
+ /**
529
+ * How often, in seconds, loaded engines compare their rows with the database and reload what
530
+ * changed without an MJ event (direct SQL, other applications). With a shared cache one server
531
+ * does it per interval. 0 = disabled. Default: 300 (5 minutes).
532
+ */
533
+ engineSweepIntervalSeconds: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
534
+ /**
535
+ * How often, in seconds, the user cache compares two row counts and the newest update timestamp
536
+ * with the database and reloads only when they differ. The cache already refreshes on MJ writes
537
+ * (locally and, with a shared cache, on other servers); this covers changes made outside MJ.
538
+ * 0 = disabled. Default: 300 (5 minutes).
539
+ */
540
+ userCacheCheckIntervalSeconds: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
541
+ /**
542
+ * How often to compare this process's metadata with the database, in seconds (0 disables).
543
+ * Costs nothing unless an entity the metadata is built from declares
544
+ * `TrustServerCacheCompletely = false`; see `ProviderBase.SweepMetadataAgainstDatabase`.
545
+ */
546
+ metadataSweepIntervalSeconds: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
547
+ /**
548
+ * How long, in seconds, a server holds the shared warm-up turn while it loads its engines, so
549
+ * servers starting together load one at a time and the rest find the cache warm. The lease is
550
+ * renewed while the load runs; this value is both its expiry and how long another server waits
551
+ * for it. 0 disables the turn-taking. Default: 30.
552
+ */
553
+ startupWarmupLeaseSeconds: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
497
554
  }, "strip", z.ZodTypeAny, {
498
555
  maxMemoryMB?: number;
499
556
  maxPercentOfCachePerEntity?: number;
@@ -501,6 +558,11 @@ declare const cacheSettingsSchema: z.ZodObject<{
501
558
  evictionSweepIntervalSeconds?: number;
502
559
  verboseLogging?: boolean;
503
560
  recordDataBroadcastEntities?: string[];
561
+ sharedCacheTTLSeconds?: number;
562
+ engineSweepIntervalSeconds?: number;
563
+ userCacheCheckIntervalSeconds?: number;
564
+ metadataSweepIntervalSeconds?: number;
565
+ startupWarmupLeaseSeconds?: number;
504
566
  }, {
505
567
  maxMemoryMB?: number;
506
568
  maxPercentOfCachePerEntity?: number;
@@ -508,6 +570,11 @@ declare const cacheSettingsSchema: z.ZodObject<{
508
570
  evictionSweepIntervalSeconds?: number;
509
571
  verboseLogging?: boolean;
510
572
  recordDataBroadcastEntities?: string[];
573
+ sharedCacheTTLSeconds?: number;
574
+ engineSweepIntervalSeconds?: number;
575
+ userCacheCheckIntervalSeconds?: number;
576
+ metadataSweepIntervalSeconds?: number;
577
+ startupWarmupLeaseSeconds?: number;
511
578
  }>;
512
579
  declare const loggingSettingsSchema: z.ZodObject<{
513
580
  graphql: z.ZodDefault<z.ZodOptional<z.ZodObject<{
@@ -2856,15 +2923,1210 @@ declare const telephonySchema: z.ZodObject<{
2856
2923
  modelSampleRate: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
2857
2924
  }, z.ZodTypeAny, "passthrough">>>;
2858
2925
  }, z.ZodTypeAny, "passthrough">>;
2926
+ /**
2927
+ * Mid-session identity verification for realtime sessions (see `src/realtimeSessions/README.md`).
2928
+ *
2929
+ * A person talking to an agent proves they control an email address WITHOUT leaving the conversation:
2930
+ * the server emails a one-time link plus a short code, records the verification on the session, extends
2931
+ * the session's limits, and tells the live session through a session event. The session's principal is
2932
+ * never changed.
2933
+ *
2934
+ * Off by default: nothing is emailed and `/realtime/verify` is not mounted until `enabled` is true AND a
2935
+ * `communicationProvider` is configured. Policy set here is the BASE layer; the config cascade
2936
+ * (`channels.config.IdentityVerification`) snapshotted onto each session at mint overrides it per knob.
2937
+ */
2938
+ declare const identityVerificationSchema: z.ZodObject<{
2939
+ /** Master switch. When false the verify routes are not mounted and the GraphQL operations refuse. */
2940
+ enabled: z.ZodDefault<z.ZodEffects<z.ZodDefault<z.ZodOptional<z.ZodUnion<[z.ZodBoolean, z.ZodString, z.ZodNumber]>>>, boolean, string | number | boolean>>;
2941
+ /** CommunicationEngine provider that delivers the verification email (e.g. 'SendGrid', 'Microsoft Graph'). Required to send. */
2942
+ communicationProvider: z.ZodOptional<z.ZodString>;
2943
+ /** From address of the verification email. */
2944
+ fromAddress: z.ZodOptional<z.ZodString>;
2945
+ /**
2946
+ * Server-only secret the typed verification code is HMAC'd under before it is stored on the session
2947
+ * (at least 16 characters; 32+ random characters recommended). REQUIRED: without it verification is
2948
+ * unavailable, because a session's owner can read their own session row and a bare hash of a six-digit
2949
+ * code can be reversed offline. Never exposed to clients. Rotating it voids pending verifications only.
2950
+ */
2951
+ hmacSecret: z.ZodDefault<z.ZodOptional<z.ZodString>>;
2952
+ /**
2953
+ * `send` (default) delivers the email. `dry-run` builds and logs the message through the communication
2954
+ * provider WITHOUT delivering it — for rehearsal and integration environments, where a test reads the
2955
+ * emailed link and code from the `MJ: Communication Logs` row. Never use `dry-run` in production: the
2956
+ * Communication Log then holds live credentials and no one is emailed.
2957
+ */
2958
+ deliveryMode: z.ZodDefault<z.ZodOptional<z.ZodEnum<["send", "dry-run"]>>>;
2959
+ /**
2960
+ * Base URL the emailed link is built from (`<publicBaseUrl>/realtime/verify/<token>`). Defaults to the
2961
+ * server's `publicUrl`, or `baseUrl:graphqlPort` when that is unset — the same derivation magic links use.
2962
+ */
2963
+ publicBaseUrl: z.ZodOptional<z.ZodString>;
2964
+ /**
2965
+ * The internal user the server acts as to read/write the session, send the email and write the audit
2966
+ * row, matched against `User.Name` then `User.Email` (falls back to the system user, then the lowest-ID
2967
+ * active Owner). The verify link is public, so it has no caller identity of its own.
2968
+ */
2969
+ contextUserForVerification: z.ZodOptional<z.ZodString>;
2970
+ /** Base policy layer; each knob here is overridden by the per-session cascade layer. */
2971
+ policy: z.ZodDefault<z.ZodOptional<z.ZodObject<{
2972
+ requireBusinessDomain: z.ZodOptional<z.ZodBoolean>;
2973
+ blockedDomains: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
2974
+ consumerDomains: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
2975
+ linkTtlMinutes: z.ZodOptional<z.ZodNumber>;
2976
+ maxSendsPerSession: z.ZodOptional<z.ZodNumber>;
2977
+ maxCodeAttempts: z.ZodOptional<z.ZodNumber>;
2978
+ unverifiedMaxSeconds: z.ZodOptional<z.ZodNumber>;
2979
+ verifiedMaxSeconds: z.ZodOptional<z.ZodNumber>;
2980
+ }, "strip", z.ZodTypeAny, {
2981
+ requireBusinessDomain?: boolean;
2982
+ blockedDomains?: string[];
2983
+ consumerDomains?: string[];
2984
+ linkTtlMinutes?: number;
2985
+ maxSendsPerSession?: number;
2986
+ maxCodeAttempts?: number;
2987
+ unverifiedMaxSeconds?: number;
2988
+ verifiedMaxSeconds?: number;
2989
+ }, {
2990
+ requireBusinessDomain?: boolean;
2991
+ blockedDomains?: string[];
2992
+ consumerDomains?: string[];
2993
+ linkTtlMinutes?: number;
2994
+ maxSendsPerSession?: number;
2995
+ maxCodeAttempts?: number;
2996
+ unverifiedMaxSeconds?: number;
2997
+ verifiedMaxSeconds?: number;
2998
+ }>>>;
2999
+ /** Send-side and attempt-side limits (per instance, in memory; per-session limits are persisted and exact). */
3000
+ rateLimits: z.ZodDefault<z.ZodOptional<z.ZodObject<{
3001
+ /** Window (ms) for the three send limits. Default 1 hour. */
3002
+ sendWindowMs: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
3003
+ /** Verification emails per client IP per window. Default 10. 0 disables. */
3004
+ perIpSends: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
3005
+ /** Verification emails per recipient domain per window. Default 30. 0 disables. */
3006
+ perEmailDomainSends: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
3007
+ /** Verification emails per recipient address per window — stops the feature being used to mail-bomb one inbox. Default 3. 0 disables. */
3008
+ perEmailSends: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
3009
+ /** Window (ms) for code attempts. Default 10 minutes. */
3010
+ codeAttemptWindowMs: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
3011
+ /** Code submissions per session per window. Default 10. 0 disables. */
3012
+ perSessionCodeAttempts: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
3013
+ /** Window (ms) of the public `/realtime/verify` route limiter. Default 60s. */
3014
+ redeemWindowMs: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
3015
+ /** `/realtime/verify` requests per IP per window. Default 30. */
3016
+ redeemPerIp: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
3017
+ }, "strip", z.ZodTypeAny, {
3018
+ sendWindowMs?: number;
3019
+ perIpSends?: number;
3020
+ perEmailDomainSends?: number;
3021
+ perEmailSends?: number;
3022
+ codeAttemptWindowMs?: number;
3023
+ perSessionCodeAttempts?: number;
3024
+ redeemWindowMs?: number;
3025
+ redeemPerIp?: number;
3026
+ }, {
3027
+ sendWindowMs?: number;
3028
+ perIpSends?: number;
3029
+ perEmailDomainSends?: number;
3030
+ perEmailSends?: number;
3031
+ codeAttemptWindowMs?: number;
3032
+ perSessionCodeAttempts?: number;
3033
+ redeemWindowMs?: number;
3034
+ redeemPerIp?: number;
3035
+ }>>>;
3036
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
3037
+ /** Master switch. When false the verify routes are not mounted and the GraphQL operations refuse. */
3038
+ enabled: z.ZodDefault<z.ZodEffects<z.ZodDefault<z.ZodOptional<z.ZodUnion<[z.ZodBoolean, z.ZodString, z.ZodNumber]>>>, boolean, string | number | boolean>>;
3039
+ /** CommunicationEngine provider that delivers the verification email (e.g. 'SendGrid', 'Microsoft Graph'). Required to send. */
3040
+ communicationProvider: z.ZodOptional<z.ZodString>;
3041
+ /** From address of the verification email. */
3042
+ fromAddress: z.ZodOptional<z.ZodString>;
3043
+ /**
3044
+ * Server-only secret the typed verification code is HMAC'd under before it is stored on the session
3045
+ * (at least 16 characters; 32+ random characters recommended). REQUIRED: without it verification is
3046
+ * unavailable, because a session's owner can read their own session row and a bare hash of a six-digit
3047
+ * code can be reversed offline. Never exposed to clients. Rotating it voids pending verifications only.
3048
+ */
3049
+ hmacSecret: z.ZodDefault<z.ZodOptional<z.ZodString>>;
3050
+ /**
3051
+ * `send` (default) delivers the email. `dry-run` builds and logs the message through the communication
3052
+ * provider WITHOUT delivering it — for rehearsal and integration environments, where a test reads the
3053
+ * emailed link and code from the `MJ: Communication Logs` row. Never use `dry-run` in production: the
3054
+ * Communication Log then holds live credentials and no one is emailed.
3055
+ */
3056
+ deliveryMode: z.ZodDefault<z.ZodOptional<z.ZodEnum<["send", "dry-run"]>>>;
3057
+ /**
3058
+ * Base URL the emailed link is built from (`<publicBaseUrl>/realtime/verify/<token>`). Defaults to the
3059
+ * server's `publicUrl`, or `baseUrl:graphqlPort` when that is unset — the same derivation magic links use.
3060
+ */
3061
+ publicBaseUrl: z.ZodOptional<z.ZodString>;
3062
+ /**
3063
+ * The internal user the server acts as to read/write the session, send the email and write the audit
3064
+ * row, matched against `User.Name` then `User.Email` (falls back to the system user, then the lowest-ID
3065
+ * active Owner). The verify link is public, so it has no caller identity of its own.
3066
+ */
3067
+ contextUserForVerification: z.ZodOptional<z.ZodString>;
3068
+ /** Base policy layer; each knob here is overridden by the per-session cascade layer. */
3069
+ policy: z.ZodDefault<z.ZodOptional<z.ZodObject<{
3070
+ requireBusinessDomain: z.ZodOptional<z.ZodBoolean>;
3071
+ blockedDomains: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
3072
+ consumerDomains: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
3073
+ linkTtlMinutes: z.ZodOptional<z.ZodNumber>;
3074
+ maxSendsPerSession: z.ZodOptional<z.ZodNumber>;
3075
+ maxCodeAttempts: z.ZodOptional<z.ZodNumber>;
3076
+ unverifiedMaxSeconds: z.ZodOptional<z.ZodNumber>;
3077
+ verifiedMaxSeconds: z.ZodOptional<z.ZodNumber>;
3078
+ }, "strip", z.ZodTypeAny, {
3079
+ requireBusinessDomain?: boolean;
3080
+ blockedDomains?: string[];
3081
+ consumerDomains?: string[];
3082
+ linkTtlMinutes?: number;
3083
+ maxSendsPerSession?: number;
3084
+ maxCodeAttempts?: number;
3085
+ unverifiedMaxSeconds?: number;
3086
+ verifiedMaxSeconds?: number;
3087
+ }, {
3088
+ requireBusinessDomain?: boolean;
3089
+ blockedDomains?: string[];
3090
+ consumerDomains?: string[];
3091
+ linkTtlMinutes?: number;
3092
+ maxSendsPerSession?: number;
3093
+ maxCodeAttempts?: number;
3094
+ unverifiedMaxSeconds?: number;
3095
+ verifiedMaxSeconds?: number;
3096
+ }>>>;
3097
+ /** Send-side and attempt-side limits (per instance, in memory; per-session limits are persisted and exact). */
3098
+ rateLimits: z.ZodDefault<z.ZodOptional<z.ZodObject<{
3099
+ /** Window (ms) for the three send limits. Default 1 hour. */
3100
+ sendWindowMs: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
3101
+ /** Verification emails per client IP per window. Default 10. 0 disables. */
3102
+ perIpSends: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
3103
+ /** Verification emails per recipient domain per window. Default 30. 0 disables. */
3104
+ perEmailDomainSends: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
3105
+ /** Verification emails per recipient address per window — stops the feature being used to mail-bomb one inbox. Default 3. 0 disables. */
3106
+ perEmailSends: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
3107
+ /** Window (ms) for code attempts. Default 10 minutes. */
3108
+ codeAttemptWindowMs: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
3109
+ /** Code submissions per session per window. Default 10. 0 disables. */
3110
+ perSessionCodeAttempts: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
3111
+ /** Window (ms) of the public `/realtime/verify` route limiter. Default 60s. */
3112
+ redeemWindowMs: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
3113
+ /** `/realtime/verify` requests per IP per window. Default 30. */
3114
+ redeemPerIp: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
3115
+ }, "strip", z.ZodTypeAny, {
3116
+ sendWindowMs?: number;
3117
+ perIpSends?: number;
3118
+ perEmailDomainSends?: number;
3119
+ perEmailSends?: number;
3120
+ codeAttemptWindowMs?: number;
3121
+ perSessionCodeAttempts?: number;
3122
+ redeemWindowMs?: number;
3123
+ redeemPerIp?: number;
3124
+ }, {
3125
+ sendWindowMs?: number;
3126
+ perIpSends?: number;
3127
+ perEmailDomainSends?: number;
3128
+ perEmailSends?: number;
3129
+ codeAttemptWindowMs?: number;
3130
+ perSessionCodeAttempts?: number;
3131
+ redeemWindowMs?: number;
3132
+ redeemPerIp?: number;
3133
+ }>>>;
3134
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
3135
+ /** Master switch. When false the verify routes are not mounted and the GraphQL operations refuse. */
3136
+ enabled: z.ZodDefault<z.ZodEffects<z.ZodDefault<z.ZodOptional<z.ZodUnion<[z.ZodBoolean, z.ZodString, z.ZodNumber]>>>, boolean, string | number | boolean>>;
3137
+ /** CommunicationEngine provider that delivers the verification email (e.g. 'SendGrid', 'Microsoft Graph'). Required to send. */
3138
+ communicationProvider: z.ZodOptional<z.ZodString>;
3139
+ /** From address of the verification email. */
3140
+ fromAddress: z.ZodOptional<z.ZodString>;
3141
+ /**
3142
+ * Server-only secret the typed verification code is HMAC'd under before it is stored on the session
3143
+ * (at least 16 characters; 32+ random characters recommended). REQUIRED: without it verification is
3144
+ * unavailable, because a session's owner can read their own session row and a bare hash of a six-digit
3145
+ * code can be reversed offline. Never exposed to clients. Rotating it voids pending verifications only.
3146
+ */
3147
+ hmacSecret: z.ZodDefault<z.ZodOptional<z.ZodString>>;
3148
+ /**
3149
+ * `send` (default) delivers the email. `dry-run` builds and logs the message through the communication
3150
+ * provider WITHOUT delivering it — for rehearsal and integration environments, where a test reads the
3151
+ * emailed link and code from the `MJ: Communication Logs` row. Never use `dry-run` in production: the
3152
+ * Communication Log then holds live credentials and no one is emailed.
3153
+ */
3154
+ deliveryMode: z.ZodDefault<z.ZodOptional<z.ZodEnum<["send", "dry-run"]>>>;
3155
+ /**
3156
+ * Base URL the emailed link is built from (`<publicBaseUrl>/realtime/verify/<token>`). Defaults to the
3157
+ * server's `publicUrl`, or `baseUrl:graphqlPort` when that is unset — the same derivation magic links use.
3158
+ */
3159
+ publicBaseUrl: z.ZodOptional<z.ZodString>;
3160
+ /**
3161
+ * The internal user the server acts as to read/write the session, send the email and write the audit
3162
+ * row, matched against `User.Name` then `User.Email` (falls back to the system user, then the lowest-ID
3163
+ * active Owner). The verify link is public, so it has no caller identity of its own.
3164
+ */
3165
+ contextUserForVerification: z.ZodOptional<z.ZodString>;
3166
+ /** Base policy layer; each knob here is overridden by the per-session cascade layer. */
3167
+ policy: z.ZodDefault<z.ZodOptional<z.ZodObject<{
3168
+ requireBusinessDomain: z.ZodOptional<z.ZodBoolean>;
3169
+ blockedDomains: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
3170
+ consumerDomains: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
3171
+ linkTtlMinutes: z.ZodOptional<z.ZodNumber>;
3172
+ maxSendsPerSession: z.ZodOptional<z.ZodNumber>;
3173
+ maxCodeAttempts: z.ZodOptional<z.ZodNumber>;
3174
+ unverifiedMaxSeconds: z.ZodOptional<z.ZodNumber>;
3175
+ verifiedMaxSeconds: z.ZodOptional<z.ZodNumber>;
3176
+ }, "strip", z.ZodTypeAny, {
3177
+ requireBusinessDomain?: boolean;
3178
+ blockedDomains?: string[];
3179
+ consumerDomains?: string[];
3180
+ linkTtlMinutes?: number;
3181
+ maxSendsPerSession?: number;
3182
+ maxCodeAttempts?: number;
3183
+ unverifiedMaxSeconds?: number;
3184
+ verifiedMaxSeconds?: number;
3185
+ }, {
3186
+ requireBusinessDomain?: boolean;
3187
+ blockedDomains?: string[];
3188
+ consumerDomains?: string[];
3189
+ linkTtlMinutes?: number;
3190
+ maxSendsPerSession?: number;
3191
+ maxCodeAttempts?: number;
3192
+ unverifiedMaxSeconds?: number;
3193
+ verifiedMaxSeconds?: number;
3194
+ }>>>;
3195
+ /** Send-side and attempt-side limits (per instance, in memory; per-session limits are persisted and exact). */
3196
+ rateLimits: z.ZodDefault<z.ZodOptional<z.ZodObject<{
3197
+ /** Window (ms) for the three send limits. Default 1 hour. */
3198
+ sendWindowMs: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
3199
+ /** Verification emails per client IP per window. Default 10. 0 disables. */
3200
+ perIpSends: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
3201
+ /** Verification emails per recipient domain per window. Default 30. 0 disables. */
3202
+ perEmailDomainSends: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
3203
+ /** Verification emails per recipient address per window — stops the feature being used to mail-bomb one inbox. Default 3. 0 disables. */
3204
+ perEmailSends: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
3205
+ /** Window (ms) for code attempts. Default 10 minutes. */
3206
+ codeAttemptWindowMs: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
3207
+ /** Code submissions per session per window. Default 10. 0 disables. */
3208
+ perSessionCodeAttempts: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
3209
+ /** Window (ms) of the public `/realtime/verify` route limiter. Default 60s. */
3210
+ redeemWindowMs: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
3211
+ /** `/realtime/verify` requests per IP per window. Default 30. */
3212
+ redeemPerIp: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
3213
+ }, "strip", z.ZodTypeAny, {
3214
+ sendWindowMs?: number;
3215
+ perIpSends?: number;
3216
+ perEmailDomainSends?: number;
3217
+ perEmailSends?: number;
3218
+ codeAttemptWindowMs?: number;
3219
+ perSessionCodeAttempts?: number;
3220
+ redeemWindowMs?: number;
3221
+ redeemPerIp?: number;
3222
+ }, {
3223
+ sendWindowMs?: number;
3224
+ perIpSends?: number;
3225
+ perEmailDomainSends?: number;
3226
+ perEmailSends?: number;
3227
+ codeAttemptWindowMs?: number;
3228
+ perSessionCodeAttempts?: number;
3229
+ redeemWindowMs?: number;
3230
+ redeemPerIp?: number;
3231
+ }>>>;
3232
+ }, z.ZodTypeAny, "passthrough">>;
2859
3233
  declare const realtimeSchema: z.ZodObject<{
2860
3234
  /** Master switch. When false, the WebRTC SDP broker router is not mounted. Defaults to true. */
2861
3235
  enabled: z.ZodDefault<z.ZodEffects<z.ZodDefault<z.ZodOptional<z.ZodUnion<[z.ZodBoolean, z.ZodString, z.ZodNumber]>>>, boolean, string | number | boolean>>;
3236
+ /** Mid-session identity verification (off by default). */
3237
+ identityVerification: z.ZodDefault<z.ZodOptional<z.ZodObject<{
3238
+ /** Master switch. When false the verify routes are not mounted and the GraphQL operations refuse. */
3239
+ enabled: z.ZodDefault<z.ZodEffects<z.ZodDefault<z.ZodOptional<z.ZodUnion<[z.ZodBoolean, z.ZodString, z.ZodNumber]>>>, boolean, string | number | boolean>>;
3240
+ /** CommunicationEngine provider that delivers the verification email (e.g. 'SendGrid', 'Microsoft Graph'). Required to send. */
3241
+ communicationProvider: z.ZodOptional<z.ZodString>;
3242
+ /** From address of the verification email. */
3243
+ fromAddress: z.ZodOptional<z.ZodString>;
3244
+ /**
3245
+ * Server-only secret the typed verification code is HMAC'd under before it is stored on the session
3246
+ * (at least 16 characters; 32+ random characters recommended). REQUIRED: without it verification is
3247
+ * unavailable, because a session's owner can read their own session row and a bare hash of a six-digit
3248
+ * code can be reversed offline. Never exposed to clients. Rotating it voids pending verifications only.
3249
+ */
3250
+ hmacSecret: z.ZodDefault<z.ZodOptional<z.ZodString>>;
3251
+ /**
3252
+ * `send` (default) delivers the email. `dry-run` builds and logs the message through the communication
3253
+ * provider WITHOUT delivering it — for rehearsal and integration environments, where a test reads the
3254
+ * emailed link and code from the `MJ: Communication Logs` row. Never use `dry-run` in production: the
3255
+ * Communication Log then holds live credentials and no one is emailed.
3256
+ */
3257
+ deliveryMode: z.ZodDefault<z.ZodOptional<z.ZodEnum<["send", "dry-run"]>>>;
3258
+ /**
3259
+ * Base URL the emailed link is built from (`<publicBaseUrl>/realtime/verify/<token>`). Defaults to the
3260
+ * server's `publicUrl`, or `baseUrl:graphqlPort` when that is unset — the same derivation magic links use.
3261
+ */
3262
+ publicBaseUrl: z.ZodOptional<z.ZodString>;
3263
+ /**
3264
+ * The internal user the server acts as to read/write the session, send the email and write the audit
3265
+ * row, matched against `User.Name` then `User.Email` (falls back to the system user, then the lowest-ID
3266
+ * active Owner). The verify link is public, so it has no caller identity of its own.
3267
+ */
3268
+ contextUserForVerification: z.ZodOptional<z.ZodString>;
3269
+ /** Base policy layer; each knob here is overridden by the per-session cascade layer. */
3270
+ policy: z.ZodDefault<z.ZodOptional<z.ZodObject<{
3271
+ requireBusinessDomain: z.ZodOptional<z.ZodBoolean>;
3272
+ blockedDomains: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
3273
+ consumerDomains: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
3274
+ linkTtlMinutes: z.ZodOptional<z.ZodNumber>;
3275
+ maxSendsPerSession: z.ZodOptional<z.ZodNumber>;
3276
+ maxCodeAttempts: z.ZodOptional<z.ZodNumber>;
3277
+ unverifiedMaxSeconds: z.ZodOptional<z.ZodNumber>;
3278
+ verifiedMaxSeconds: z.ZodOptional<z.ZodNumber>;
3279
+ }, "strip", z.ZodTypeAny, {
3280
+ requireBusinessDomain?: boolean;
3281
+ blockedDomains?: string[];
3282
+ consumerDomains?: string[];
3283
+ linkTtlMinutes?: number;
3284
+ maxSendsPerSession?: number;
3285
+ maxCodeAttempts?: number;
3286
+ unverifiedMaxSeconds?: number;
3287
+ verifiedMaxSeconds?: number;
3288
+ }, {
3289
+ requireBusinessDomain?: boolean;
3290
+ blockedDomains?: string[];
3291
+ consumerDomains?: string[];
3292
+ linkTtlMinutes?: number;
3293
+ maxSendsPerSession?: number;
3294
+ maxCodeAttempts?: number;
3295
+ unverifiedMaxSeconds?: number;
3296
+ verifiedMaxSeconds?: number;
3297
+ }>>>;
3298
+ /** Send-side and attempt-side limits (per instance, in memory; per-session limits are persisted and exact). */
3299
+ rateLimits: z.ZodDefault<z.ZodOptional<z.ZodObject<{
3300
+ /** Window (ms) for the three send limits. Default 1 hour. */
3301
+ sendWindowMs: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
3302
+ /** Verification emails per client IP per window. Default 10. 0 disables. */
3303
+ perIpSends: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
3304
+ /** Verification emails per recipient domain per window. Default 30. 0 disables. */
3305
+ perEmailDomainSends: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
3306
+ /** Verification emails per recipient address per window — stops the feature being used to mail-bomb one inbox. Default 3. 0 disables. */
3307
+ perEmailSends: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
3308
+ /** Window (ms) for code attempts. Default 10 minutes. */
3309
+ codeAttemptWindowMs: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
3310
+ /** Code submissions per session per window. Default 10. 0 disables. */
3311
+ perSessionCodeAttempts: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
3312
+ /** Window (ms) of the public `/realtime/verify` route limiter. Default 60s. */
3313
+ redeemWindowMs: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
3314
+ /** `/realtime/verify` requests per IP per window. Default 30. */
3315
+ redeemPerIp: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
3316
+ }, "strip", z.ZodTypeAny, {
3317
+ sendWindowMs?: number;
3318
+ perIpSends?: number;
3319
+ perEmailDomainSends?: number;
3320
+ perEmailSends?: number;
3321
+ codeAttemptWindowMs?: number;
3322
+ perSessionCodeAttempts?: number;
3323
+ redeemWindowMs?: number;
3324
+ redeemPerIp?: number;
3325
+ }, {
3326
+ sendWindowMs?: number;
3327
+ perIpSends?: number;
3328
+ perEmailDomainSends?: number;
3329
+ perEmailSends?: number;
3330
+ codeAttemptWindowMs?: number;
3331
+ perSessionCodeAttempts?: number;
3332
+ redeemWindowMs?: number;
3333
+ redeemPerIp?: number;
3334
+ }>>>;
3335
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
3336
+ /** Master switch. When false the verify routes are not mounted and the GraphQL operations refuse. */
3337
+ enabled: z.ZodDefault<z.ZodEffects<z.ZodDefault<z.ZodOptional<z.ZodUnion<[z.ZodBoolean, z.ZodString, z.ZodNumber]>>>, boolean, string | number | boolean>>;
3338
+ /** CommunicationEngine provider that delivers the verification email (e.g. 'SendGrid', 'Microsoft Graph'). Required to send. */
3339
+ communicationProvider: z.ZodOptional<z.ZodString>;
3340
+ /** From address of the verification email. */
3341
+ fromAddress: z.ZodOptional<z.ZodString>;
3342
+ /**
3343
+ * Server-only secret the typed verification code is HMAC'd under before it is stored on the session
3344
+ * (at least 16 characters; 32+ random characters recommended). REQUIRED: without it verification is
3345
+ * unavailable, because a session's owner can read their own session row and a bare hash of a six-digit
3346
+ * code can be reversed offline. Never exposed to clients. Rotating it voids pending verifications only.
3347
+ */
3348
+ hmacSecret: z.ZodDefault<z.ZodOptional<z.ZodString>>;
3349
+ /**
3350
+ * `send` (default) delivers the email. `dry-run` builds and logs the message through the communication
3351
+ * provider WITHOUT delivering it — for rehearsal and integration environments, where a test reads the
3352
+ * emailed link and code from the `MJ: Communication Logs` row. Never use `dry-run` in production: the
3353
+ * Communication Log then holds live credentials and no one is emailed.
3354
+ */
3355
+ deliveryMode: z.ZodDefault<z.ZodOptional<z.ZodEnum<["send", "dry-run"]>>>;
3356
+ /**
3357
+ * Base URL the emailed link is built from (`<publicBaseUrl>/realtime/verify/<token>`). Defaults to the
3358
+ * server's `publicUrl`, or `baseUrl:graphqlPort` when that is unset — the same derivation magic links use.
3359
+ */
3360
+ publicBaseUrl: z.ZodOptional<z.ZodString>;
3361
+ /**
3362
+ * The internal user the server acts as to read/write the session, send the email and write the audit
3363
+ * row, matched against `User.Name` then `User.Email` (falls back to the system user, then the lowest-ID
3364
+ * active Owner). The verify link is public, so it has no caller identity of its own.
3365
+ */
3366
+ contextUserForVerification: z.ZodOptional<z.ZodString>;
3367
+ /** Base policy layer; each knob here is overridden by the per-session cascade layer. */
3368
+ policy: z.ZodDefault<z.ZodOptional<z.ZodObject<{
3369
+ requireBusinessDomain: z.ZodOptional<z.ZodBoolean>;
3370
+ blockedDomains: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
3371
+ consumerDomains: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
3372
+ linkTtlMinutes: z.ZodOptional<z.ZodNumber>;
3373
+ maxSendsPerSession: z.ZodOptional<z.ZodNumber>;
3374
+ maxCodeAttempts: z.ZodOptional<z.ZodNumber>;
3375
+ unverifiedMaxSeconds: z.ZodOptional<z.ZodNumber>;
3376
+ verifiedMaxSeconds: z.ZodOptional<z.ZodNumber>;
3377
+ }, "strip", z.ZodTypeAny, {
3378
+ requireBusinessDomain?: boolean;
3379
+ blockedDomains?: string[];
3380
+ consumerDomains?: string[];
3381
+ linkTtlMinutes?: number;
3382
+ maxSendsPerSession?: number;
3383
+ maxCodeAttempts?: number;
3384
+ unverifiedMaxSeconds?: number;
3385
+ verifiedMaxSeconds?: number;
3386
+ }, {
3387
+ requireBusinessDomain?: boolean;
3388
+ blockedDomains?: string[];
3389
+ consumerDomains?: string[];
3390
+ linkTtlMinutes?: number;
3391
+ maxSendsPerSession?: number;
3392
+ maxCodeAttempts?: number;
3393
+ unverifiedMaxSeconds?: number;
3394
+ verifiedMaxSeconds?: number;
3395
+ }>>>;
3396
+ /** Send-side and attempt-side limits (per instance, in memory; per-session limits are persisted and exact). */
3397
+ rateLimits: z.ZodDefault<z.ZodOptional<z.ZodObject<{
3398
+ /** Window (ms) for the three send limits. Default 1 hour. */
3399
+ sendWindowMs: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
3400
+ /** Verification emails per client IP per window. Default 10. 0 disables. */
3401
+ perIpSends: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
3402
+ /** Verification emails per recipient domain per window. Default 30. 0 disables. */
3403
+ perEmailDomainSends: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
3404
+ /** Verification emails per recipient address per window — stops the feature being used to mail-bomb one inbox. Default 3. 0 disables. */
3405
+ perEmailSends: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
3406
+ /** Window (ms) for code attempts. Default 10 minutes. */
3407
+ codeAttemptWindowMs: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
3408
+ /** Code submissions per session per window. Default 10. 0 disables. */
3409
+ perSessionCodeAttempts: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
3410
+ /** Window (ms) of the public `/realtime/verify` route limiter. Default 60s. */
3411
+ redeemWindowMs: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
3412
+ /** `/realtime/verify` requests per IP per window. Default 30. */
3413
+ redeemPerIp: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
3414
+ }, "strip", z.ZodTypeAny, {
3415
+ sendWindowMs?: number;
3416
+ perIpSends?: number;
3417
+ perEmailDomainSends?: number;
3418
+ perEmailSends?: number;
3419
+ codeAttemptWindowMs?: number;
3420
+ perSessionCodeAttempts?: number;
3421
+ redeemWindowMs?: number;
3422
+ redeemPerIp?: number;
3423
+ }, {
3424
+ sendWindowMs?: number;
3425
+ perIpSends?: number;
3426
+ perEmailDomainSends?: number;
3427
+ perEmailSends?: number;
3428
+ codeAttemptWindowMs?: number;
3429
+ perSessionCodeAttempts?: number;
3430
+ redeemWindowMs?: number;
3431
+ redeemPerIp?: number;
3432
+ }>>>;
3433
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
3434
+ /** Master switch. When false the verify routes are not mounted and the GraphQL operations refuse. */
3435
+ enabled: z.ZodDefault<z.ZodEffects<z.ZodDefault<z.ZodOptional<z.ZodUnion<[z.ZodBoolean, z.ZodString, z.ZodNumber]>>>, boolean, string | number | boolean>>;
3436
+ /** CommunicationEngine provider that delivers the verification email (e.g. 'SendGrid', 'Microsoft Graph'). Required to send. */
3437
+ communicationProvider: z.ZodOptional<z.ZodString>;
3438
+ /** From address of the verification email. */
3439
+ fromAddress: z.ZodOptional<z.ZodString>;
3440
+ /**
3441
+ * Server-only secret the typed verification code is HMAC'd under before it is stored on the session
3442
+ * (at least 16 characters; 32+ random characters recommended). REQUIRED: without it verification is
3443
+ * unavailable, because a session's owner can read their own session row and a bare hash of a six-digit
3444
+ * code can be reversed offline. Never exposed to clients. Rotating it voids pending verifications only.
3445
+ */
3446
+ hmacSecret: z.ZodDefault<z.ZodOptional<z.ZodString>>;
3447
+ /**
3448
+ * `send` (default) delivers the email. `dry-run` builds and logs the message through the communication
3449
+ * provider WITHOUT delivering it — for rehearsal and integration environments, where a test reads the
3450
+ * emailed link and code from the `MJ: Communication Logs` row. Never use `dry-run` in production: the
3451
+ * Communication Log then holds live credentials and no one is emailed.
3452
+ */
3453
+ deliveryMode: z.ZodDefault<z.ZodOptional<z.ZodEnum<["send", "dry-run"]>>>;
3454
+ /**
3455
+ * Base URL the emailed link is built from (`<publicBaseUrl>/realtime/verify/<token>`). Defaults to the
3456
+ * server's `publicUrl`, or `baseUrl:graphqlPort` when that is unset — the same derivation magic links use.
3457
+ */
3458
+ publicBaseUrl: z.ZodOptional<z.ZodString>;
3459
+ /**
3460
+ * The internal user the server acts as to read/write the session, send the email and write the audit
3461
+ * row, matched against `User.Name` then `User.Email` (falls back to the system user, then the lowest-ID
3462
+ * active Owner). The verify link is public, so it has no caller identity of its own.
3463
+ */
3464
+ contextUserForVerification: z.ZodOptional<z.ZodString>;
3465
+ /** Base policy layer; each knob here is overridden by the per-session cascade layer. */
3466
+ policy: z.ZodDefault<z.ZodOptional<z.ZodObject<{
3467
+ requireBusinessDomain: z.ZodOptional<z.ZodBoolean>;
3468
+ blockedDomains: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
3469
+ consumerDomains: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
3470
+ linkTtlMinutes: z.ZodOptional<z.ZodNumber>;
3471
+ maxSendsPerSession: z.ZodOptional<z.ZodNumber>;
3472
+ maxCodeAttempts: z.ZodOptional<z.ZodNumber>;
3473
+ unverifiedMaxSeconds: z.ZodOptional<z.ZodNumber>;
3474
+ verifiedMaxSeconds: z.ZodOptional<z.ZodNumber>;
3475
+ }, "strip", z.ZodTypeAny, {
3476
+ requireBusinessDomain?: boolean;
3477
+ blockedDomains?: string[];
3478
+ consumerDomains?: string[];
3479
+ linkTtlMinutes?: number;
3480
+ maxSendsPerSession?: number;
3481
+ maxCodeAttempts?: number;
3482
+ unverifiedMaxSeconds?: number;
3483
+ verifiedMaxSeconds?: number;
3484
+ }, {
3485
+ requireBusinessDomain?: boolean;
3486
+ blockedDomains?: string[];
3487
+ consumerDomains?: string[];
3488
+ linkTtlMinutes?: number;
3489
+ maxSendsPerSession?: number;
3490
+ maxCodeAttempts?: number;
3491
+ unverifiedMaxSeconds?: number;
3492
+ verifiedMaxSeconds?: number;
3493
+ }>>>;
3494
+ /** Send-side and attempt-side limits (per instance, in memory; per-session limits are persisted and exact). */
3495
+ rateLimits: z.ZodDefault<z.ZodOptional<z.ZodObject<{
3496
+ /** Window (ms) for the three send limits. Default 1 hour. */
3497
+ sendWindowMs: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
3498
+ /** Verification emails per client IP per window. Default 10. 0 disables. */
3499
+ perIpSends: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
3500
+ /** Verification emails per recipient domain per window. Default 30. 0 disables. */
3501
+ perEmailDomainSends: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
3502
+ /** Verification emails per recipient address per window — stops the feature being used to mail-bomb one inbox. Default 3. 0 disables. */
3503
+ perEmailSends: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
3504
+ /** Window (ms) for code attempts. Default 10 minutes. */
3505
+ codeAttemptWindowMs: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
3506
+ /** Code submissions per session per window. Default 10. 0 disables. */
3507
+ perSessionCodeAttempts: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
3508
+ /** Window (ms) of the public `/realtime/verify` route limiter. Default 60s. */
3509
+ redeemWindowMs: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
3510
+ /** `/realtime/verify` requests per IP per window. Default 30. */
3511
+ redeemPerIp: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
3512
+ }, "strip", z.ZodTypeAny, {
3513
+ sendWindowMs?: number;
3514
+ perIpSends?: number;
3515
+ perEmailDomainSends?: number;
3516
+ perEmailSends?: number;
3517
+ codeAttemptWindowMs?: number;
3518
+ perSessionCodeAttempts?: number;
3519
+ redeemWindowMs?: number;
3520
+ redeemPerIp?: number;
3521
+ }, {
3522
+ sendWindowMs?: number;
3523
+ perIpSends?: number;
3524
+ perEmailDomainSends?: number;
3525
+ perEmailSends?: number;
3526
+ codeAttemptWindowMs?: number;
3527
+ perSessionCodeAttempts?: number;
3528
+ redeemWindowMs?: number;
3529
+ redeemPerIp?: number;
3530
+ }>>>;
3531
+ }, z.ZodTypeAny, "passthrough">>>>;
2862
3532
  }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
2863
3533
  /** Master switch. When false, the WebRTC SDP broker router is not mounted. Defaults to true. */
2864
3534
  enabled: z.ZodDefault<z.ZodEffects<z.ZodDefault<z.ZodOptional<z.ZodUnion<[z.ZodBoolean, z.ZodString, z.ZodNumber]>>>, boolean, string | number | boolean>>;
3535
+ /** Mid-session identity verification (off by default). */
3536
+ identityVerification: z.ZodDefault<z.ZodOptional<z.ZodObject<{
3537
+ /** Master switch. When false the verify routes are not mounted and the GraphQL operations refuse. */
3538
+ enabled: z.ZodDefault<z.ZodEffects<z.ZodDefault<z.ZodOptional<z.ZodUnion<[z.ZodBoolean, z.ZodString, z.ZodNumber]>>>, boolean, string | number | boolean>>;
3539
+ /** CommunicationEngine provider that delivers the verification email (e.g. 'SendGrid', 'Microsoft Graph'). Required to send. */
3540
+ communicationProvider: z.ZodOptional<z.ZodString>;
3541
+ /** From address of the verification email. */
3542
+ fromAddress: z.ZodOptional<z.ZodString>;
3543
+ /**
3544
+ * Server-only secret the typed verification code is HMAC'd under before it is stored on the session
3545
+ * (at least 16 characters; 32+ random characters recommended). REQUIRED: without it verification is
3546
+ * unavailable, because a session's owner can read their own session row and a bare hash of a six-digit
3547
+ * code can be reversed offline. Never exposed to clients. Rotating it voids pending verifications only.
3548
+ */
3549
+ hmacSecret: z.ZodDefault<z.ZodOptional<z.ZodString>>;
3550
+ /**
3551
+ * `send` (default) delivers the email. `dry-run` builds and logs the message through the communication
3552
+ * provider WITHOUT delivering it — for rehearsal and integration environments, where a test reads the
3553
+ * emailed link and code from the `MJ: Communication Logs` row. Never use `dry-run` in production: the
3554
+ * Communication Log then holds live credentials and no one is emailed.
3555
+ */
3556
+ deliveryMode: z.ZodDefault<z.ZodOptional<z.ZodEnum<["send", "dry-run"]>>>;
3557
+ /**
3558
+ * Base URL the emailed link is built from (`<publicBaseUrl>/realtime/verify/<token>`). Defaults to the
3559
+ * server's `publicUrl`, or `baseUrl:graphqlPort` when that is unset — the same derivation magic links use.
3560
+ */
3561
+ publicBaseUrl: z.ZodOptional<z.ZodString>;
3562
+ /**
3563
+ * The internal user the server acts as to read/write the session, send the email and write the audit
3564
+ * row, matched against `User.Name` then `User.Email` (falls back to the system user, then the lowest-ID
3565
+ * active Owner). The verify link is public, so it has no caller identity of its own.
3566
+ */
3567
+ contextUserForVerification: z.ZodOptional<z.ZodString>;
3568
+ /** Base policy layer; each knob here is overridden by the per-session cascade layer. */
3569
+ policy: z.ZodDefault<z.ZodOptional<z.ZodObject<{
3570
+ requireBusinessDomain: z.ZodOptional<z.ZodBoolean>;
3571
+ blockedDomains: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
3572
+ consumerDomains: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
3573
+ linkTtlMinutes: z.ZodOptional<z.ZodNumber>;
3574
+ maxSendsPerSession: z.ZodOptional<z.ZodNumber>;
3575
+ maxCodeAttempts: z.ZodOptional<z.ZodNumber>;
3576
+ unverifiedMaxSeconds: z.ZodOptional<z.ZodNumber>;
3577
+ verifiedMaxSeconds: z.ZodOptional<z.ZodNumber>;
3578
+ }, "strip", z.ZodTypeAny, {
3579
+ requireBusinessDomain?: boolean;
3580
+ blockedDomains?: string[];
3581
+ consumerDomains?: string[];
3582
+ linkTtlMinutes?: number;
3583
+ maxSendsPerSession?: number;
3584
+ maxCodeAttempts?: number;
3585
+ unverifiedMaxSeconds?: number;
3586
+ verifiedMaxSeconds?: number;
3587
+ }, {
3588
+ requireBusinessDomain?: boolean;
3589
+ blockedDomains?: string[];
3590
+ consumerDomains?: string[];
3591
+ linkTtlMinutes?: number;
3592
+ maxSendsPerSession?: number;
3593
+ maxCodeAttempts?: number;
3594
+ unverifiedMaxSeconds?: number;
3595
+ verifiedMaxSeconds?: number;
3596
+ }>>>;
3597
+ /** Send-side and attempt-side limits (per instance, in memory; per-session limits are persisted and exact). */
3598
+ rateLimits: z.ZodDefault<z.ZodOptional<z.ZodObject<{
3599
+ /** Window (ms) for the three send limits. Default 1 hour. */
3600
+ sendWindowMs: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
3601
+ /** Verification emails per client IP per window. Default 10. 0 disables. */
3602
+ perIpSends: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
3603
+ /** Verification emails per recipient domain per window. Default 30. 0 disables. */
3604
+ perEmailDomainSends: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
3605
+ /** Verification emails per recipient address per window — stops the feature being used to mail-bomb one inbox. Default 3. 0 disables. */
3606
+ perEmailSends: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
3607
+ /** Window (ms) for code attempts. Default 10 minutes. */
3608
+ codeAttemptWindowMs: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
3609
+ /** Code submissions per session per window. Default 10. 0 disables. */
3610
+ perSessionCodeAttempts: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
3611
+ /** Window (ms) of the public `/realtime/verify` route limiter. Default 60s. */
3612
+ redeemWindowMs: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
3613
+ /** `/realtime/verify` requests per IP per window. Default 30. */
3614
+ redeemPerIp: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
3615
+ }, "strip", z.ZodTypeAny, {
3616
+ sendWindowMs?: number;
3617
+ perIpSends?: number;
3618
+ perEmailDomainSends?: number;
3619
+ perEmailSends?: number;
3620
+ codeAttemptWindowMs?: number;
3621
+ perSessionCodeAttempts?: number;
3622
+ redeemWindowMs?: number;
3623
+ redeemPerIp?: number;
3624
+ }, {
3625
+ sendWindowMs?: number;
3626
+ perIpSends?: number;
3627
+ perEmailDomainSends?: number;
3628
+ perEmailSends?: number;
3629
+ codeAttemptWindowMs?: number;
3630
+ perSessionCodeAttempts?: number;
3631
+ redeemWindowMs?: number;
3632
+ redeemPerIp?: number;
3633
+ }>>>;
3634
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
3635
+ /** Master switch. When false the verify routes are not mounted and the GraphQL operations refuse. */
3636
+ enabled: z.ZodDefault<z.ZodEffects<z.ZodDefault<z.ZodOptional<z.ZodUnion<[z.ZodBoolean, z.ZodString, z.ZodNumber]>>>, boolean, string | number | boolean>>;
3637
+ /** CommunicationEngine provider that delivers the verification email (e.g. 'SendGrid', 'Microsoft Graph'). Required to send. */
3638
+ communicationProvider: z.ZodOptional<z.ZodString>;
3639
+ /** From address of the verification email. */
3640
+ fromAddress: z.ZodOptional<z.ZodString>;
3641
+ /**
3642
+ * Server-only secret the typed verification code is HMAC'd under before it is stored on the session
3643
+ * (at least 16 characters; 32+ random characters recommended). REQUIRED: without it verification is
3644
+ * unavailable, because a session's owner can read their own session row and a bare hash of a six-digit
3645
+ * code can be reversed offline. Never exposed to clients. Rotating it voids pending verifications only.
3646
+ */
3647
+ hmacSecret: z.ZodDefault<z.ZodOptional<z.ZodString>>;
3648
+ /**
3649
+ * `send` (default) delivers the email. `dry-run` builds and logs the message through the communication
3650
+ * provider WITHOUT delivering it — for rehearsal and integration environments, where a test reads the
3651
+ * emailed link and code from the `MJ: Communication Logs` row. Never use `dry-run` in production: the
3652
+ * Communication Log then holds live credentials and no one is emailed.
3653
+ */
3654
+ deliveryMode: z.ZodDefault<z.ZodOptional<z.ZodEnum<["send", "dry-run"]>>>;
3655
+ /**
3656
+ * Base URL the emailed link is built from (`<publicBaseUrl>/realtime/verify/<token>`). Defaults to the
3657
+ * server's `publicUrl`, or `baseUrl:graphqlPort` when that is unset — the same derivation magic links use.
3658
+ */
3659
+ publicBaseUrl: z.ZodOptional<z.ZodString>;
3660
+ /**
3661
+ * The internal user the server acts as to read/write the session, send the email and write the audit
3662
+ * row, matched against `User.Name` then `User.Email` (falls back to the system user, then the lowest-ID
3663
+ * active Owner). The verify link is public, so it has no caller identity of its own.
3664
+ */
3665
+ contextUserForVerification: z.ZodOptional<z.ZodString>;
3666
+ /** Base policy layer; each knob here is overridden by the per-session cascade layer. */
3667
+ policy: z.ZodDefault<z.ZodOptional<z.ZodObject<{
3668
+ requireBusinessDomain: z.ZodOptional<z.ZodBoolean>;
3669
+ blockedDomains: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
3670
+ consumerDomains: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
3671
+ linkTtlMinutes: z.ZodOptional<z.ZodNumber>;
3672
+ maxSendsPerSession: z.ZodOptional<z.ZodNumber>;
3673
+ maxCodeAttempts: z.ZodOptional<z.ZodNumber>;
3674
+ unverifiedMaxSeconds: z.ZodOptional<z.ZodNumber>;
3675
+ verifiedMaxSeconds: z.ZodOptional<z.ZodNumber>;
3676
+ }, "strip", z.ZodTypeAny, {
3677
+ requireBusinessDomain?: boolean;
3678
+ blockedDomains?: string[];
3679
+ consumerDomains?: string[];
3680
+ linkTtlMinutes?: number;
3681
+ maxSendsPerSession?: number;
3682
+ maxCodeAttempts?: number;
3683
+ unverifiedMaxSeconds?: number;
3684
+ verifiedMaxSeconds?: number;
3685
+ }, {
3686
+ requireBusinessDomain?: boolean;
3687
+ blockedDomains?: string[];
3688
+ consumerDomains?: string[];
3689
+ linkTtlMinutes?: number;
3690
+ maxSendsPerSession?: number;
3691
+ maxCodeAttempts?: number;
3692
+ unverifiedMaxSeconds?: number;
3693
+ verifiedMaxSeconds?: number;
3694
+ }>>>;
3695
+ /** Send-side and attempt-side limits (per instance, in memory; per-session limits are persisted and exact). */
3696
+ rateLimits: z.ZodDefault<z.ZodOptional<z.ZodObject<{
3697
+ /** Window (ms) for the three send limits. Default 1 hour. */
3698
+ sendWindowMs: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
3699
+ /** Verification emails per client IP per window. Default 10. 0 disables. */
3700
+ perIpSends: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
3701
+ /** Verification emails per recipient domain per window. Default 30. 0 disables. */
3702
+ perEmailDomainSends: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
3703
+ /** Verification emails per recipient address per window — stops the feature being used to mail-bomb one inbox. Default 3. 0 disables. */
3704
+ perEmailSends: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
3705
+ /** Window (ms) for code attempts. Default 10 minutes. */
3706
+ codeAttemptWindowMs: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
3707
+ /** Code submissions per session per window. Default 10. 0 disables. */
3708
+ perSessionCodeAttempts: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
3709
+ /** Window (ms) of the public `/realtime/verify` route limiter. Default 60s. */
3710
+ redeemWindowMs: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
3711
+ /** `/realtime/verify` requests per IP per window. Default 30. */
3712
+ redeemPerIp: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
3713
+ }, "strip", z.ZodTypeAny, {
3714
+ sendWindowMs?: number;
3715
+ perIpSends?: number;
3716
+ perEmailDomainSends?: number;
3717
+ perEmailSends?: number;
3718
+ codeAttemptWindowMs?: number;
3719
+ perSessionCodeAttempts?: number;
3720
+ redeemWindowMs?: number;
3721
+ redeemPerIp?: number;
3722
+ }, {
3723
+ sendWindowMs?: number;
3724
+ perIpSends?: number;
3725
+ perEmailDomainSends?: number;
3726
+ perEmailSends?: number;
3727
+ codeAttemptWindowMs?: number;
3728
+ perSessionCodeAttempts?: number;
3729
+ redeemWindowMs?: number;
3730
+ redeemPerIp?: number;
3731
+ }>>>;
3732
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
3733
+ /** Master switch. When false the verify routes are not mounted and the GraphQL operations refuse. */
3734
+ enabled: z.ZodDefault<z.ZodEffects<z.ZodDefault<z.ZodOptional<z.ZodUnion<[z.ZodBoolean, z.ZodString, z.ZodNumber]>>>, boolean, string | number | boolean>>;
3735
+ /** CommunicationEngine provider that delivers the verification email (e.g. 'SendGrid', 'Microsoft Graph'). Required to send. */
3736
+ communicationProvider: z.ZodOptional<z.ZodString>;
3737
+ /** From address of the verification email. */
3738
+ fromAddress: z.ZodOptional<z.ZodString>;
3739
+ /**
3740
+ * Server-only secret the typed verification code is HMAC'd under before it is stored on the session
3741
+ * (at least 16 characters; 32+ random characters recommended). REQUIRED: without it verification is
3742
+ * unavailable, because a session's owner can read their own session row and a bare hash of a six-digit
3743
+ * code can be reversed offline. Never exposed to clients. Rotating it voids pending verifications only.
3744
+ */
3745
+ hmacSecret: z.ZodDefault<z.ZodOptional<z.ZodString>>;
3746
+ /**
3747
+ * `send` (default) delivers the email. `dry-run` builds and logs the message through the communication
3748
+ * provider WITHOUT delivering it — for rehearsal and integration environments, where a test reads the
3749
+ * emailed link and code from the `MJ: Communication Logs` row. Never use `dry-run` in production: the
3750
+ * Communication Log then holds live credentials and no one is emailed.
3751
+ */
3752
+ deliveryMode: z.ZodDefault<z.ZodOptional<z.ZodEnum<["send", "dry-run"]>>>;
3753
+ /**
3754
+ * Base URL the emailed link is built from (`<publicBaseUrl>/realtime/verify/<token>`). Defaults to the
3755
+ * server's `publicUrl`, or `baseUrl:graphqlPort` when that is unset — the same derivation magic links use.
3756
+ */
3757
+ publicBaseUrl: z.ZodOptional<z.ZodString>;
3758
+ /**
3759
+ * The internal user the server acts as to read/write the session, send the email and write the audit
3760
+ * row, matched against `User.Name` then `User.Email` (falls back to the system user, then the lowest-ID
3761
+ * active Owner). The verify link is public, so it has no caller identity of its own.
3762
+ */
3763
+ contextUserForVerification: z.ZodOptional<z.ZodString>;
3764
+ /** Base policy layer; each knob here is overridden by the per-session cascade layer. */
3765
+ policy: z.ZodDefault<z.ZodOptional<z.ZodObject<{
3766
+ requireBusinessDomain: z.ZodOptional<z.ZodBoolean>;
3767
+ blockedDomains: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
3768
+ consumerDomains: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
3769
+ linkTtlMinutes: z.ZodOptional<z.ZodNumber>;
3770
+ maxSendsPerSession: z.ZodOptional<z.ZodNumber>;
3771
+ maxCodeAttempts: z.ZodOptional<z.ZodNumber>;
3772
+ unverifiedMaxSeconds: z.ZodOptional<z.ZodNumber>;
3773
+ verifiedMaxSeconds: z.ZodOptional<z.ZodNumber>;
3774
+ }, "strip", z.ZodTypeAny, {
3775
+ requireBusinessDomain?: boolean;
3776
+ blockedDomains?: string[];
3777
+ consumerDomains?: string[];
3778
+ linkTtlMinutes?: number;
3779
+ maxSendsPerSession?: number;
3780
+ maxCodeAttempts?: number;
3781
+ unverifiedMaxSeconds?: number;
3782
+ verifiedMaxSeconds?: number;
3783
+ }, {
3784
+ requireBusinessDomain?: boolean;
3785
+ blockedDomains?: string[];
3786
+ consumerDomains?: string[];
3787
+ linkTtlMinutes?: number;
3788
+ maxSendsPerSession?: number;
3789
+ maxCodeAttempts?: number;
3790
+ unverifiedMaxSeconds?: number;
3791
+ verifiedMaxSeconds?: number;
3792
+ }>>>;
3793
+ /** Send-side and attempt-side limits (per instance, in memory; per-session limits are persisted and exact). */
3794
+ rateLimits: z.ZodDefault<z.ZodOptional<z.ZodObject<{
3795
+ /** Window (ms) for the three send limits. Default 1 hour. */
3796
+ sendWindowMs: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
3797
+ /** Verification emails per client IP per window. Default 10. 0 disables. */
3798
+ perIpSends: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
3799
+ /** Verification emails per recipient domain per window. Default 30. 0 disables. */
3800
+ perEmailDomainSends: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
3801
+ /** Verification emails per recipient address per window — stops the feature being used to mail-bomb one inbox. Default 3. 0 disables. */
3802
+ perEmailSends: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
3803
+ /** Window (ms) for code attempts. Default 10 minutes. */
3804
+ codeAttemptWindowMs: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
3805
+ /** Code submissions per session per window. Default 10. 0 disables. */
3806
+ perSessionCodeAttempts: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
3807
+ /** Window (ms) of the public `/realtime/verify` route limiter. Default 60s. */
3808
+ redeemWindowMs: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
3809
+ /** `/realtime/verify` requests per IP per window. Default 30. */
3810
+ redeemPerIp: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
3811
+ }, "strip", z.ZodTypeAny, {
3812
+ sendWindowMs?: number;
3813
+ perIpSends?: number;
3814
+ perEmailDomainSends?: number;
3815
+ perEmailSends?: number;
3816
+ codeAttemptWindowMs?: number;
3817
+ perSessionCodeAttempts?: number;
3818
+ redeemWindowMs?: number;
3819
+ redeemPerIp?: number;
3820
+ }, {
3821
+ sendWindowMs?: number;
3822
+ perIpSends?: number;
3823
+ perEmailDomainSends?: number;
3824
+ perEmailSends?: number;
3825
+ codeAttemptWindowMs?: number;
3826
+ perSessionCodeAttempts?: number;
3827
+ redeemWindowMs?: number;
3828
+ redeemPerIp?: number;
3829
+ }>>>;
3830
+ }, z.ZodTypeAny, "passthrough">>>>;
2865
3831
  }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
2866
3832
  /** Master switch. When false, the WebRTC SDP broker router is not mounted. Defaults to true. */
2867
3833
  enabled: z.ZodDefault<z.ZodEffects<z.ZodDefault<z.ZodOptional<z.ZodUnion<[z.ZodBoolean, z.ZodString, z.ZodNumber]>>>, boolean, string | number | boolean>>;
3834
+ /** Mid-session identity verification (off by default). */
3835
+ identityVerification: z.ZodDefault<z.ZodOptional<z.ZodObject<{
3836
+ /** Master switch. When false the verify routes are not mounted and the GraphQL operations refuse. */
3837
+ enabled: z.ZodDefault<z.ZodEffects<z.ZodDefault<z.ZodOptional<z.ZodUnion<[z.ZodBoolean, z.ZodString, z.ZodNumber]>>>, boolean, string | number | boolean>>;
3838
+ /** CommunicationEngine provider that delivers the verification email (e.g. 'SendGrid', 'Microsoft Graph'). Required to send. */
3839
+ communicationProvider: z.ZodOptional<z.ZodString>;
3840
+ /** From address of the verification email. */
3841
+ fromAddress: z.ZodOptional<z.ZodString>;
3842
+ /**
3843
+ * Server-only secret the typed verification code is HMAC'd under before it is stored on the session
3844
+ * (at least 16 characters; 32+ random characters recommended). REQUIRED: without it verification is
3845
+ * unavailable, because a session's owner can read their own session row and a bare hash of a six-digit
3846
+ * code can be reversed offline. Never exposed to clients. Rotating it voids pending verifications only.
3847
+ */
3848
+ hmacSecret: z.ZodDefault<z.ZodOptional<z.ZodString>>;
3849
+ /**
3850
+ * `send` (default) delivers the email. `dry-run` builds and logs the message through the communication
3851
+ * provider WITHOUT delivering it — for rehearsal and integration environments, where a test reads the
3852
+ * emailed link and code from the `MJ: Communication Logs` row. Never use `dry-run` in production: the
3853
+ * Communication Log then holds live credentials and no one is emailed.
3854
+ */
3855
+ deliveryMode: z.ZodDefault<z.ZodOptional<z.ZodEnum<["send", "dry-run"]>>>;
3856
+ /**
3857
+ * Base URL the emailed link is built from (`<publicBaseUrl>/realtime/verify/<token>`). Defaults to the
3858
+ * server's `publicUrl`, or `baseUrl:graphqlPort` when that is unset — the same derivation magic links use.
3859
+ */
3860
+ publicBaseUrl: z.ZodOptional<z.ZodString>;
3861
+ /**
3862
+ * The internal user the server acts as to read/write the session, send the email and write the audit
3863
+ * row, matched against `User.Name` then `User.Email` (falls back to the system user, then the lowest-ID
3864
+ * active Owner). The verify link is public, so it has no caller identity of its own.
3865
+ */
3866
+ contextUserForVerification: z.ZodOptional<z.ZodString>;
3867
+ /** Base policy layer; each knob here is overridden by the per-session cascade layer. */
3868
+ policy: z.ZodDefault<z.ZodOptional<z.ZodObject<{
3869
+ requireBusinessDomain: z.ZodOptional<z.ZodBoolean>;
3870
+ blockedDomains: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
3871
+ consumerDomains: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
3872
+ linkTtlMinutes: z.ZodOptional<z.ZodNumber>;
3873
+ maxSendsPerSession: z.ZodOptional<z.ZodNumber>;
3874
+ maxCodeAttempts: z.ZodOptional<z.ZodNumber>;
3875
+ unverifiedMaxSeconds: z.ZodOptional<z.ZodNumber>;
3876
+ verifiedMaxSeconds: z.ZodOptional<z.ZodNumber>;
3877
+ }, "strip", z.ZodTypeAny, {
3878
+ requireBusinessDomain?: boolean;
3879
+ blockedDomains?: string[];
3880
+ consumerDomains?: string[];
3881
+ linkTtlMinutes?: number;
3882
+ maxSendsPerSession?: number;
3883
+ maxCodeAttempts?: number;
3884
+ unverifiedMaxSeconds?: number;
3885
+ verifiedMaxSeconds?: number;
3886
+ }, {
3887
+ requireBusinessDomain?: boolean;
3888
+ blockedDomains?: string[];
3889
+ consumerDomains?: string[];
3890
+ linkTtlMinutes?: number;
3891
+ maxSendsPerSession?: number;
3892
+ maxCodeAttempts?: number;
3893
+ unverifiedMaxSeconds?: number;
3894
+ verifiedMaxSeconds?: number;
3895
+ }>>>;
3896
+ /** Send-side and attempt-side limits (per instance, in memory; per-session limits are persisted and exact). */
3897
+ rateLimits: z.ZodDefault<z.ZodOptional<z.ZodObject<{
3898
+ /** Window (ms) for the three send limits. Default 1 hour. */
3899
+ sendWindowMs: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
3900
+ /** Verification emails per client IP per window. Default 10. 0 disables. */
3901
+ perIpSends: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
3902
+ /** Verification emails per recipient domain per window. Default 30. 0 disables. */
3903
+ perEmailDomainSends: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
3904
+ /** Verification emails per recipient address per window — stops the feature being used to mail-bomb one inbox. Default 3. 0 disables. */
3905
+ perEmailSends: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
3906
+ /** Window (ms) for code attempts. Default 10 minutes. */
3907
+ codeAttemptWindowMs: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
3908
+ /** Code submissions per session per window. Default 10. 0 disables. */
3909
+ perSessionCodeAttempts: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
3910
+ /** Window (ms) of the public `/realtime/verify` route limiter. Default 60s. */
3911
+ redeemWindowMs: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
3912
+ /** `/realtime/verify` requests per IP per window. Default 30. */
3913
+ redeemPerIp: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
3914
+ }, "strip", z.ZodTypeAny, {
3915
+ sendWindowMs?: number;
3916
+ perIpSends?: number;
3917
+ perEmailDomainSends?: number;
3918
+ perEmailSends?: number;
3919
+ codeAttemptWindowMs?: number;
3920
+ perSessionCodeAttempts?: number;
3921
+ redeemWindowMs?: number;
3922
+ redeemPerIp?: number;
3923
+ }, {
3924
+ sendWindowMs?: number;
3925
+ perIpSends?: number;
3926
+ perEmailDomainSends?: number;
3927
+ perEmailSends?: number;
3928
+ codeAttemptWindowMs?: number;
3929
+ perSessionCodeAttempts?: number;
3930
+ redeemWindowMs?: number;
3931
+ redeemPerIp?: number;
3932
+ }>>>;
3933
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
3934
+ /** Master switch. When false the verify routes are not mounted and the GraphQL operations refuse. */
3935
+ enabled: z.ZodDefault<z.ZodEffects<z.ZodDefault<z.ZodOptional<z.ZodUnion<[z.ZodBoolean, z.ZodString, z.ZodNumber]>>>, boolean, string | number | boolean>>;
3936
+ /** CommunicationEngine provider that delivers the verification email (e.g. 'SendGrid', 'Microsoft Graph'). Required to send. */
3937
+ communicationProvider: z.ZodOptional<z.ZodString>;
3938
+ /** From address of the verification email. */
3939
+ fromAddress: z.ZodOptional<z.ZodString>;
3940
+ /**
3941
+ * Server-only secret the typed verification code is HMAC'd under before it is stored on the session
3942
+ * (at least 16 characters; 32+ random characters recommended). REQUIRED: without it verification is
3943
+ * unavailable, because a session's owner can read their own session row and a bare hash of a six-digit
3944
+ * code can be reversed offline. Never exposed to clients. Rotating it voids pending verifications only.
3945
+ */
3946
+ hmacSecret: z.ZodDefault<z.ZodOptional<z.ZodString>>;
3947
+ /**
3948
+ * `send` (default) delivers the email. `dry-run` builds and logs the message through the communication
3949
+ * provider WITHOUT delivering it — for rehearsal and integration environments, where a test reads the
3950
+ * emailed link and code from the `MJ: Communication Logs` row. Never use `dry-run` in production: the
3951
+ * Communication Log then holds live credentials and no one is emailed.
3952
+ */
3953
+ deliveryMode: z.ZodDefault<z.ZodOptional<z.ZodEnum<["send", "dry-run"]>>>;
3954
+ /**
3955
+ * Base URL the emailed link is built from (`<publicBaseUrl>/realtime/verify/<token>`). Defaults to the
3956
+ * server's `publicUrl`, or `baseUrl:graphqlPort` when that is unset — the same derivation magic links use.
3957
+ */
3958
+ publicBaseUrl: z.ZodOptional<z.ZodString>;
3959
+ /**
3960
+ * The internal user the server acts as to read/write the session, send the email and write the audit
3961
+ * row, matched against `User.Name` then `User.Email` (falls back to the system user, then the lowest-ID
3962
+ * active Owner). The verify link is public, so it has no caller identity of its own.
3963
+ */
3964
+ contextUserForVerification: z.ZodOptional<z.ZodString>;
3965
+ /** Base policy layer; each knob here is overridden by the per-session cascade layer. */
3966
+ policy: z.ZodDefault<z.ZodOptional<z.ZodObject<{
3967
+ requireBusinessDomain: z.ZodOptional<z.ZodBoolean>;
3968
+ blockedDomains: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
3969
+ consumerDomains: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
3970
+ linkTtlMinutes: z.ZodOptional<z.ZodNumber>;
3971
+ maxSendsPerSession: z.ZodOptional<z.ZodNumber>;
3972
+ maxCodeAttempts: z.ZodOptional<z.ZodNumber>;
3973
+ unverifiedMaxSeconds: z.ZodOptional<z.ZodNumber>;
3974
+ verifiedMaxSeconds: z.ZodOptional<z.ZodNumber>;
3975
+ }, "strip", z.ZodTypeAny, {
3976
+ requireBusinessDomain?: boolean;
3977
+ blockedDomains?: string[];
3978
+ consumerDomains?: string[];
3979
+ linkTtlMinutes?: number;
3980
+ maxSendsPerSession?: number;
3981
+ maxCodeAttempts?: number;
3982
+ unverifiedMaxSeconds?: number;
3983
+ verifiedMaxSeconds?: number;
3984
+ }, {
3985
+ requireBusinessDomain?: boolean;
3986
+ blockedDomains?: string[];
3987
+ consumerDomains?: string[];
3988
+ linkTtlMinutes?: number;
3989
+ maxSendsPerSession?: number;
3990
+ maxCodeAttempts?: number;
3991
+ unverifiedMaxSeconds?: number;
3992
+ verifiedMaxSeconds?: number;
3993
+ }>>>;
3994
+ /** Send-side and attempt-side limits (per instance, in memory; per-session limits are persisted and exact). */
3995
+ rateLimits: z.ZodDefault<z.ZodOptional<z.ZodObject<{
3996
+ /** Window (ms) for the three send limits. Default 1 hour. */
3997
+ sendWindowMs: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
3998
+ /** Verification emails per client IP per window. Default 10. 0 disables. */
3999
+ perIpSends: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
4000
+ /** Verification emails per recipient domain per window. Default 30. 0 disables. */
4001
+ perEmailDomainSends: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
4002
+ /** Verification emails per recipient address per window — stops the feature being used to mail-bomb one inbox. Default 3. 0 disables. */
4003
+ perEmailSends: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
4004
+ /** Window (ms) for code attempts. Default 10 minutes. */
4005
+ codeAttemptWindowMs: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
4006
+ /** Code submissions per session per window. Default 10. 0 disables. */
4007
+ perSessionCodeAttempts: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
4008
+ /** Window (ms) of the public `/realtime/verify` route limiter. Default 60s. */
4009
+ redeemWindowMs: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
4010
+ /** `/realtime/verify` requests per IP per window. Default 30. */
4011
+ redeemPerIp: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
4012
+ }, "strip", z.ZodTypeAny, {
4013
+ sendWindowMs?: number;
4014
+ perIpSends?: number;
4015
+ perEmailDomainSends?: number;
4016
+ perEmailSends?: number;
4017
+ codeAttemptWindowMs?: number;
4018
+ perSessionCodeAttempts?: number;
4019
+ redeemWindowMs?: number;
4020
+ redeemPerIp?: number;
4021
+ }, {
4022
+ sendWindowMs?: number;
4023
+ perIpSends?: number;
4024
+ perEmailDomainSends?: number;
4025
+ perEmailSends?: number;
4026
+ codeAttemptWindowMs?: number;
4027
+ perSessionCodeAttempts?: number;
4028
+ redeemWindowMs?: number;
4029
+ redeemPerIp?: number;
4030
+ }>>>;
4031
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
4032
+ /** Master switch. When false the verify routes are not mounted and the GraphQL operations refuse. */
4033
+ enabled: z.ZodDefault<z.ZodEffects<z.ZodDefault<z.ZodOptional<z.ZodUnion<[z.ZodBoolean, z.ZodString, z.ZodNumber]>>>, boolean, string | number | boolean>>;
4034
+ /** CommunicationEngine provider that delivers the verification email (e.g. 'SendGrid', 'Microsoft Graph'). Required to send. */
4035
+ communicationProvider: z.ZodOptional<z.ZodString>;
4036
+ /** From address of the verification email. */
4037
+ fromAddress: z.ZodOptional<z.ZodString>;
4038
+ /**
4039
+ * Server-only secret the typed verification code is HMAC'd under before it is stored on the session
4040
+ * (at least 16 characters; 32+ random characters recommended). REQUIRED: without it verification is
4041
+ * unavailable, because a session's owner can read their own session row and a bare hash of a six-digit
4042
+ * code can be reversed offline. Never exposed to clients. Rotating it voids pending verifications only.
4043
+ */
4044
+ hmacSecret: z.ZodDefault<z.ZodOptional<z.ZodString>>;
4045
+ /**
4046
+ * `send` (default) delivers the email. `dry-run` builds and logs the message through the communication
4047
+ * provider WITHOUT delivering it — for rehearsal and integration environments, where a test reads the
4048
+ * emailed link and code from the `MJ: Communication Logs` row. Never use `dry-run` in production: the
4049
+ * Communication Log then holds live credentials and no one is emailed.
4050
+ */
4051
+ deliveryMode: z.ZodDefault<z.ZodOptional<z.ZodEnum<["send", "dry-run"]>>>;
4052
+ /**
4053
+ * Base URL the emailed link is built from (`<publicBaseUrl>/realtime/verify/<token>`). Defaults to the
4054
+ * server's `publicUrl`, or `baseUrl:graphqlPort` when that is unset — the same derivation magic links use.
4055
+ */
4056
+ publicBaseUrl: z.ZodOptional<z.ZodString>;
4057
+ /**
4058
+ * The internal user the server acts as to read/write the session, send the email and write the audit
4059
+ * row, matched against `User.Name` then `User.Email` (falls back to the system user, then the lowest-ID
4060
+ * active Owner). The verify link is public, so it has no caller identity of its own.
4061
+ */
4062
+ contextUserForVerification: z.ZodOptional<z.ZodString>;
4063
+ /** Base policy layer; each knob here is overridden by the per-session cascade layer. */
4064
+ policy: z.ZodDefault<z.ZodOptional<z.ZodObject<{
4065
+ requireBusinessDomain: z.ZodOptional<z.ZodBoolean>;
4066
+ blockedDomains: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
4067
+ consumerDomains: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
4068
+ linkTtlMinutes: z.ZodOptional<z.ZodNumber>;
4069
+ maxSendsPerSession: z.ZodOptional<z.ZodNumber>;
4070
+ maxCodeAttempts: z.ZodOptional<z.ZodNumber>;
4071
+ unverifiedMaxSeconds: z.ZodOptional<z.ZodNumber>;
4072
+ verifiedMaxSeconds: z.ZodOptional<z.ZodNumber>;
4073
+ }, "strip", z.ZodTypeAny, {
4074
+ requireBusinessDomain?: boolean;
4075
+ blockedDomains?: string[];
4076
+ consumerDomains?: string[];
4077
+ linkTtlMinutes?: number;
4078
+ maxSendsPerSession?: number;
4079
+ maxCodeAttempts?: number;
4080
+ unverifiedMaxSeconds?: number;
4081
+ verifiedMaxSeconds?: number;
4082
+ }, {
4083
+ requireBusinessDomain?: boolean;
4084
+ blockedDomains?: string[];
4085
+ consumerDomains?: string[];
4086
+ linkTtlMinutes?: number;
4087
+ maxSendsPerSession?: number;
4088
+ maxCodeAttempts?: number;
4089
+ unverifiedMaxSeconds?: number;
4090
+ verifiedMaxSeconds?: number;
4091
+ }>>>;
4092
+ /** Send-side and attempt-side limits (per instance, in memory; per-session limits are persisted and exact). */
4093
+ rateLimits: z.ZodDefault<z.ZodOptional<z.ZodObject<{
4094
+ /** Window (ms) for the three send limits. Default 1 hour. */
4095
+ sendWindowMs: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
4096
+ /** Verification emails per client IP per window. Default 10. 0 disables. */
4097
+ perIpSends: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
4098
+ /** Verification emails per recipient domain per window. Default 30. 0 disables. */
4099
+ perEmailDomainSends: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
4100
+ /** Verification emails per recipient address per window — stops the feature being used to mail-bomb one inbox. Default 3. 0 disables. */
4101
+ perEmailSends: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
4102
+ /** Window (ms) for code attempts. Default 10 minutes. */
4103
+ codeAttemptWindowMs: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
4104
+ /** Code submissions per session per window. Default 10. 0 disables. */
4105
+ perSessionCodeAttempts: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
4106
+ /** Window (ms) of the public `/realtime/verify` route limiter. Default 60s. */
4107
+ redeemWindowMs: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
4108
+ /** `/realtime/verify` requests per IP per window. Default 30. */
4109
+ redeemPerIp: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
4110
+ }, "strip", z.ZodTypeAny, {
4111
+ sendWindowMs?: number;
4112
+ perIpSends?: number;
4113
+ perEmailDomainSends?: number;
4114
+ perEmailSends?: number;
4115
+ codeAttemptWindowMs?: number;
4116
+ perSessionCodeAttempts?: number;
4117
+ redeemWindowMs?: number;
4118
+ redeemPerIp?: number;
4119
+ }, {
4120
+ sendWindowMs?: number;
4121
+ perIpSends?: number;
4122
+ perEmailDomainSends?: number;
4123
+ perEmailSends?: number;
4124
+ codeAttemptWindowMs?: number;
4125
+ perSessionCodeAttempts?: number;
4126
+ redeemWindowMs?: number;
4127
+ redeemPerIp?: number;
4128
+ }>>>;
4129
+ }, z.ZodTypeAny, "passthrough">>>>;
2868
4130
  }, z.ZodTypeAny, "passthrough">>;
2869
4131
  declare const configInfoSchema: z.ZodObject<{
2870
4132
  userHandling: z.ZodObject<{
@@ -2897,6 +4159,23 @@ declare const configInfoSchema: z.ZodObject<{
2897
4159
  contextUserForNewUserCreation: z.ZodDefault<z.ZodOptional<z.ZodString>>;
2898
4160
  CreateUserApplicationRecords: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
2899
4161
  UserApplications: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodString, "many">>>;
4162
+ /**
4163
+ * Build each auto-created user as a copy of a template user (`User.IsTemplate`), so new people start
4164
+ * with its pinned apps, views, settings, dashboards and conversations. `email` names the template;
4165
+ * `preset` is the `MJ: Users` clone preset to apply (default `template`). The copy takes the roles
4166
+ * and apps of the template, so `newUserRoles`, `CreateUserApplicationRecords` and `UserApplications`
4167
+ * apply only when the template can't be used, in which case a plain user is created as before.
4168
+ */
4169
+ newUserTemplate: z.ZodOptional<z.ZodObject<{
4170
+ email: z.ZodString;
4171
+ preset: z.ZodDefault<z.ZodOptional<z.ZodString>>;
4172
+ }, "strip", z.ZodTypeAny, {
4173
+ email?: string;
4174
+ preset?: string;
4175
+ }, {
4176
+ email?: string;
4177
+ preset?: string;
4178
+ }>>;
2900
4179
  }, "strip", z.ZodTypeAny, {
2901
4180
  autoCreateNewUsers?: boolean;
2902
4181
  newUserLimitedToAuthorizedDomains?: boolean;
@@ -2907,6 +4186,10 @@ declare const configInfoSchema: z.ZodObject<{
2907
4186
  contextUserForNewUserCreation?: string;
2908
4187
  CreateUserApplicationRecords?: boolean;
2909
4188
  UserApplications?: string[];
4189
+ newUserTemplate?: {
4190
+ email?: string;
4191
+ preset?: string;
4192
+ };
2910
4193
  }, {
2911
4194
  autoCreateNewUsers?: boolean;
2912
4195
  newUserLimitedToAuthorizedDomains?: boolean;
@@ -2917,6 +4200,10 @@ declare const configInfoSchema: z.ZodObject<{
2917
4200
  contextUserForNewUserCreation?: string;
2918
4201
  CreateUserApplicationRecords?: boolean;
2919
4202
  UserApplications?: string[];
4203
+ newUserTemplate?: {
4204
+ email?: string;
4205
+ preset?: string;
4206
+ };
2920
4207
  }>;
2921
4208
  magicLink: z.ZodDefault<z.ZodOptional<z.ZodObject<{
2922
4209
  /** Master switch for the magic-link feature. When false, routes are not mounted and the auth provider is not registered. */
@@ -4658,12 +5945,900 @@ declare const configInfoSchema: z.ZodObject<{
4658
5945
  realtime: z.ZodDefault<z.ZodOptional<z.ZodObject<{
4659
5946
  /** Master switch. When false, the WebRTC SDP broker router is not mounted. Defaults to true. */
4660
5947
  enabled: z.ZodDefault<z.ZodEffects<z.ZodDefault<z.ZodOptional<z.ZodUnion<[z.ZodBoolean, z.ZodString, z.ZodNumber]>>>, boolean, string | number | boolean>>;
5948
+ /** Mid-session identity verification (off by default). */
5949
+ identityVerification: z.ZodDefault<z.ZodOptional<z.ZodObject<{
5950
+ /** Master switch. When false the verify routes are not mounted and the GraphQL operations refuse. */
5951
+ enabled: z.ZodDefault<z.ZodEffects<z.ZodDefault<z.ZodOptional<z.ZodUnion<[z.ZodBoolean, z.ZodString, z.ZodNumber]>>>, boolean, string | number | boolean>>;
5952
+ /** CommunicationEngine provider that delivers the verification email (e.g. 'SendGrid', 'Microsoft Graph'). Required to send. */
5953
+ communicationProvider: z.ZodOptional<z.ZodString>;
5954
+ /** From address of the verification email. */
5955
+ fromAddress: z.ZodOptional<z.ZodString>;
5956
+ /**
5957
+ * Server-only secret the typed verification code is HMAC'd under before it is stored on the session
5958
+ * (at least 16 characters; 32+ random characters recommended). REQUIRED: without it verification is
5959
+ * unavailable, because a session's owner can read their own session row and a bare hash of a six-digit
5960
+ * code can be reversed offline. Never exposed to clients. Rotating it voids pending verifications only.
5961
+ */
5962
+ hmacSecret: z.ZodDefault<z.ZodOptional<z.ZodString>>;
5963
+ /**
5964
+ * `send` (default) delivers the email. `dry-run` builds and logs the message through the communication
5965
+ * provider WITHOUT delivering it — for rehearsal and integration environments, where a test reads the
5966
+ * emailed link and code from the `MJ: Communication Logs` row. Never use `dry-run` in production: the
5967
+ * Communication Log then holds live credentials and no one is emailed.
5968
+ */
5969
+ deliveryMode: z.ZodDefault<z.ZodOptional<z.ZodEnum<["send", "dry-run"]>>>;
5970
+ /**
5971
+ * Base URL the emailed link is built from (`<publicBaseUrl>/realtime/verify/<token>`). Defaults to the
5972
+ * server's `publicUrl`, or `baseUrl:graphqlPort` when that is unset — the same derivation magic links use.
5973
+ */
5974
+ publicBaseUrl: z.ZodOptional<z.ZodString>;
5975
+ /**
5976
+ * The internal user the server acts as to read/write the session, send the email and write the audit
5977
+ * row, matched against `User.Name` then `User.Email` (falls back to the system user, then the lowest-ID
5978
+ * active Owner). The verify link is public, so it has no caller identity of its own.
5979
+ */
5980
+ contextUserForVerification: z.ZodOptional<z.ZodString>;
5981
+ /** Base policy layer; each knob here is overridden by the per-session cascade layer. */
5982
+ policy: z.ZodDefault<z.ZodOptional<z.ZodObject<{
5983
+ requireBusinessDomain: z.ZodOptional<z.ZodBoolean>;
5984
+ blockedDomains: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
5985
+ consumerDomains: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
5986
+ linkTtlMinutes: z.ZodOptional<z.ZodNumber>;
5987
+ maxSendsPerSession: z.ZodOptional<z.ZodNumber>;
5988
+ maxCodeAttempts: z.ZodOptional<z.ZodNumber>;
5989
+ unverifiedMaxSeconds: z.ZodOptional<z.ZodNumber>;
5990
+ verifiedMaxSeconds: z.ZodOptional<z.ZodNumber>;
5991
+ }, "strip", z.ZodTypeAny, {
5992
+ requireBusinessDomain?: boolean;
5993
+ blockedDomains?: string[];
5994
+ consumerDomains?: string[];
5995
+ linkTtlMinutes?: number;
5996
+ maxSendsPerSession?: number;
5997
+ maxCodeAttempts?: number;
5998
+ unverifiedMaxSeconds?: number;
5999
+ verifiedMaxSeconds?: number;
6000
+ }, {
6001
+ requireBusinessDomain?: boolean;
6002
+ blockedDomains?: string[];
6003
+ consumerDomains?: string[];
6004
+ linkTtlMinutes?: number;
6005
+ maxSendsPerSession?: number;
6006
+ maxCodeAttempts?: number;
6007
+ unverifiedMaxSeconds?: number;
6008
+ verifiedMaxSeconds?: number;
6009
+ }>>>;
6010
+ /** Send-side and attempt-side limits (per instance, in memory; per-session limits are persisted and exact). */
6011
+ rateLimits: z.ZodDefault<z.ZodOptional<z.ZodObject<{
6012
+ /** Window (ms) for the three send limits. Default 1 hour. */
6013
+ sendWindowMs: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
6014
+ /** Verification emails per client IP per window. Default 10. 0 disables. */
6015
+ perIpSends: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
6016
+ /** Verification emails per recipient domain per window. Default 30. 0 disables. */
6017
+ perEmailDomainSends: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
6018
+ /** Verification emails per recipient address per window — stops the feature being used to mail-bomb one inbox. Default 3. 0 disables. */
6019
+ perEmailSends: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
6020
+ /** Window (ms) for code attempts. Default 10 minutes. */
6021
+ codeAttemptWindowMs: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
6022
+ /** Code submissions per session per window. Default 10. 0 disables. */
6023
+ perSessionCodeAttempts: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
6024
+ /** Window (ms) of the public `/realtime/verify` route limiter. Default 60s. */
6025
+ redeemWindowMs: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
6026
+ /** `/realtime/verify` requests per IP per window. Default 30. */
6027
+ redeemPerIp: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
6028
+ }, "strip", z.ZodTypeAny, {
6029
+ sendWindowMs?: number;
6030
+ perIpSends?: number;
6031
+ perEmailDomainSends?: number;
6032
+ perEmailSends?: number;
6033
+ codeAttemptWindowMs?: number;
6034
+ perSessionCodeAttempts?: number;
6035
+ redeemWindowMs?: number;
6036
+ redeemPerIp?: number;
6037
+ }, {
6038
+ sendWindowMs?: number;
6039
+ perIpSends?: number;
6040
+ perEmailDomainSends?: number;
6041
+ perEmailSends?: number;
6042
+ codeAttemptWindowMs?: number;
6043
+ perSessionCodeAttempts?: number;
6044
+ redeemWindowMs?: number;
6045
+ redeemPerIp?: number;
6046
+ }>>>;
6047
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
6048
+ /** Master switch. When false the verify routes are not mounted and the GraphQL operations refuse. */
6049
+ enabled: z.ZodDefault<z.ZodEffects<z.ZodDefault<z.ZodOptional<z.ZodUnion<[z.ZodBoolean, z.ZodString, z.ZodNumber]>>>, boolean, string | number | boolean>>;
6050
+ /** CommunicationEngine provider that delivers the verification email (e.g. 'SendGrid', 'Microsoft Graph'). Required to send. */
6051
+ communicationProvider: z.ZodOptional<z.ZodString>;
6052
+ /** From address of the verification email. */
6053
+ fromAddress: z.ZodOptional<z.ZodString>;
6054
+ /**
6055
+ * Server-only secret the typed verification code is HMAC'd under before it is stored on the session
6056
+ * (at least 16 characters; 32+ random characters recommended). REQUIRED: without it verification is
6057
+ * unavailable, because a session's owner can read their own session row and a bare hash of a six-digit
6058
+ * code can be reversed offline. Never exposed to clients. Rotating it voids pending verifications only.
6059
+ */
6060
+ hmacSecret: z.ZodDefault<z.ZodOptional<z.ZodString>>;
6061
+ /**
6062
+ * `send` (default) delivers the email. `dry-run` builds and logs the message through the communication
6063
+ * provider WITHOUT delivering it — for rehearsal and integration environments, where a test reads the
6064
+ * emailed link and code from the `MJ: Communication Logs` row. Never use `dry-run` in production: the
6065
+ * Communication Log then holds live credentials and no one is emailed.
6066
+ */
6067
+ deliveryMode: z.ZodDefault<z.ZodOptional<z.ZodEnum<["send", "dry-run"]>>>;
6068
+ /**
6069
+ * Base URL the emailed link is built from (`<publicBaseUrl>/realtime/verify/<token>`). Defaults to the
6070
+ * server's `publicUrl`, or `baseUrl:graphqlPort` when that is unset — the same derivation magic links use.
6071
+ */
6072
+ publicBaseUrl: z.ZodOptional<z.ZodString>;
6073
+ /**
6074
+ * The internal user the server acts as to read/write the session, send the email and write the audit
6075
+ * row, matched against `User.Name` then `User.Email` (falls back to the system user, then the lowest-ID
6076
+ * active Owner). The verify link is public, so it has no caller identity of its own.
6077
+ */
6078
+ contextUserForVerification: z.ZodOptional<z.ZodString>;
6079
+ /** Base policy layer; each knob here is overridden by the per-session cascade layer. */
6080
+ policy: z.ZodDefault<z.ZodOptional<z.ZodObject<{
6081
+ requireBusinessDomain: z.ZodOptional<z.ZodBoolean>;
6082
+ blockedDomains: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
6083
+ consumerDomains: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
6084
+ linkTtlMinutes: z.ZodOptional<z.ZodNumber>;
6085
+ maxSendsPerSession: z.ZodOptional<z.ZodNumber>;
6086
+ maxCodeAttempts: z.ZodOptional<z.ZodNumber>;
6087
+ unverifiedMaxSeconds: z.ZodOptional<z.ZodNumber>;
6088
+ verifiedMaxSeconds: z.ZodOptional<z.ZodNumber>;
6089
+ }, "strip", z.ZodTypeAny, {
6090
+ requireBusinessDomain?: boolean;
6091
+ blockedDomains?: string[];
6092
+ consumerDomains?: string[];
6093
+ linkTtlMinutes?: number;
6094
+ maxSendsPerSession?: number;
6095
+ maxCodeAttempts?: number;
6096
+ unverifiedMaxSeconds?: number;
6097
+ verifiedMaxSeconds?: number;
6098
+ }, {
6099
+ requireBusinessDomain?: boolean;
6100
+ blockedDomains?: string[];
6101
+ consumerDomains?: string[];
6102
+ linkTtlMinutes?: number;
6103
+ maxSendsPerSession?: number;
6104
+ maxCodeAttempts?: number;
6105
+ unverifiedMaxSeconds?: number;
6106
+ verifiedMaxSeconds?: number;
6107
+ }>>>;
6108
+ /** Send-side and attempt-side limits (per instance, in memory; per-session limits are persisted and exact). */
6109
+ rateLimits: z.ZodDefault<z.ZodOptional<z.ZodObject<{
6110
+ /** Window (ms) for the three send limits. Default 1 hour. */
6111
+ sendWindowMs: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
6112
+ /** Verification emails per client IP per window. Default 10. 0 disables. */
6113
+ perIpSends: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
6114
+ /** Verification emails per recipient domain per window. Default 30. 0 disables. */
6115
+ perEmailDomainSends: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
6116
+ /** Verification emails per recipient address per window — stops the feature being used to mail-bomb one inbox. Default 3. 0 disables. */
6117
+ perEmailSends: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
6118
+ /** Window (ms) for code attempts. Default 10 minutes. */
6119
+ codeAttemptWindowMs: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
6120
+ /** Code submissions per session per window. Default 10. 0 disables. */
6121
+ perSessionCodeAttempts: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
6122
+ /** Window (ms) of the public `/realtime/verify` route limiter. Default 60s. */
6123
+ redeemWindowMs: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
6124
+ /** `/realtime/verify` requests per IP per window. Default 30. */
6125
+ redeemPerIp: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
6126
+ }, "strip", z.ZodTypeAny, {
6127
+ sendWindowMs?: number;
6128
+ perIpSends?: number;
6129
+ perEmailDomainSends?: number;
6130
+ perEmailSends?: number;
6131
+ codeAttemptWindowMs?: number;
6132
+ perSessionCodeAttempts?: number;
6133
+ redeemWindowMs?: number;
6134
+ redeemPerIp?: number;
6135
+ }, {
6136
+ sendWindowMs?: number;
6137
+ perIpSends?: number;
6138
+ perEmailDomainSends?: number;
6139
+ perEmailSends?: number;
6140
+ codeAttemptWindowMs?: number;
6141
+ perSessionCodeAttempts?: number;
6142
+ redeemWindowMs?: number;
6143
+ redeemPerIp?: number;
6144
+ }>>>;
6145
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
6146
+ /** Master switch. When false the verify routes are not mounted and the GraphQL operations refuse. */
6147
+ enabled: z.ZodDefault<z.ZodEffects<z.ZodDefault<z.ZodOptional<z.ZodUnion<[z.ZodBoolean, z.ZodString, z.ZodNumber]>>>, boolean, string | number | boolean>>;
6148
+ /** CommunicationEngine provider that delivers the verification email (e.g. 'SendGrid', 'Microsoft Graph'). Required to send. */
6149
+ communicationProvider: z.ZodOptional<z.ZodString>;
6150
+ /** From address of the verification email. */
6151
+ fromAddress: z.ZodOptional<z.ZodString>;
6152
+ /**
6153
+ * Server-only secret the typed verification code is HMAC'd under before it is stored on the session
6154
+ * (at least 16 characters; 32+ random characters recommended). REQUIRED: without it verification is
6155
+ * unavailable, because a session's owner can read their own session row and a bare hash of a six-digit
6156
+ * code can be reversed offline. Never exposed to clients. Rotating it voids pending verifications only.
6157
+ */
6158
+ hmacSecret: z.ZodDefault<z.ZodOptional<z.ZodString>>;
6159
+ /**
6160
+ * `send` (default) delivers the email. `dry-run` builds and logs the message through the communication
6161
+ * provider WITHOUT delivering it — for rehearsal and integration environments, where a test reads the
6162
+ * emailed link and code from the `MJ: Communication Logs` row. Never use `dry-run` in production: the
6163
+ * Communication Log then holds live credentials and no one is emailed.
6164
+ */
6165
+ deliveryMode: z.ZodDefault<z.ZodOptional<z.ZodEnum<["send", "dry-run"]>>>;
6166
+ /**
6167
+ * Base URL the emailed link is built from (`<publicBaseUrl>/realtime/verify/<token>`). Defaults to the
6168
+ * server's `publicUrl`, or `baseUrl:graphqlPort` when that is unset — the same derivation magic links use.
6169
+ */
6170
+ publicBaseUrl: z.ZodOptional<z.ZodString>;
6171
+ /**
6172
+ * The internal user the server acts as to read/write the session, send the email and write the audit
6173
+ * row, matched against `User.Name` then `User.Email` (falls back to the system user, then the lowest-ID
6174
+ * active Owner). The verify link is public, so it has no caller identity of its own.
6175
+ */
6176
+ contextUserForVerification: z.ZodOptional<z.ZodString>;
6177
+ /** Base policy layer; each knob here is overridden by the per-session cascade layer. */
6178
+ policy: z.ZodDefault<z.ZodOptional<z.ZodObject<{
6179
+ requireBusinessDomain: z.ZodOptional<z.ZodBoolean>;
6180
+ blockedDomains: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
6181
+ consumerDomains: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
6182
+ linkTtlMinutes: z.ZodOptional<z.ZodNumber>;
6183
+ maxSendsPerSession: z.ZodOptional<z.ZodNumber>;
6184
+ maxCodeAttempts: z.ZodOptional<z.ZodNumber>;
6185
+ unverifiedMaxSeconds: z.ZodOptional<z.ZodNumber>;
6186
+ verifiedMaxSeconds: z.ZodOptional<z.ZodNumber>;
6187
+ }, "strip", z.ZodTypeAny, {
6188
+ requireBusinessDomain?: boolean;
6189
+ blockedDomains?: string[];
6190
+ consumerDomains?: string[];
6191
+ linkTtlMinutes?: number;
6192
+ maxSendsPerSession?: number;
6193
+ maxCodeAttempts?: number;
6194
+ unverifiedMaxSeconds?: number;
6195
+ verifiedMaxSeconds?: number;
6196
+ }, {
6197
+ requireBusinessDomain?: boolean;
6198
+ blockedDomains?: string[];
6199
+ consumerDomains?: string[];
6200
+ linkTtlMinutes?: number;
6201
+ maxSendsPerSession?: number;
6202
+ maxCodeAttempts?: number;
6203
+ unverifiedMaxSeconds?: number;
6204
+ verifiedMaxSeconds?: number;
6205
+ }>>>;
6206
+ /** Send-side and attempt-side limits (per instance, in memory; per-session limits are persisted and exact). */
6207
+ rateLimits: z.ZodDefault<z.ZodOptional<z.ZodObject<{
6208
+ /** Window (ms) for the three send limits. Default 1 hour. */
6209
+ sendWindowMs: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
6210
+ /** Verification emails per client IP per window. Default 10. 0 disables. */
6211
+ perIpSends: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
6212
+ /** Verification emails per recipient domain per window. Default 30. 0 disables. */
6213
+ perEmailDomainSends: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
6214
+ /** Verification emails per recipient address per window — stops the feature being used to mail-bomb one inbox. Default 3. 0 disables. */
6215
+ perEmailSends: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
6216
+ /** Window (ms) for code attempts. Default 10 minutes. */
6217
+ codeAttemptWindowMs: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
6218
+ /** Code submissions per session per window. Default 10. 0 disables. */
6219
+ perSessionCodeAttempts: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
6220
+ /** Window (ms) of the public `/realtime/verify` route limiter. Default 60s. */
6221
+ redeemWindowMs: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
6222
+ /** `/realtime/verify` requests per IP per window. Default 30. */
6223
+ redeemPerIp: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
6224
+ }, "strip", z.ZodTypeAny, {
6225
+ sendWindowMs?: number;
6226
+ perIpSends?: number;
6227
+ perEmailDomainSends?: number;
6228
+ perEmailSends?: number;
6229
+ codeAttemptWindowMs?: number;
6230
+ perSessionCodeAttempts?: number;
6231
+ redeemWindowMs?: number;
6232
+ redeemPerIp?: number;
6233
+ }, {
6234
+ sendWindowMs?: number;
6235
+ perIpSends?: number;
6236
+ perEmailDomainSends?: number;
6237
+ perEmailSends?: number;
6238
+ codeAttemptWindowMs?: number;
6239
+ perSessionCodeAttempts?: number;
6240
+ redeemWindowMs?: number;
6241
+ redeemPerIp?: number;
6242
+ }>>>;
6243
+ }, z.ZodTypeAny, "passthrough">>>>;
4661
6244
  }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
4662
6245
  /** Master switch. When false, the WebRTC SDP broker router is not mounted. Defaults to true. */
4663
6246
  enabled: z.ZodDefault<z.ZodEffects<z.ZodDefault<z.ZodOptional<z.ZodUnion<[z.ZodBoolean, z.ZodString, z.ZodNumber]>>>, boolean, string | number | boolean>>;
6247
+ /** Mid-session identity verification (off by default). */
6248
+ identityVerification: z.ZodDefault<z.ZodOptional<z.ZodObject<{
6249
+ /** Master switch. When false the verify routes are not mounted and the GraphQL operations refuse. */
6250
+ enabled: z.ZodDefault<z.ZodEffects<z.ZodDefault<z.ZodOptional<z.ZodUnion<[z.ZodBoolean, z.ZodString, z.ZodNumber]>>>, boolean, string | number | boolean>>;
6251
+ /** CommunicationEngine provider that delivers the verification email (e.g. 'SendGrid', 'Microsoft Graph'). Required to send. */
6252
+ communicationProvider: z.ZodOptional<z.ZodString>;
6253
+ /** From address of the verification email. */
6254
+ fromAddress: z.ZodOptional<z.ZodString>;
6255
+ /**
6256
+ * Server-only secret the typed verification code is HMAC'd under before it is stored on the session
6257
+ * (at least 16 characters; 32+ random characters recommended). REQUIRED: without it verification is
6258
+ * unavailable, because a session's owner can read their own session row and a bare hash of a six-digit
6259
+ * code can be reversed offline. Never exposed to clients. Rotating it voids pending verifications only.
6260
+ */
6261
+ hmacSecret: z.ZodDefault<z.ZodOptional<z.ZodString>>;
6262
+ /**
6263
+ * `send` (default) delivers the email. `dry-run` builds and logs the message through the communication
6264
+ * provider WITHOUT delivering it — for rehearsal and integration environments, where a test reads the
6265
+ * emailed link and code from the `MJ: Communication Logs` row. Never use `dry-run` in production: the
6266
+ * Communication Log then holds live credentials and no one is emailed.
6267
+ */
6268
+ deliveryMode: z.ZodDefault<z.ZodOptional<z.ZodEnum<["send", "dry-run"]>>>;
6269
+ /**
6270
+ * Base URL the emailed link is built from (`<publicBaseUrl>/realtime/verify/<token>`). Defaults to the
6271
+ * server's `publicUrl`, or `baseUrl:graphqlPort` when that is unset — the same derivation magic links use.
6272
+ */
6273
+ publicBaseUrl: z.ZodOptional<z.ZodString>;
6274
+ /**
6275
+ * The internal user the server acts as to read/write the session, send the email and write the audit
6276
+ * row, matched against `User.Name` then `User.Email` (falls back to the system user, then the lowest-ID
6277
+ * active Owner). The verify link is public, so it has no caller identity of its own.
6278
+ */
6279
+ contextUserForVerification: z.ZodOptional<z.ZodString>;
6280
+ /** Base policy layer; each knob here is overridden by the per-session cascade layer. */
6281
+ policy: z.ZodDefault<z.ZodOptional<z.ZodObject<{
6282
+ requireBusinessDomain: z.ZodOptional<z.ZodBoolean>;
6283
+ blockedDomains: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
6284
+ consumerDomains: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
6285
+ linkTtlMinutes: z.ZodOptional<z.ZodNumber>;
6286
+ maxSendsPerSession: z.ZodOptional<z.ZodNumber>;
6287
+ maxCodeAttempts: z.ZodOptional<z.ZodNumber>;
6288
+ unverifiedMaxSeconds: z.ZodOptional<z.ZodNumber>;
6289
+ verifiedMaxSeconds: z.ZodOptional<z.ZodNumber>;
6290
+ }, "strip", z.ZodTypeAny, {
6291
+ requireBusinessDomain?: boolean;
6292
+ blockedDomains?: string[];
6293
+ consumerDomains?: string[];
6294
+ linkTtlMinutes?: number;
6295
+ maxSendsPerSession?: number;
6296
+ maxCodeAttempts?: number;
6297
+ unverifiedMaxSeconds?: number;
6298
+ verifiedMaxSeconds?: number;
6299
+ }, {
6300
+ requireBusinessDomain?: boolean;
6301
+ blockedDomains?: string[];
6302
+ consumerDomains?: string[];
6303
+ linkTtlMinutes?: number;
6304
+ maxSendsPerSession?: number;
6305
+ maxCodeAttempts?: number;
6306
+ unverifiedMaxSeconds?: number;
6307
+ verifiedMaxSeconds?: number;
6308
+ }>>>;
6309
+ /** Send-side and attempt-side limits (per instance, in memory; per-session limits are persisted and exact). */
6310
+ rateLimits: z.ZodDefault<z.ZodOptional<z.ZodObject<{
6311
+ /** Window (ms) for the three send limits. Default 1 hour. */
6312
+ sendWindowMs: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
6313
+ /** Verification emails per client IP per window. Default 10. 0 disables. */
6314
+ perIpSends: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
6315
+ /** Verification emails per recipient domain per window. Default 30. 0 disables. */
6316
+ perEmailDomainSends: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
6317
+ /** Verification emails per recipient address per window — stops the feature being used to mail-bomb one inbox. Default 3. 0 disables. */
6318
+ perEmailSends: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
6319
+ /** Window (ms) for code attempts. Default 10 minutes. */
6320
+ codeAttemptWindowMs: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
6321
+ /** Code submissions per session per window. Default 10. 0 disables. */
6322
+ perSessionCodeAttempts: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
6323
+ /** Window (ms) of the public `/realtime/verify` route limiter. Default 60s. */
6324
+ redeemWindowMs: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
6325
+ /** `/realtime/verify` requests per IP per window. Default 30. */
6326
+ redeemPerIp: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
6327
+ }, "strip", z.ZodTypeAny, {
6328
+ sendWindowMs?: number;
6329
+ perIpSends?: number;
6330
+ perEmailDomainSends?: number;
6331
+ perEmailSends?: number;
6332
+ codeAttemptWindowMs?: number;
6333
+ perSessionCodeAttempts?: number;
6334
+ redeemWindowMs?: number;
6335
+ redeemPerIp?: number;
6336
+ }, {
6337
+ sendWindowMs?: number;
6338
+ perIpSends?: number;
6339
+ perEmailDomainSends?: number;
6340
+ perEmailSends?: number;
6341
+ codeAttemptWindowMs?: number;
6342
+ perSessionCodeAttempts?: number;
6343
+ redeemWindowMs?: number;
6344
+ redeemPerIp?: number;
6345
+ }>>>;
6346
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
6347
+ /** Master switch. When false the verify routes are not mounted and the GraphQL operations refuse. */
6348
+ enabled: z.ZodDefault<z.ZodEffects<z.ZodDefault<z.ZodOptional<z.ZodUnion<[z.ZodBoolean, z.ZodString, z.ZodNumber]>>>, boolean, string | number | boolean>>;
6349
+ /** CommunicationEngine provider that delivers the verification email (e.g. 'SendGrid', 'Microsoft Graph'). Required to send. */
6350
+ communicationProvider: z.ZodOptional<z.ZodString>;
6351
+ /** From address of the verification email. */
6352
+ fromAddress: z.ZodOptional<z.ZodString>;
6353
+ /**
6354
+ * Server-only secret the typed verification code is HMAC'd under before it is stored on the session
6355
+ * (at least 16 characters; 32+ random characters recommended). REQUIRED: without it verification is
6356
+ * unavailable, because a session's owner can read their own session row and a bare hash of a six-digit
6357
+ * code can be reversed offline. Never exposed to clients. Rotating it voids pending verifications only.
6358
+ */
6359
+ hmacSecret: z.ZodDefault<z.ZodOptional<z.ZodString>>;
6360
+ /**
6361
+ * `send` (default) delivers the email. `dry-run` builds and logs the message through the communication
6362
+ * provider WITHOUT delivering it — for rehearsal and integration environments, where a test reads the
6363
+ * emailed link and code from the `MJ: Communication Logs` row. Never use `dry-run` in production: the
6364
+ * Communication Log then holds live credentials and no one is emailed.
6365
+ */
6366
+ deliveryMode: z.ZodDefault<z.ZodOptional<z.ZodEnum<["send", "dry-run"]>>>;
6367
+ /**
6368
+ * Base URL the emailed link is built from (`<publicBaseUrl>/realtime/verify/<token>`). Defaults to the
6369
+ * server's `publicUrl`, or `baseUrl:graphqlPort` when that is unset — the same derivation magic links use.
6370
+ */
6371
+ publicBaseUrl: z.ZodOptional<z.ZodString>;
6372
+ /**
6373
+ * The internal user the server acts as to read/write the session, send the email and write the audit
6374
+ * row, matched against `User.Name` then `User.Email` (falls back to the system user, then the lowest-ID
6375
+ * active Owner). The verify link is public, so it has no caller identity of its own.
6376
+ */
6377
+ contextUserForVerification: z.ZodOptional<z.ZodString>;
6378
+ /** Base policy layer; each knob here is overridden by the per-session cascade layer. */
6379
+ policy: z.ZodDefault<z.ZodOptional<z.ZodObject<{
6380
+ requireBusinessDomain: z.ZodOptional<z.ZodBoolean>;
6381
+ blockedDomains: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
6382
+ consumerDomains: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
6383
+ linkTtlMinutes: z.ZodOptional<z.ZodNumber>;
6384
+ maxSendsPerSession: z.ZodOptional<z.ZodNumber>;
6385
+ maxCodeAttempts: z.ZodOptional<z.ZodNumber>;
6386
+ unverifiedMaxSeconds: z.ZodOptional<z.ZodNumber>;
6387
+ verifiedMaxSeconds: z.ZodOptional<z.ZodNumber>;
6388
+ }, "strip", z.ZodTypeAny, {
6389
+ requireBusinessDomain?: boolean;
6390
+ blockedDomains?: string[];
6391
+ consumerDomains?: string[];
6392
+ linkTtlMinutes?: number;
6393
+ maxSendsPerSession?: number;
6394
+ maxCodeAttempts?: number;
6395
+ unverifiedMaxSeconds?: number;
6396
+ verifiedMaxSeconds?: number;
6397
+ }, {
6398
+ requireBusinessDomain?: boolean;
6399
+ blockedDomains?: string[];
6400
+ consumerDomains?: string[];
6401
+ linkTtlMinutes?: number;
6402
+ maxSendsPerSession?: number;
6403
+ maxCodeAttempts?: number;
6404
+ unverifiedMaxSeconds?: number;
6405
+ verifiedMaxSeconds?: number;
6406
+ }>>>;
6407
+ /** Send-side and attempt-side limits (per instance, in memory; per-session limits are persisted and exact). */
6408
+ rateLimits: z.ZodDefault<z.ZodOptional<z.ZodObject<{
6409
+ /** Window (ms) for the three send limits. Default 1 hour. */
6410
+ sendWindowMs: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
6411
+ /** Verification emails per client IP per window. Default 10. 0 disables. */
6412
+ perIpSends: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
6413
+ /** Verification emails per recipient domain per window. Default 30. 0 disables. */
6414
+ perEmailDomainSends: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
6415
+ /** Verification emails per recipient address per window — stops the feature being used to mail-bomb one inbox. Default 3. 0 disables. */
6416
+ perEmailSends: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
6417
+ /** Window (ms) for code attempts. Default 10 minutes. */
6418
+ codeAttemptWindowMs: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
6419
+ /** Code submissions per session per window. Default 10. 0 disables. */
6420
+ perSessionCodeAttempts: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
6421
+ /** Window (ms) of the public `/realtime/verify` route limiter. Default 60s. */
6422
+ redeemWindowMs: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
6423
+ /** `/realtime/verify` requests per IP per window. Default 30. */
6424
+ redeemPerIp: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
6425
+ }, "strip", z.ZodTypeAny, {
6426
+ sendWindowMs?: number;
6427
+ perIpSends?: number;
6428
+ perEmailDomainSends?: number;
6429
+ perEmailSends?: number;
6430
+ codeAttemptWindowMs?: number;
6431
+ perSessionCodeAttempts?: number;
6432
+ redeemWindowMs?: number;
6433
+ redeemPerIp?: number;
6434
+ }, {
6435
+ sendWindowMs?: number;
6436
+ perIpSends?: number;
6437
+ perEmailDomainSends?: number;
6438
+ perEmailSends?: number;
6439
+ codeAttemptWindowMs?: number;
6440
+ perSessionCodeAttempts?: number;
6441
+ redeemWindowMs?: number;
6442
+ redeemPerIp?: number;
6443
+ }>>>;
6444
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
6445
+ /** Master switch. When false the verify routes are not mounted and the GraphQL operations refuse. */
6446
+ enabled: z.ZodDefault<z.ZodEffects<z.ZodDefault<z.ZodOptional<z.ZodUnion<[z.ZodBoolean, z.ZodString, z.ZodNumber]>>>, boolean, string | number | boolean>>;
6447
+ /** CommunicationEngine provider that delivers the verification email (e.g. 'SendGrid', 'Microsoft Graph'). Required to send. */
6448
+ communicationProvider: z.ZodOptional<z.ZodString>;
6449
+ /** From address of the verification email. */
6450
+ fromAddress: z.ZodOptional<z.ZodString>;
6451
+ /**
6452
+ * Server-only secret the typed verification code is HMAC'd under before it is stored on the session
6453
+ * (at least 16 characters; 32+ random characters recommended). REQUIRED: without it verification is
6454
+ * unavailable, because a session's owner can read their own session row and a bare hash of a six-digit
6455
+ * code can be reversed offline. Never exposed to clients. Rotating it voids pending verifications only.
6456
+ */
6457
+ hmacSecret: z.ZodDefault<z.ZodOptional<z.ZodString>>;
6458
+ /**
6459
+ * `send` (default) delivers the email. `dry-run` builds and logs the message through the communication
6460
+ * provider WITHOUT delivering it — for rehearsal and integration environments, where a test reads the
6461
+ * emailed link and code from the `MJ: Communication Logs` row. Never use `dry-run` in production: the
6462
+ * Communication Log then holds live credentials and no one is emailed.
6463
+ */
6464
+ deliveryMode: z.ZodDefault<z.ZodOptional<z.ZodEnum<["send", "dry-run"]>>>;
6465
+ /**
6466
+ * Base URL the emailed link is built from (`<publicBaseUrl>/realtime/verify/<token>`). Defaults to the
6467
+ * server's `publicUrl`, or `baseUrl:graphqlPort` when that is unset — the same derivation magic links use.
6468
+ */
6469
+ publicBaseUrl: z.ZodOptional<z.ZodString>;
6470
+ /**
6471
+ * The internal user the server acts as to read/write the session, send the email and write the audit
6472
+ * row, matched against `User.Name` then `User.Email` (falls back to the system user, then the lowest-ID
6473
+ * active Owner). The verify link is public, so it has no caller identity of its own.
6474
+ */
6475
+ contextUserForVerification: z.ZodOptional<z.ZodString>;
6476
+ /** Base policy layer; each knob here is overridden by the per-session cascade layer. */
6477
+ policy: z.ZodDefault<z.ZodOptional<z.ZodObject<{
6478
+ requireBusinessDomain: z.ZodOptional<z.ZodBoolean>;
6479
+ blockedDomains: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
6480
+ consumerDomains: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
6481
+ linkTtlMinutes: z.ZodOptional<z.ZodNumber>;
6482
+ maxSendsPerSession: z.ZodOptional<z.ZodNumber>;
6483
+ maxCodeAttempts: z.ZodOptional<z.ZodNumber>;
6484
+ unverifiedMaxSeconds: z.ZodOptional<z.ZodNumber>;
6485
+ verifiedMaxSeconds: z.ZodOptional<z.ZodNumber>;
6486
+ }, "strip", z.ZodTypeAny, {
6487
+ requireBusinessDomain?: boolean;
6488
+ blockedDomains?: string[];
6489
+ consumerDomains?: string[];
6490
+ linkTtlMinutes?: number;
6491
+ maxSendsPerSession?: number;
6492
+ maxCodeAttempts?: number;
6493
+ unverifiedMaxSeconds?: number;
6494
+ verifiedMaxSeconds?: number;
6495
+ }, {
6496
+ requireBusinessDomain?: boolean;
6497
+ blockedDomains?: string[];
6498
+ consumerDomains?: string[];
6499
+ linkTtlMinutes?: number;
6500
+ maxSendsPerSession?: number;
6501
+ maxCodeAttempts?: number;
6502
+ unverifiedMaxSeconds?: number;
6503
+ verifiedMaxSeconds?: number;
6504
+ }>>>;
6505
+ /** Send-side and attempt-side limits (per instance, in memory; per-session limits are persisted and exact). */
6506
+ rateLimits: z.ZodDefault<z.ZodOptional<z.ZodObject<{
6507
+ /** Window (ms) for the three send limits. Default 1 hour. */
6508
+ sendWindowMs: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
6509
+ /** Verification emails per client IP per window. Default 10. 0 disables. */
6510
+ perIpSends: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
6511
+ /** Verification emails per recipient domain per window. Default 30. 0 disables. */
6512
+ perEmailDomainSends: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
6513
+ /** Verification emails per recipient address per window — stops the feature being used to mail-bomb one inbox. Default 3. 0 disables. */
6514
+ perEmailSends: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
6515
+ /** Window (ms) for code attempts. Default 10 minutes. */
6516
+ codeAttemptWindowMs: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
6517
+ /** Code submissions per session per window. Default 10. 0 disables. */
6518
+ perSessionCodeAttempts: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
6519
+ /** Window (ms) of the public `/realtime/verify` route limiter. Default 60s. */
6520
+ redeemWindowMs: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
6521
+ /** `/realtime/verify` requests per IP per window. Default 30. */
6522
+ redeemPerIp: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
6523
+ }, "strip", z.ZodTypeAny, {
6524
+ sendWindowMs?: number;
6525
+ perIpSends?: number;
6526
+ perEmailDomainSends?: number;
6527
+ perEmailSends?: number;
6528
+ codeAttemptWindowMs?: number;
6529
+ perSessionCodeAttempts?: number;
6530
+ redeemWindowMs?: number;
6531
+ redeemPerIp?: number;
6532
+ }, {
6533
+ sendWindowMs?: number;
6534
+ perIpSends?: number;
6535
+ perEmailDomainSends?: number;
6536
+ perEmailSends?: number;
6537
+ codeAttemptWindowMs?: number;
6538
+ perSessionCodeAttempts?: number;
6539
+ redeemWindowMs?: number;
6540
+ redeemPerIp?: number;
6541
+ }>>>;
6542
+ }, z.ZodTypeAny, "passthrough">>>>;
4664
6543
  }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
4665
6544
  /** Master switch. When false, the WebRTC SDP broker router is not mounted. Defaults to true. */
4666
6545
  enabled: z.ZodDefault<z.ZodEffects<z.ZodDefault<z.ZodOptional<z.ZodUnion<[z.ZodBoolean, z.ZodString, z.ZodNumber]>>>, boolean, string | number | boolean>>;
6546
+ /** Mid-session identity verification (off by default). */
6547
+ identityVerification: z.ZodDefault<z.ZodOptional<z.ZodObject<{
6548
+ /** Master switch. When false the verify routes are not mounted and the GraphQL operations refuse. */
6549
+ enabled: z.ZodDefault<z.ZodEffects<z.ZodDefault<z.ZodOptional<z.ZodUnion<[z.ZodBoolean, z.ZodString, z.ZodNumber]>>>, boolean, string | number | boolean>>;
6550
+ /** CommunicationEngine provider that delivers the verification email (e.g. 'SendGrid', 'Microsoft Graph'). Required to send. */
6551
+ communicationProvider: z.ZodOptional<z.ZodString>;
6552
+ /** From address of the verification email. */
6553
+ fromAddress: z.ZodOptional<z.ZodString>;
6554
+ /**
6555
+ * Server-only secret the typed verification code is HMAC'd under before it is stored on the session
6556
+ * (at least 16 characters; 32+ random characters recommended). REQUIRED: without it verification is
6557
+ * unavailable, because a session's owner can read their own session row and a bare hash of a six-digit
6558
+ * code can be reversed offline. Never exposed to clients. Rotating it voids pending verifications only.
6559
+ */
6560
+ hmacSecret: z.ZodDefault<z.ZodOptional<z.ZodString>>;
6561
+ /**
6562
+ * `send` (default) delivers the email. `dry-run` builds and logs the message through the communication
6563
+ * provider WITHOUT delivering it — for rehearsal and integration environments, where a test reads the
6564
+ * emailed link and code from the `MJ: Communication Logs` row. Never use `dry-run` in production: the
6565
+ * Communication Log then holds live credentials and no one is emailed.
6566
+ */
6567
+ deliveryMode: z.ZodDefault<z.ZodOptional<z.ZodEnum<["send", "dry-run"]>>>;
6568
+ /**
6569
+ * Base URL the emailed link is built from (`<publicBaseUrl>/realtime/verify/<token>`). Defaults to the
6570
+ * server's `publicUrl`, or `baseUrl:graphqlPort` when that is unset — the same derivation magic links use.
6571
+ */
6572
+ publicBaseUrl: z.ZodOptional<z.ZodString>;
6573
+ /**
6574
+ * The internal user the server acts as to read/write the session, send the email and write the audit
6575
+ * row, matched against `User.Name` then `User.Email` (falls back to the system user, then the lowest-ID
6576
+ * active Owner). The verify link is public, so it has no caller identity of its own.
6577
+ */
6578
+ contextUserForVerification: z.ZodOptional<z.ZodString>;
6579
+ /** Base policy layer; each knob here is overridden by the per-session cascade layer. */
6580
+ policy: z.ZodDefault<z.ZodOptional<z.ZodObject<{
6581
+ requireBusinessDomain: z.ZodOptional<z.ZodBoolean>;
6582
+ blockedDomains: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
6583
+ consumerDomains: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
6584
+ linkTtlMinutes: z.ZodOptional<z.ZodNumber>;
6585
+ maxSendsPerSession: z.ZodOptional<z.ZodNumber>;
6586
+ maxCodeAttempts: z.ZodOptional<z.ZodNumber>;
6587
+ unverifiedMaxSeconds: z.ZodOptional<z.ZodNumber>;
6588
+ verifiedMaxSeconds: z.ZodOptional<z.ZodNumber>;
6589
+ }, "strip", z.ZodTypeAny, {
6590
+ requireBusinessDomain?: boolean;
6591
+ blockedDomains?: string[];
6592
+ consumerDomains?: string[];
6593
+ linkTtlMinutes?: number;
6594
+ maxSendsPerSession?: number;
6595
+ maxCodeAttempts?: number;
6596
+ unverifiedMaxSeconds?: number;
6597
+ verifiedMaxSeconds?: number;
6598
+ }, {
6599
+ requireBusinessDomain?: boolean;
6600
+ blockedDomains?: string[];
6601
+ consumerDomains?: string[];
6602
+ linkTtlMinutes?: number;
6603
+ maxSendsPerSession?: number;
6604
+ maxCodeAttempts?: number;
6605
+ unverifiedMaxSeconds?: number;
6606
+ verifiedMaxSeconds?: number;
6607
+ }>>>;
6608
+ /** Send-side and attempt-side limits (per instance, in memory; per-session limits are persisted and exact). */
6609
+ rateLimits: z.ZodDefault<z.ZodOptional<z.ZodObject<{
6610
+ /** Window (ms) for the three send limits. Default 1 hour. */
6611
+ sendWindowMs: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
6612
+ /** Verification emails per client IP per window. Default 10. 0 disables. */
6613
+ perIpSends: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
6614
+ /** Verification emails per recipient domain per window. Default 30. 0 disables. */
6615
+ perEmailDomainSends: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
6616
+ /** Verification emails per recipient address per window — stops the feature being used to mail-bomb one inbox. Default 3. 0 disables. */
6617
+ perEmailSends: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
6618
+ /** Window (ms) for code attempts. Default 10 minutes. */
6619
+ codeAttemptWindowMs: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
6620
+ /** Code submissions per session per window. Default 10. 0 disables. */
6621
+ perSessionCodeAttempts: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
6622
+ /** Window (ms) of the public `/realtime/verify` route limiter. Default 60s. */
6623
+ redeemWindowMs: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
6624
+ /** `/realtime/verify` requests per IP per window. Default 30. */
6625
+ redeemPerIp: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
6626
+ }, "strip", z.ZodTypeAny, {
6627
+ sendWindowMs?: number;
6628
+ perIpSends?: number;
6629
+ perEmailDomainSends?: number;
6630
+ perEmailSends?: number;
6631
+ codeAttemptWindowMs?: number;
6632
+ perSessionCodeAttempts?: number;
6633
+ redeemWindowMs?: number;
6634
+ redeemPerIp?: number;
6635
+ }, {
6636
+ sendWindowMs?: number;
6637
+ perIpSends?: number;
6638
+ perEmailDomainSends?: number;
6639
+ perEmailSends?: number;
6640
+ codeAttemptWindowMs?: number;
6641
+ perSessionCodeAttempts?: number;
6642
+ redeemWindowMs?: number;
6643
+ redeemPerIp?: number;
6644
+ }>>>;
6645
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
6646
+ /** Master switch. When false the verify routes are not mounted and the GraphQL operations refuse. */
6647
+ enabled: z.ZodDefault<z.ZodEffects<z.ZodDefault<z.ZodOptional<z.ZodUnion<[z.ZodBoolean, z.ZodString, z.ZodNumber]>>>, boolean, string | number | boolean>>;
6648
+ /** CommunicationEngine provider that delivers the verification email (e.g. 'SendGrid', 'Microsoft Graph'). Required to send. */
6649
+ communicationProvider: z.ZodOptional<z.ZodString>;
6650
+ /** From address of the verification email. */
6651
+ fromAddress: z.ZodOptional<z.ZodString>;
6652
+ /**
6653
+ * Server-only secret the typed verification code is HMAC'd under before it is stored on the session
6654
+ * (at least 16 characters; 32+ random characters recommended). REQUIRED: without it verification is
6655
+ * unavailable, because a session's owner can read their own session row and a bare hash of a six-digit
6656
+ * code can be reversed offline. Never exposed to clients. Rotating it voids pending verifications only.
6657
+ */
6658
+ hmacSecret: z.ZodDefault<z.ZodOptional<z.ZodString>>;
6659
+ /**
6660
+ * `send` (default) delivers the email. `dry-run` builds and logs the message through the communication
6661
+ * provider WITHOUT delivering it — for rehearsal and integration environments, where a test reads the
6662
+ * emailed link and code from the `MJ: Communication Logs` row. Never use `dry-run` in production: the
6663
+ * Communication Log then holds live credentials and no one is emailed.
6664
+ */
6665
+ deliveryMode: z.ZodDefault<z.ZodOptional<z.ZodEnum<["send", "dry-run"]>>>;
6666
+ /**
6667
+ * Base URL the emailed link is built from (`<publicBaseUrl>/realtime/verify/<token>`). Defaults to the
6668
+ * server's `publicUrl`, or `baseUrl:graphqlPort` when that is unset — the same derivation magic links use.
6669
+ */
6670
+ publicBaseUrl: z.ZodOptional<z.ZodString>;
6671
+ /**
6672
+ * The internal user the server acts as to read/write the session, send the email and write the audit
6673
+ * row, matched against `User.Name` then `User.Email` (falls back to the system user, then the lowest-ID
6674
+ * active Owner). The verify link is public, so it has no caller identity of its own.
6675
+ */
6676
+ contextUserForVerification: z.ZodOptional<z.ZodString>;
6677
+ /** Base policy layer; each knob here is overridden by the per-session cascade layer. */
6678
+ policy: z.ZodDefault<z.ZodOptional<z.ZodObject<{
6679
+ requireBusinessDomain: z.ZodOptional<z.ZodBoolean>;
6680
+ blockedDomains: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
6681
+ consumerDomains: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
6682
+ linkTtlMinutes: z.ZodOptional<z.ZodNumber>;
6683
+ maxSendsPerSession: z.ZodOptional<z.ZodNumber>;
6684
+ maxCodeAttempts: z.ZodOptional<z.ZodNumber>;
6685
+ unverifiedMaxSeconds: z.ZodOptional<z.ZodNumber>;
6686
+ verifiedMaxSeconds: z.ZodOptional<z.ZodNumber>;
6687
+ }, "strip", z.ZodTypeAny, {
6688
+ requireBusinessDomain?: boolean;
6689
+ blockedDomains?: string[];
6690
+ consumerDomains?: string[];
6691
+ linkTtlMinutes?: number;
6692
+ maxSendsPerSession?: number;
6693
+ maxCodeAttempts?: number;
6694
+ unverifiedMaxSeconds?: number;
6695
+ verifiedMaxSeconds?: number;
6696
+ }, {
6697
+ requireBusinessDomain?: boolean;
6698
+ blockedDomains?: string[];
6699
+ consumerDomains?: string[];
6700
+ linkTtlMinutes?: number;
6701
+ maxSendsPerSession?: number;
6702
+ maxCodeAttempts?: number;
6703
+ unverifiedMaxSeconds?: number;
6704
+ verifiedMaxSeconds?: number;
6705
+ }>>>;
6706
+ /** Send-side and attempt-side limits (per instance, in memory; per-session limits are persisted and exact). */
6707
+ rateLimits: z.ZodDefault<z.ZodOptional<z.ZodObject<{
6708
+ /** Window (ms) for the three send limits. Default 1 hour. */
6709
+ sendWindowMs: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
6710
+ /** Verification emails per client IP per window. Default 10. 0 disables. */
6711
+ perIpSends: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
6712
+ /** Verification emails per recipient domain per window. Default 30. 0 disables. */
6713
+ perEmailDomainSends: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
6714
+ /** Verification emails per recipient address per window — stops the feature being used to mail-bomb one inbox. Default 3. 0 disables. */
6715
+ perEmailSends: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
6716
+ /** Window (ms) for code attempts. Default 10 minutes. */
6717
+ codeAttemptWindowMs: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
6718
+ /** Code submissions per session per window. Default 10. 0 disables. */
6719
+ perSessionCodeAttempts: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
6720
+ /** Window (ms) of the public `/realtime/verify` route limiter. Default 60s. */
6721
+ redeemWindowMs: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
6722
+ /** `/realtime/verify` requests per IP per window. Default 30. */
6723
+ redeemPerIp: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
6724
+ }, "strip", z.ZodTypeAny, {
6725
+ sendWindowMs?: number;
6726
+ perIpSends?: number;
6727
+ perEmailDomainSends?: number;
6728
+ perEmailSends?: number;
6729
+ codeAttemptWindowMs?: number;
6730
+ perSessionCodeAttempts?: number;
6731
+ redeemWindowMs?: number;
6732
+ redeemPerIp?: number;
6733
+ }, {
6734
+ sendWindowMs?: number;
6735
+ perIpSends?: number;
6736
+ perEmailDomainSends?: number;
6737
+ perEmailSends?: number;
6738
+ codeAttemptWindowMs?: number;
6739
+ perSessionCodeAttempts?: number;
6740
+ redeemWindowMs?: number;
6741
+ redeemPerIp?: number;
6742
+ }>>>;
6743
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
6744
+ /** Master switch. When false the verify routes are not mounted and the GraphQL operations refuse. */
6745
+ enabled: z.ZodDefault<z.ZodEffects<z.ZodDefault<z.ZodOptional<z.ZodUnion<[z.ZodBoolean, z.ZodString, z.ZodNumber]>>>, boolean, string | number | boolean>>;
6746
+ /** CommunicationEngine provider that delivers the verification email (e.g. 'SendGrid', 'Microsoft Graph'). Required to send. */
6747
+ communicationProvider: z.ZodOptional<z.ZodString>;
6748
+ /** From address of the verification email. */
6749
+ fromAddress: z.ZodOptional<z.ZodString>;
6750
+ /**
6751
+ * Server-only secret the typed verification code is HMAC'd under before it is stored on the session
6752
+ * (at least 16 characters; 32+ random characters recommended). REQUIRED: without it verification is
6753
+ * unavailable, because a session's owner can read their own session row and a bare hash of a six-digit
6754
+ * code can be reversed offline. Never exposed to clients. Rotating it voids pending verifications only.
6755
+ */
6756
+ hmacSecret: z.ZodDefault<z.ZodOptional<z.ZodString>>;
6757
+ /**
6758
+ * `send` (default) delivers the email. `dry-run` builds and logs the message through the communication
6759
+ * provider WITHOUT delivering it — for rehearsal and integration environments, where a test reads the
6760
+ * emailed link and code from the `MJ: Communication Logs` row. Never use `dry-run` in production: the
6761
+ * Communication Log then holds live credentials and no one is emailed.
6762
+ */
6763
+ deliveryMode: z.ZodDefault<z.ZodOptional<z.ZodEnum<["send", "dry-run"]>>>;
6764
+ /**
6765
+ * Base URL the emailed link is built from (`<publicBaseUrl>/realtime/verify/<token>`). Defaults to the
6766
+ * server's `publicUrl`, or `baseUrl:graphqlPort` when that is unset — the same derivation magic links use.
6767
+ */
6768
+ publicBaseUrl: z.ZodOptional<z.ZodString>;
6769
+ /**
6770
+ * The internal user the server acts as to read/write the session, send the email and write the audit
6771
+ * row, matched against `User.Name` then `User.Email` (falls back to the system user, then the lowest-ID
6772
+ * active Owner). The verify link is public, so it has no caller identity of its own.
6773
+ */
6774
+ contextUserForVerification: z.ZodOptional<z.ZodString>;
6775
+ /** Base policy layer; each knob here is overridden by the per-session cascade layer. */
6776
+ policy: z.ZodDefault<z.ZodOptional<z.ZodObject<{
6777
+ requireBusinessDomain: z.ZodOptional<z.ZodBoolean>;
6778
+ blockedDomains: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
6779
+ consumerDomains: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
6780
+ linkTtlMinutes: z.ZodOptional<z.ZodNumber>;
6781
+ maxSendsPerSession: z.ZodOptional<z.ZodNumber>;
6782
+ maxCodeAttempts: z.ZodOptional<z.ZodNumber>;
6783
+ unverifiedMaxSeconds: z.ZodOptional<z.ZodNumber>;
6784
+ verifiedMaxSeconds: z.ZodOptional<z.ZodNumber>;
6785
+ }, "strip", z.ZodTypeAny, {
6786
+ requireBusinessDomain?: boolean;
6787
+ blockedDomains?: string[];
6788
+ consumerDomains?: string[];
6789
+ linkTtlMinutes?: number;
6790
+ maxSendsPerSession?: number;
6791
+ maxCodeAttempts?: number;
6792
+ unverifiedMaxSeconds?: number;
6793
+ verifiedMaxSeconds?: number;
6794
+ }, {
6795
+ requireBusinessDomain?: boolean;
6796
+ blockedDomains?: string[];
6797
+ consumerDomains?: string[];
6798
+ linkTtlMinutes?: number;
6799
+ maxSendsPerSession?: number;
6800
+ maxCodeAttempts?: number;
6801
+ unverifiedMaxSeconds?: number;
6802
+ verifiedMaxSeconds?: number;
6803
+ }>>>;
6804
+ /** Send-side and attempt-side limits (per instance, in memory; per-session limits are persisted and exact). */
6805
+ rateLimits: z.ZodDefault<z.ZodOptional<z.ZodObject<{
6806
+ /** Window (ms) for the three send limits. Default 1 hour. */
6807
+ sendWindowMs: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
6808
+ /** Verification emails per client IP per window. Default 10. 0 disables. */
6809
+ perIpSends: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
6810
+ /** Verification emails per recipient domain per window. Default 30. 0 disables. */
6811
+ perEmailDomainSends: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
6812
+ /** Verification emails per recipient address per window — stops the feature being used to mail-bomb one inbox. Default 3. 0 disables. */
6813
+ perEmailSends: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
6814
+ /** Window (ms) for code attempts. Default 10 minutes. */
6815
+ codeAttemptWindowMs: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
6816
+ /** Code submissions per session per window. Default 10. 0 disables. */
6817
+ perSessionCodeAttempts: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
6818
+ /** Window (ms) of the public `/realtime/verify` route limiter. Default 60s. */
6819
+ redeemWindowMs: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
6820
+ /** `/realtime/verify` requests per IP per window. Default 30. */
6821
+ redeemPerIp: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
6822
+ }, "strip", z.ZodTypeAny, {
6823
+ sendWindowMs?: number;
6824
+ perIpSends?: number;
6825
+ perEmailDomainSends?: number;
6826
+ perEmailSends?: number;
6827
+ codeAttemptWindowMs?: number;
6828
+ perSessionCodeAttempts?: number;
6829
+ redeemWindowMs?: number;
6830
+ redeemPerIp?: number;
6831
+ }, {
6832
+ sendWindowMs?: number;
6833
+ perIpSends?: number;
6834
+ perEmailDomainSends?: number;
6835
+ perEmailSends?: number;
6836
+ codeAttemptWindowMs?: number;
6837
+ perSessionCodeAttempts?: number;
6838
+ redeemWindowMs?: number;
6839
+ redeemPerIp?: number;
6840
+ }>>>;
6841
+ }, z.ZodTypeAny, "passthrough">>>>;
4667
6842
  }, z.ZodTypeAny, "passthrough">>>>;
4668
6843
  databaseSettings: z.ZodObject<{
4669
6844
  connectionTimeout: z.ZodNumber;
@@ -5140,6 +7315,38 @@ declare const configInfoSchema: z.ZodObject<{
5140
7315
  * every signed-in user may read every row of every entity.
5141
7316
  */
5142
7317
  recordDataBroadcastEntities: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodString, "many">>>;
7318
+ /**
7319
+ * Expiry, in seconds, of entries in the shared Redis cache (used when REDIS_URL is set). The
7320
+ * REDIS_TTL_SECONDS environment variable overrides it. 0 stores entries without expiry. When
7321
+ * neither is set, the Redis provider's default applies (one hour).
7322
+ */
7323
+ sharedCacheTTLSeconds: z.ZodOptional<z.ZodNumber>;
7324
+ /**
7325
+ * How often, in seconds, loaded engines compare their rows with the database and reload what
7326
+ * changed without an MJ event (direct SQL, other applications). With a shared cache one server
7327
+ * does it per interval. 0 = disabled. Default: 300 (5 minutes).
7328
+ */
7329
+ engineSweepIntervalSeconds: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
7330
+ /**
7331
+ * How often, in seconds, the user cache compares two row counts and the newest update timestamp
7332
+ * with the database and reloads only when they differ. The cache already refreshes on MJ writes
7333
+ * (locally and, with a shared cache, on other servers); this covers changes made outside MJ.
7334
+ * 0 = disabled. Default: 300 (5 minutes).
7335
+ */
7336
+ userCacheCheckIntervalSeconds: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
7337
+ /**
7338
+ * How often to compare this process's metadata with the database, in seconds (0 disables).
7339
+ * Costs nothing unless an entity the metadata is built from declares
7340
+ * `TrustServerCacheCompletely = false`; see `ProviderBase.SweepMetadataAgainstDatabase`.
7341
+ */
7342
+ metadataSweepIntervalSeconds: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
7343
+ /**
7344
+ * How long, in seconds, a server holds the shared warm-up turn while it loads its engines, so
7345
+ * servers starting together load one at a time and the rest find the cache warm. The lease is
7346
+ * renewed while the load runs; this value is both its expiry and how long another server waits
7347
+ * for it. 0 disables the turn-taking. Default: 30.
7348
+ */
7349
+ startupWarmupLeaseSeconds: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
5143
7350
  }, "strip", z.ZodTypeAny, {
5144
7351
  maxMemoryMB?: number;
5145
7352
  maxPercentOfCachePerEntity?: number;
@@ -5147,6 +7354,11 @@ declare const configInfoSchema: z.ZodObject<{
5147
7354
  evictionSweepIntervalSeconds?: number;
5148
7355
  verboseLogging?: boolean;
5149
7356
  recordDataBroadcastEntities?: string[];
7357
+ sharedCacheTTLSeconds?: number;
7358
+ engineSweepIntervalSeconds?: number;
7359
+ userCacheCheckIntervalSeconds?: number;
7360
+ metadataSweepIntervalSeconds?: number;
7361
+ startupWarmupLeaseSeconds?: number;
5150
7362
  }, {
5151
7363
  maxMemoryMB?: number;
5152
7364
  maxPercentOfCachePerEntity?: number;
@@ -5154,6 +7366,11 @@ declare const configInfoSchema: z.ZodObject<{
5154
7366
  evictionSweepIntervalSeconds?: number;
5155
7367
  verboseLogging?: boolean;
5156
7368
  recordDataBroadcastEntities?: string[];
7369
+ sharedCacheTTLSeconds?: number;
7370
+ engineSweepIntervalSeconds?: number;
7371
+ userCacheCheckIntervalSeconds?: number;
7372
+ metadataSweepIntervalSeconds?: number;
7373
+ startupWarmupLeaseSeconds?: number;
5157
7374
  }>>>;
5158
7375
  loggingSettings: z.ZodDefault<z.ZodOptional<z.ZodObject<{
5159
7376
  graphql: z.ZodDefault<z.ZodOptional<z.ZodObject<{
@@ -5368,6 +7585,10 @@ declare const configInfoSchema: z.ZodObject<{
5368
7585
  contextUserForNewUserCreation?: string;
5369
7586
  CreateUserApplicationRecords?: boolean;
5370
7587
  UserApplications?: string[];
7588
+ newUserTemplate?: {
7589
+ email?: string;
7590
+ preset?: string;
7591
+ };
5371
7592
  };
5372
7593
  magicLink?: {
5373
7594
  enabled?: boolean;
@@ -5501,6 +7722,37 @@ declare const configInfoSchema: z.ZodObject<{
5501
7722
  };
5502
7723
  realtime?: {
5503
7724
  enabled?: boolean;
7725
+ identityVerification?: {
7726
+ enabled?: boolean;
7727
+ communicationProvider?: string;
7728
+ fromAddress?: string;
7729
+ hmacSecret?: string;
7730
+ deliveryMode?: "send" | "dry-run";
7731
+ publicBaseUrl?: string;
7732
+ contextUserForVerification?: string;
7733
+ policy?: {
7734
+ requireBusinessDomain?: boolean;
7735
+ blockedDomains?: string[];
7736
+ consumerDomains?: string[];
7737
+ linkTtlMinutes?: number;
7738
+ maxSendsPerSession?: number;
7739
+ maxCodeAttempts?: number;
7740
+ unverifiedMaxSeconds?: number;
7741
+ verifiedMaxSeconds?: number;
7742
+ };
7743
+ rateLimits?: {
7744
+ sendWindowMs?: number;
7745
+ perIpSends?: number;
7746
+ perEmailDomainSends?: number;
7747
+ perEmailSends?: number;
7748
+ codeAttemptWindowMs?: number;
7749
+ perSessionCodeAttempts?: number;
7750
+ redeemWindowMs?: number;
7751
+ redeemPerIp?: number;
7752
+ };
7753
+ } & {
7754
+ [k: string]: unknown;
7755
+ };
5504
7756
  } & {
5505
7757
  [k: string]: unknown;
5506
7758
  };
@@ -5639,6 +7891,11 @@ declare const configInfoSchema: z.ZodObject<{
5639
7891
  evictionSweepIntervalSeconds?: number;
5640
7892
  verboseLogging?: boolean;
5641
7893
  recordDataBroadcastEntities?: string[];
7894
+ sharedCacheTTLSeconds?: number;
7895
+ engineSweepIntervalSeconds?: number;
7896
+ userCacheCheckIntervalSeconds?: number;
7897
+ metadataSweepIntervalSeconds?: number;
7898
+ startupWarmupLeaseSeconds?: number;
5642
7899
  };
5643
7900
  loggingSettings?: {
5644
7901
  graphql?: {
@@ -5712,6 +7969,10 @@ declare const configInfoSchema: z.ZodObject<{
5712
7969
  contextUserForNewUserCreation?: string;
5713
7970
  CreateUserApplicationRecords?: boolean;
5714
7971
  UserApplications?: string[];
7972
+ newUserTemplate?: {
7973
+ email?: string;
7974
+ preset?: string;
7975
+ };
5715
7976
  };
5716
7977
  magicLink?: {
5717
7978
  enabled?: string | number | boolean;
@@ -5845,6 +8106,37 @@ declare const configInfoSchema: z.ZodObject<{
5845
8106
  };
5846
8107
  realtime?: {
5847
8108
  enabled?: string | number | boolean;
8109
+ identityVerification?: {
8110
+ enabled?: string | number | boolean;
8111
+ communicationProvider?: string;
8112
+ fromAddress?: string;
8113
+ hmacSecret?: string;
8114
+ deliveryMode?: "send" | "dry-run";
8115
+ publicBaseUrl?: string;
8116
+ contextUserForVerification?: string;
8117
+ policy?: {
8118
+ requireBusinessDomain?: boolean;
8119
+ blockedDomains?: string[];
8120
+ consumerDomains?: string[];
8121
+ linkTtlMinutes?: number;
8122
+ maxSendsPerSession?: number;
8123
+ maxCodeAttempts?: number;
8124
+ unverifiedMaxSeconds?: number;
8125
+ verifiedMaxSeconds?: number;
8126
+ };
8127
+ rateLimits?: {
8128
+ sendWindowMs?: number;
8129
+ perIpSends?: number;
8130
+ perEmailDomainSends?: number;
8131
+ perEmailSends?: number;
8132
+ codeAttemptWindowMs?: number;
8133
+ perSessionCodeAttempts?: number;
8134
+ redeemWindowMs?: number;
8135
+ redeemPerIp?: number;
8136
+ };
8137
+ } & {
8138
+ [k: string]: unknown;
8139
+ };
5848
8140
  } & {
5849
8141
  [k: string]: unknown;
5850
8142
  };
@@ -5983,6 +8275,11 @@ declare const configInfoSchema: z.ZodObject<{
5983
8275
  evictionSweepIntervalSeconds?: number;
5984
8276
  verboseLogging?: boolean;
5985
8277
  recordDataBroadcastEntities?: string[];
8278
+ sharedCacheTTLSeconds?: number;
8279
+ engineSweepIntervalSeconds?: number;
8280
+ userCacheCheckIntervalSeconds?: number;
8281
+ metadataSweepIntervalSeconds?: number;
8282
+ startupWarmupLeaseSeconds?: number;
5986
8283
  };
5987
8284
  loggingSettings?: {
5988
8285
  graphql?: {
@@ -6048,6 +8345,7 @@ export type MagicLinkConfig = z.infer<typeof magicLinkSchema>;
6048
8345
  export type WidgetConfig = z.infer<typeof widgetSchema>;
6049
8346
  export type TelephonyConfig = z.infer<typeof telephonySchema>;
6050
8347
  export type RealtimeConfig = z.infer<typeof realtimeSchema>;
8348
+ export type IdentityVerificationConfig = z.infer<typeof identityVerificationSchema>;
6051
8349
  export type TwilioTelephonyConfig = z.infer<typeof twilioTelephonySchema>;
6052
8350
  export type VonageTelephonyConfig = z.infer<typeof vonageTelephonySchema>;
6053
8351
  export type RingCentralTelephonyConfig = z.infer<typeof ringcentralTelephonySchema>;
@@ -6120,6 +8418,10 @@ export declare function LoadConfig(): {
6120
8418
  contextUserForNewUserCreation?: string;
6121
8419
  CreateUserApplicationRecords?: boolean;
6122
8420
  UserApplications?: string[];
8421
+ newUserTemplate?: {
8422
+ email?: string;
8423
+ preset?: string;
8424
+ };
6123
8425
  };
6124
8426
  magicLink?: {
6125
8427
  enabled?: boolean;
@@ -6253,6 +8555,37 @@ export declare function LoadConfig(): {
6253
8555
  };
6254
8556
  realtime?: {
6255
8557
  enabled?: boolean;
8558
+ identityVerification?: {
8559
+ enabled?: boolean;
8560
+ communicationProvider?: string;
8561
+ fromAddress?: string;
8562
+ hmacSecret?: string;
8563
+ deliveryMode?: "send" | "dry-run";
8564
+ publicBaseUrl?: string;
8565
+ contextUserForVerification?: string;
8566
+ policy?: {
8567
+ requireBusinessDomain?: boolean;
8568
+ blockedDomains?: string[];
8569
+ consumerDomains?: string[];
8570
+ linkTtlMinutes?: number;
8571
+ maxSendsPerSession?: number;
8572
+ maxCodeAttempts?: number;
8573
+ unverifiedMaxSeconds?: number;
8574
+ verifiedMaxSeconds?: number;
8575
+ };
8576
+ rateLimits?: {
8577
+ sendWindowMs?: number;
8578
+ perIpSends?: number;
8579
+ perEmailDomainSends?: number;
8580
+ perEmailSends?: number;
8581
+ codeAttemptWindowMs?: number;
8582
+ perSessionCodeAttempts?: number;
8583
+ redeemWindowMs?: number;
8584
+ redeemPerIp?: number;
8585
+ };
8586
+ } & {
8587
+ [k: string]: unknown;
8588
+ };
6256
8589
  } & {
6257
8590
  [k: string]: unknown;
6258
8591
  };
@@ -6391,6 +8724,11 @@ export declare function LoadConfig(): {
6391
8724
  evictionSweepIntervalSeconds?: number;
6392
8725
  verboseLogging?: boolean;
6393
8726
  recordDataBroadcastEntities?: string[];
8727
+ sharedCacheTTLSeconds?: number;
8728
+ engineSweepIntervalSeconds?: number;
8729
+ userCacheCheckIntervalSeconds?: number;
8730
+ metadataSweepIntervalSeconds?: number;
8731
+ startupWarmupLeaseSeconds?: number;
6394
8732
  };
6395
8733
  loggingSettings?: {
6396
8734
  graphql?: {
@@ -6466,6 +8804,10 @@ export declare function loadConfig(): {
6466
8804
  contextUserForNewUserCreation?: string;
6467
8805
  CreateUserApplicationRecords?: boolean;
6468
8806
  UserApplications?: string[];
8807
+ newUserTemplate?: {
8808
+ email?: string;
8809
+ preset?: string;
8810
+ };
6469
8811
  };
6470
8812
  magicLink?: {
6471
8813
  enabled?: boolean;
@@ -6599,6 +8941,37 @@ export declare function loadConfig(): {
6599
8941
  };
6600
8942
  realtime?: {
6601
8943
  enabled?: boolean;
8944
+ identityVerification?: {
8945
+ enabled?: boolean;
8946
+ communicationProvider?: string;
8947
+ fromAddress?: string;
8948
+ hmacSecret?: string;
8949
+ deliveryMode?: "send" | "dry-run";
8950
+ publicBaseUrl?: string;
8951
+ contextUserForVerification?: string;
8952
+ policy?: {
8953
+ requireBusinessDomain?: boolean;
8954
+ blockedDomains?: string[];
8955
+ consumerDomains?: string[];
8956
+ linkTtlMinutes?: number;
8957
+ maxSendsPerSession?: number;
8958
+ maxCodeAttempts?: number;
8959
+ unverifiedMaxSeconds?: number;
8960
+ verifiedMaxSeconds?: number;
8961
+ };
8962
+ rateLimits?: {
8963
+ sendWindowMs?: number;
8964
+ perIpSends?: number;
8965
+ perEmailDomainSends?: number;
8966
+ perEmailSends?: number;
8967
+ codeAttemptWindowMs?: number;
8968
+ perSessionCodeAttempts?: number;
8969
+ redeemWindowMs?: number;
8970
+ redeemPerIp?: number;
8971
+ };
8972
+ } & {
8973
+ [k: string]: unknown;
8974
+ };
6602
8975
  } & {
6603
8976
  [k: string]: unknown;
6604
8977
  };
@@ -6737,6 +9110,11 @@ export declare function loadConfig(): {
6737
9110
  evictionSweepIntervalSeconds?: number;
6738
9111
  verboseLogging?: boolean;
6739
9112
  recordDataBroadcastEntities?: string[];
9113
+ sharedCacheTTLSeconds?: number;
9114
+ engineSweepIntervalSeconds?: number;
9115
+ userCacheCheckIntervalSeconds?: number;
9116
+ metadataSweepIntervalSeconds?: number;
9117
+ startupWarmupLeaseSeconds?: number;
6740
9118
  };
6741
9119
  loggingSettings?: {
6742
9120
  graphql?: {