@memberjunction/server 6.1.4 → 6.2.0-edge.1

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 (435) hide show
  1. package/dist/.tsbuildinfo +1 -1
  2. package/dist/agentSessions/ReturningVisitorRecap.d.ts +2 -0
  3. package/dist/agentSessions/ReturningVisitorRecap.d.ts.map +1 -1
  4. package/dist/agentSessions/ReturningVisitorRecap.js +5 -1
  5. package/dist/agentSessions/ReturningVisitorRecap.js.map +1 -1
  6. package/dist/agentSessions/SessionManager.js +2 -2
  7. package/dist/agentSessions/remoteBrowserGoalEngine.d.ts +8 -0
  8. package/dist/agentSessions/remoteBrowserGoalEngine.d.ts.map +1 -1
  9. package/dist/agentSessions/remoteBrowserGoalEngine.js +21 -5
  10. package/dist/agentSessions/remoteBrowserGoalEngine.js.map +1 -1
  11. package/dist/auth/AuthProviderCatalogRouter.d.ts +2 -0
  12. package/dist/auth/AuthProviderCatalogRouter.d.ts.map +1 -1
  13. package/dist/auth/AuthProviderCatalogRouter.js +5 -1
  14. package/dist/auth/AuthProviderCatalogRouter.js.map +1 -1
  15. package/dist/auth/exampleNewUserSubClass.js +2 -1
  16. package/dist/auth/exampleNewUserSubClass.js.map +1 -1
  17. package/dist/auth/index.d.ts +20 -1
  18. package/dist/auth/index.d.ts.map +1 -1
  19. package/dist/auth/index.js +20 -10
  20. package/dist/auth/index.js.map +1 -1
  21. package/dist/auth/initializeProviders.d.ts +8 -0
  22. package/dist/auth/initializeProviders.d.ts.map +1 -1
  23. package/dist/auth/initializeProviders.js +21 -5
  24. package/dist/auth/initializeProviders.js.map +1 -1
  25. package/dist/auth/magicLink/MagicLinkRouter.d.ts +9 -0
  26. package/dist/auth/magicLink/MagicLinkRouter.d.ts.map +1 -1
  27. package/dist/auth/magicLink/MagicLinkRouter.js +22 -10
  28. package/dist/auth/magicLink/MagicLinkRouter.js.map +1 -1
  29. package/dist/auth/magicLink/MagicLinkService.d.ts +17 -15
  30. package/dist/auth/magicLink/MagicLinkService.d.ts.map +1 -1
  31. package/dist/auth/magicLink/MagicLinkService.js +65 -51
  32. package/dist/auth/magicLink/MagicLinkService.js.map +1 -1
  33. package/dist/auth/magicLink/index.d.ts +2 -2
  34. package/dist/auth/magicLink/index.d.ts.map +1 -1
  35. package/dist/auth/magicLink/index.js +2 -2
  36. package/dist/auth/magicLink/index.js.map +1 -1
  37. package/dist/auth/magicLink/magicLinkCore.d.ts +54 -33
  38. package/dist/auth/magicLink/magicLinkCore.d.ts.map +1 -1
  39. package/dist/auth/magicLink/magicLinkCore.js +61 -61
  40. package/dist/auth/magicLink/magicLinkCore.js.map +1 -1
  41. package/dist/auth/magicLink/redeemLanding.d.ts +4 -0
  42. package/dist/auth/magicLink/redeemLanding.d.ts.map +1 -1
  43. package/dist/auth/magicLink/redeemLanding.js +12 -4
  44. package/dist/auth/magicLink/redeemLanding.js.map +1 -1
  45. package/dist/auth/magicLink/types.d.ts +4 -4
  46. package/dist/auth/principals.d.ts +2 -0
  47. package/dist/auth/principals.d.ts.map +1 -1
  48. package/dist/auth/principals.js +6 -2
  49. package/dist/auth/principals.js.map +1 -1
  50. package/dist/cache.d.ts +2 -0
  51. package/dist/cache.d.ts.map +1 -1
  52. package/dist/cache.js +3 -1
  53. package/dist/cache.js.map +1 -1
  54. package/dist/config.d.ts +293 -2
  55. package/dist/config.d.ts.map +1 -1
  56. package/dist/config.js +11 -4
  57. package/dist/config.js.map +1 -1
  58. package/dist/context.d.ts +20 -0
  59. package/dist/context.d.ts.map +1 -1
  60. package/dist/context.js +27 -19
  61. package/dist/context.js.map +1 -1
  62. package/dist/directives/Public.d.ts +2 -0
  63. package/dist/directives/Public.d.ts.map +1 -1
  64. package/dist/directives/Public.js +3 -1
  65. package/dist/directives/Public.js.map +1 -1
  66. package/dist/directives/RequireSystemUser.d.ts +2 -0
  67. package/dist/directives/RequireSystemUser.d.ts.map +1 -1
  68. package/dist/directives/RequireSystemUser.js +3 -1
  69. package/dist/directives/RequireSystemUser.js.map +1 -1
  70. package/dist/generated/graphql-schemas/__mj.d.ts +266 -4
  71. package/dist/generated/graphql-schemas/__mj.d.ts.map +1 -1
  72. package/dist/generated/graphql-schemas/__mj.js +1304 -0
  73. package/dist/generated/graphql-schemas/__mj.js.map +1 -1
  74. package/dist/generic/CacheInvalidationResolver.d.ts +8 -2
  75. package/dist/generic/CacheInvalidationResolver.d.ts.map +1 -1
  76. package/dist/generic/CacheInvalidationResolver.js +7 -3
  77. package/dist/generic/CacheInvalidationResolver.js.map +1 -1
  78. package/dist/generic/FireAndForgetHeartbeat.d.ts +3 -1
  79. package/dist/generic/FireAndForgetHeartbeat.d.ts.map +1 -1
  80. package/dist/generic/FireAndForgetHeartbeat.js +8 -4
  81. package/dist/generic/FireAndForgetHeartbeat.js.map +1 -1
  82. package/dist/generic/PushStatusResolver.d.ts +10 -1
  83. package/dist/generic/PushStatusResolver.d.ts.map +1 -1
  84. package/dist/generic/PushStatusResolver.js +11 -3
  85. package/dist/generic/PushStatusResolver.js.map +1 -1
  86. package/dist/generic/ResolverBase.d.ts +27 -1
  87. package/dist/generic/ResolverBase.d.ts.map +1 -1
  88. package/dist/generic/ResolverBase.js +64 -6
  89. package/dist/generic/ResolverBase.js.map +1 -1
  90. package/dist/index.d.ts +6 -0
  91. package/dist/index.d.ts.map +1 -1
  92. package/dist/index.js +29 -6
  93. package/dist/index.js.map +1 -1
  94. package/dist/integration/CustomColumnPromoter.d.ts +2 -0
  95. package/dist/integration/CustomColumnPromoter.d.ts.map +1 -1
  96. package/dist/integration/CustomColumnPromoter.js +5 -1
  97. package/dist/integration/CustomColumnPromoter.js.map +1 -1
  98. package/dist/integration/EntityMapLifecycle.d.ts +4 -0
  99. package/dist/integration/EntityMapLifecycle.d.ts.map +1 -1
  100. package/dist/integration/EntityMapLifecycle.js +10 -2
  101. package/dist/integration/EntityMapLifecycle.js.map +1 -1
  102. package/dist/logging/NoLog.d.ts +4 -0
  103. package/dist/logging/NoLog.d.ts.map +1 -1
  104. package/dist/logging/NoLog.js +10 -2
  105. package/dist/logging/NoLog.js.map +1 -1
  106. package/dist/logging/StartupLogger.d.ts +2 -0
  107. package/dist/logging/StartupLogger.d.ts.map +1 -1
  108. package/dist/logging/StartupLogger.js +5 -1
  109. package/dist/logging/StartupLogger.js.map +1 -1
  110. package/dist/logging/bootAudit.d.ts +11 -7
  111. package/dist/logging/bootAudit.d.ts.map +1 -1
  112. package/dist/logging/bootAudit.js +15 -7
  113. package/dist/logging/bootAudit.js.map +1 -1
  114. package/dist/logging/boundaryLogPayload.d.ts +4 -0
  115. package/dist/logging/boundaryLogPayload.d.ts.map +1 -1
  116. package/dist/logging/boundaryLogPayload.js +5 -1
  117. package/dist/logging/boundaryLogPayload.js.map +1 -1
  118. package/dist/logging/secretRedactor.d.ts +2 -0
  119. package/dist/logging/secretRedactor.d.ts.map +1 -1
  120. package/dist/logging/secretRedactor.js +8 -4
  121. package/dist/logging/secretRedactor.js.map +1 -1
  122. package/dist/logging/shortenForLog.d.ts +2 -0
  123. package/dist/logging/shortenForLog.d.ts.map +1 -1
  124. package/dist/logging/shortenForLog.js +7 -3
  125. package/dist/logging/shortenForLog.js.map +1 -1
  126. package/dist/logging/variablesLoggingMiddleware.d.ts +2 -0
  127. package/dist/logging/variablesLoggingMiddleware.d.ts.map +1 -1
  128. package/dist/logging/variablesLoggingMiddleware.js +8 -6
  129. package/dist/logging/variablesLoggingMiddleware.js.map +1 -1
  130. package/dist/metadataRefreshSignal.d.ts +19 -0
  131. package/dist/metadataRefreshSignal.d.ts.map +1 -0
  132. package/dist/metadataRefreshSignal.js +45 -0
  133. package/dist/metadataRefreshSignal.js.map +1 -0
  134. package/dist/middleware/MJTenantFilterMiddleware.js +4 -4
  135. package/dist/multiTenancy/index.d.ts +8 -0
  136. package/dist/multiTenancy/index.d.ts.map +1 -1
  137. package/dist/multiTenancy/index.js +21 -5
  138. package/dist/multiTenancy/index.js.map +1 -1
  139. package/dist/realtimeWidget/WidgetRouter.d.ts +5 -0
  140. package/dist/realtimeWidget/WidgetRouter.d.ts.map +1 -1
  141. package/dist/realtimeWidget/WidgetRouter.js +14 -10
  142. package/dist/realtimeWidget/WidgetRouter.js.map +1 -1
  143. package/dist/realtimeWidget/WidgetSessionService.d.ts +6 -6
  144. package/dist/realtimeWidget/WidgetSessionService.js +27 -27
  145. package/dist/realtimeWidget/host-identity.d.ts +5 -1
  146. package/dist/realtimeWidget/host-identity.d.ts.map +1 -1
  147. package/dist/realtimeWidget/host-identity.js +11 -3
  148. package/dist/realtimeWidget/host-identity.js.map +1 -1
  149. package/dist/realtimeWidget/index.d.ts +2 -2
  150. package/dist/realtimeWidget/index.d.ts.map +1 -1
  151. package/dist/realtimeWidget/index.js +2 -2
  152. package/dist/realtimeWidget/index.js.map +1 -1
  153. package/dist/realtimeWidget/visitorIdentity.d.ts +21 -1
  154. package/dist/realtimeWidget/visitorIdentity.d.ts.map +1 -1
  155. package/dist/realtimeWidget/visitorIdentity.js +16 -4
  156. package/dist/realtimeWidget/visitorIdentity.js.map +1 -1
  157. package/dist/realtimeWidget/widgetCore.d.ts +48 -0
  158. package/dist/realtimeWidget/widgetCore.d.ts.map +1 -1
  159. package/dist/realtimeWidget/widgetCore.js +38 -10
  160. package/dist/realtimeWidget/widgetCore.js.map +1 -1
  161. package/dist/realtimeWidget/widgetGuestElevation.d.ts +10 -6
  162. package/dist/realtimeWidget/widgetGuestElevation.d.ts.map +1 -1
  163. package/dist/realtimeWidget/widgetGuestElevation.js +14 -6
  164. package/dist/realtimeWidget/widgetGuestElevation.js.map +1 -1
  165. package/dist/resolvers/AdhocQueryResolver.js +3 -3
  166. package/dist/resolvers/FetchEntityVectorsResolver.js +2 -2
  167. package/dist/resolvers/FetchEntityVectorsResolver.js.map +1 -1
  168. package/dist/resolvers/FileResolver.js +3 -3
  169. package/dist/resolvers/GeoResolver.d.ts +2 -2
  170. package/dist/resolvers/GeoResolver.js +4 -4
  171. package/dist/resolvers/GetDataResolver.d.ts +14 -0
  172. package/dist/resolvers/GetDataResolver.d.ts.map +1 -1
  173. package/dist/resolvers/GetDataResolver.js +43 -15
  174. package/dist/resolvers/GetDataResolver.js.map +1 -1
  175. package/dist/resolvers/IntegrationDiscoveryResolver.js +2 -2
  176. package/dist/resolvers/ListOperationsResolver.d.ts +20 -0
  177. package/dist/resolvers/ListOperationsResolver.d.ts.map +1 -1
  178. package/dist/resolvers/ListOperationsResolver.js +68 -28
  179. package/dist/resolvers/ListOperationsResolver.js.map +1 -1
  180. package/dist/resolvers/MCPResolver.d.ts +11 -1
  181. package/dist/resolvers/MCPResolver.d.ts.map +1 -1
  182. package/dist/resolvers/MCPResolver.js +7 -3
  183. package/dist/resolvers/MCPResolver.js.map +1 -1
  184. package/dist/resolvers/QuerySystemUserResolver.d.ts.map +1 -1
  185. package/dist/resolvers/QuerySystemUserResolver.js +2 -1
  186. package/dist/resolvers/QuerySystemUserResolver.js.map +1 -1
  187. package/dist/resolvers/RealtimeBridgeResolver.js +3 -3
  188. package/dist/resolvers/RealtimeClientSessionResolver.d.ts +37 -0
  189. package/dist/resolvers/RealtimeClientSessionResolver.d.ts.map +1 -1
  190. package/dist/resolvers/RealtimeClientSessionResolver.js +101 -11
  191. package/dist/resolvers/RealtimeClientSessionResolver.js.map +1 -1
  192. package/dist/resolvers/RemoteBrowserActionResolver.js +5 -5
  193. package/dist/resolvers/RunAIAgentResolver.d.ts +10 -4
  194. package/dist/resolvers/RunAIAgentResolver.d.ts.map +1 -1
  195. package/dist/resolvers/RunAIAgentResolver.js +74 -42
  196. package/dist/resolvers/RunAIAgentResolver.js.map +1 -1
  197. package/dist/resolvers/RunAIPromptResolver.d.ts +1 -1
  198. package/dist/resolvers/RunAIPromptResolver.js +2 -2
  199. package/dist/resolvers/RunTestResolver.js +5 -5
  200. package/dist/resolvers/SearchEntitiesResolver.d.ts.map +1 -1
  201. package/dist/resolvers/SearchEntitiesResolver.js +3 -1
  202. package/dist/resolvers/SearchEntitiesResolver.js.map +1 -1
  203. package/dist/resolvers/SearchKnowledgeResolver.d.ts +1 -0
  204. package/dist/resolvers/SearchKnowledgeResolver.d.ts.map +1 -1
  205. package/dist/resolvers/SearchKnowledgeResolver.js +5 -0
  206. package/dist/resolvers/SearchKnowledgeResolver.js.map +1 -1
  207. package/dist/resolvers/SearchKnowledgeSystemUserResolver.d.ts.map +1 -1
  208. package/dist/resolvers/SearchKnowledgeSystemUserResolver.js +1 -0
  209. package/dist/resolvers/SearchKnowledgeSystemUserResolver.js.map +1 -1
  210. package/dist/resolvers/SqlLoggingConfigResolver.d.ts +8 -4
  211. package/dist/resolvers/SqlLoggingConfigResolver.d.ts.map +1 -1
  212. package/dist/resolvers/SqlLoggingConfigResolver.js +5 -5
  213. package/dist/resolvers/TaskGraphFrameResolver.d.ts +8 -1
  214. package/dist/resolvers/TaskGraphFrameResolver.d.ts.map +1 -1
  215. package/dist/resolvers/TaskGraphFrameResolver.js +6 -2
  216. package/dist/resolvers/TaskGraphFrameResolver.js.map +1 -1
  217. package/dist/resolvers/TransactionGroupResolver.d.ts.map +1 -1
  218. package/dist/resolvers/TransactionGroupResolver.js +53 -4
  219. package/dist/resolvers/TransactionGroupResolver.js.map +1 -1
  220. package/dist/resolvers/adhoc-query-helpers.d.ts +6 -0
  221. package/dist/resolvers/adhoc-query-helpers.d.ts.map +1 -1
  222. package/dist/resolvers/adhoc-query-helpers.js +10 -2
  223. package/dist/resolvers/adhoc-query-helpers.js.map +1 -1
  224. package/dist/resolvers/artifact-routing.d.ts +8 -8
  225. package/dist/resolvers/artifact-routing.js +2 -2
  226. package/dist/resolvers/artifact-routing.js.map +1 -1
  227. package/dist/resolvers/meetingRecordingRegistration.d.ts +10 -2
  228. package/dist/resolvers/meetingRecordingRegistration.d.ts.map +1 -1
  229. package/dist/resolvers/meetingRecordingRegistration.js +24 -8
  230. package/dist/resolvers/meetingRecordingRegistration.js.map +1 -1
  231. package/dist/resolvers/peaksSidecar.d.ts +4 -0
  232. package/dist/resolvers/peaksSidecar.d.ts.map +1 -1
  233. package/dist/resolvers/peaksSidecar.js +10 -2
  234. package/dist/resolvers/peaksSidecar.js.map +1 -1
  235. package/dist/rest/EntityCRUDHandler.d.ts +28 -0
  236. package/dist/rest/EntityCRUDHandler.d.ts.map +1 -1
  237. package/dist/rest/EntityCRUDHandler.js +20 -4
  238. package/dist/rest/EntityCRUDHandler.js.map +1 -1
  239. package/dist/rest/MediaStreamHandler.d.ts +2 -0
  240. package/dist/rest/MediaStreamHandler.d.ts.map +1 -1
  241. package/dist/rest/MediaStreamHandler.js +10 -6
  242. package/dist/rest/MediaStreamHandler.js.map +1 -1
  243. package/dist/rest/OAuthCallbackHandler.d.ts +9 -0
  244. package/dist/rest/OAuthCallbackHandler.d.ts.map +1 -1
  245. package/dist/rest/OAuthCallbackHandler.js +15 -3
  246. package/dist/rest/OAuthCallbackHandler.js.map +1 -1
  247. package/dist/rest/RESTEndpointHandler.d.ts +6 -4
  248. package/dist/rest/RESTEndpointHandler.d.ts.map +1 -1
  249. package/dist/rest/RESTEndpointHandler.js +15 -11
  250. package/dist/rest/RESTEndpointHandler.js.map +1 -1
  251. package/dist/rest/RealtimeSdpBrokerHandler.d.ts +5 -1
  252. package/dist/rest/RealtimeSdpBrokerHandler.d.ts.map +1 -1
  253. package/dist/rest/RealtimeSdpBrokerHandler.js +12 -4
  254. package/dist/rest/RealtimeSdpBrokerHandler.js.map +1 -1
  255. package/dist/rest/SignatureWebhookHandler.d.ts +2 -0
  256. package/dist/rest/SignatureWebhookHandler.d.ts.map +1 -1
  257. package/dist/rest/SignatureWebhookHandler.js +5 -1
  258. package/dist/rest/SignatureWebhookHandler.js.map +1 -1
  259. package/dist/rest/UploadTokenManager.d.ts +24 -8
  260. package/dist/rest/UploadTokenManager.d.ts.map +1 -1
  261. package/dist/rest/UploadTokenManager.js +53 -21
  262. package/dist/rest/UploadTokenManager.js.map +1 -1
  263. package/dist/rest/ViewOperationsHandler.d.ts +20 -0
  264. package/dist/rest/ViewOperationsHandler.d.ts.map +1 -1
  265. package/dist/rest/ViewOperationsHandler.js +20 -4
  266. package/dist/rest/ViewOperationsHandler.js.map +1 -1
  267. package/dist/rest/mediaRange.d.ts +4 -0
  268. package/dist/rest/mediaRange.d.ts.map +1 -1
  269. package/dist/rest/mediaRange.js +10 -2
  270. package/dist/rest/mediaRange.js.map +1 -1
  271. package/dist/rest/setupRESTEndpoints.d.ts +4 -0
  272. package/dist/rest/setupRESTEndpoints.d.ts.map +1 -1
  273. package/dist/rest/setupRESTEndpoints.js +13 -7
  274. package/dist/rest/setupRESTEndpoints.js.map +1 -1
  275. package/dist/serverExtensionReservedRoots.d.ts +2 -0
  276. package/dist/serverExtensionReservedRoots.d.ts.map +1 -1
  277. package/dist/serverExtensionReservedRoots.js +5 -1
  278. package/dist/serverExtensionReservedRoots.js.map +1 -1
  279. package/dist/services/MJStorageBlobStore.d.ts +41 -0
  280. package/dist/services/MJStorageBlobStore.d.ts.map +1 -0
  281. package/dist/services/MJStorageBlobStore.js +160 -0
  282. package/dist/services/MJStorageBlobStore.js.map +1 -0
  283. package/dist/services/TaskGraphActionRunner.d.ts +13 -8
  284. package/dist/services/TaskGraphActionRunner.d.ts.map +1 -1
  285. package/dist/services/TaskGraphActionRunner.js +16 -15
  286. package/dist/services/TaskGraphActionRunner.js.map +1 -1
  287. package/dist/types.d.ts +2 -0
  288. package/dist/types.d.ts.map +1 -1
  289. package/dist/types.js +7 -3
  290. package/dist/types.js.map +1 -1
  291. package/dist/util.d.ts +12 -3
  292. package/dist/util.d.ts.map +1 -1
  293. package/dist/util.js +19 -8
  294. package/dist/util.js.map +1 -1
  295. package/package.json +92 -92
  296. package/src/__tests__/FileResolverPeaks.test.ts +13 -13
  297. package/src/__tests__/ListOperationsResolver.test.ts +17 -17
  298. package/src/__tests__/MediaStreamHandler.test.ts +28 -28
  299. package/src/__tests__/NoLog.test.ts +11 -11
  300. package/src/__tests__/PrimaryKeyAlwaysMapped.test.ts +10 -10
  301. package/src/__tests__/RESTEndpointHandler.test.ts +14 -14
  302. package/src/__tests__/RealtimeBridgeResolver.test.ts +4 -2
  303. package/src/__tests__/RealtimeClientSessionResolver.test.ts +229 -0
  304. package/src/__tests__/RealtimeSdpBrokerHandler.test.ts +6 -6
  305. package/src/__tests__/RefreshAdoptsNewColumns.test.ts +8 -8
  306. package/src/__tests__/RemoteBrowserGoalEngine.test.ts +18 -18
  307. package/src/__tests__/ResolverBase.isaPromotionCreate.test.ts +412 -0
  308. package/src/__tests__/RunAIAgentResolver.historyFrom.test.ts +228 -0
  309. package/src/__tests__/SearchEntitiesResolver.readOnlyFallback.test.ts +78 -0
  310. package/src/__tests__/TaskGraphActionRunner.durablePayload.test.ts +129 -0
  311. package/src/__tests__/TaskGraphFrameResolver.test.ts +2 -2
  312. package/src/__tests__/TransactionGroupResolver.refusals.test.ts +290 -0
  313. package/src/__tests__/WidgetSessionService.test.ts +8 -4
  314. package/src/__tests__/adhoc-query-helpers.test.ts +21 -21
  315. package/src/__tests__/bootAudit.test.ts +11 -11
  316. package/src/__tests__/boundaryLogPayload.test.ts +6 -6
  317. package/src/__tests__/databaseAbstraction.test.ts +12 -6
  318. package/src/__tests__/getDataTokenRedaction.test.ts +7 -7
  319. package/src/__tests__/initializeProviders.refresh.test.ts +4 -4
  320. package/src/__tests__/magicLink.test.ts +73 -134
  321. package/src/__tests__/magicLinkService.consume.test.ts +224 -0
  322. package/src/__tests__/meetingRecordingRegistration.test.ts +12 -12
  323. package/src/__tests__/metadataRefreshSignal.test.ts +78 -0
  324. package/src/__tests__/multiTenancy.security.test.ts +40 -40
  325. package/src/__tests__/multiTenancy.test.ts +18 -18
  326. package/src/__tests__/newUsers.test.ts +24 -23
  327. package/src/__tests__/principals.test.ts +22 -22
  328. package/src/__tests__/pushStatusResolver.filter.test.ts +8 -8
  329. package/src/__tests__/secretRedactor.failOpen.test.ts +12 -12
  330. package/src/__tests__/secretRedactor.test.ts +12 -12
  331. package/src/__tests__/serverExtensionReservedRoots.test.ts +7 -7
  332. package/src/__tests__/subscriptionRedaction.test.ts +5 -5
  333. package/src/__tests__/unifiedAuth.test.ts +15 -9
  334. package/src/__tests__/visitorIdentity.resolve.test.ts +6 -6
  335. package/src/__tests__/widget.test.ts +45 -45
  336. package/src/__tests__/widgetGuestElevation.test.ts +7 -7
  337. package/src/__tests__/widgetHostIdentity.test.ts +14 -14
  338. package/src/agentSessions/ReturningVisitorRecap.ts +12 -1
  339. package/src/agentSessions/SessionManager.ts +2 -2
  340. package/src/agentSessions/remoteBrowserGoalEngine.ts +30 -5
  341. package/src/auth/AuthProviderCatalogRouter.ts +6 -1
  342. package/src/auth/__tests__/backward-compatibility.test.ts +3 -3
  343. package/src/auth/exampleNewUserSubClass.ts +2 -2
  344. package/src/auth/index.ts +43 -28
  345. package/src/auth/initializeProviders.ts +25 -5
  346. package/src/auth/magicLink/MagicLinkRouter.ts +28 -10
  347. package/src/auth/magicLink/MagicLinkService.ts +71 -52
  348. package/src/auth/magicLink/index.ts +7 -7
  349. package/src/auth/magicLink/magicLinkCore.ts +96 -64
  350. package/src/auth/magicLink/redeemLanding.ts +14 -4
  351. package/src/auth/magicLink/types.ts +54 -54
  352. package/src/auth/newUsers.ts +1 -1
  353. package/src/auth/principals.ts +11 -2
  354. package/src/cache.ts +4 -1
  355. package/src/config.ts +14 -4
  356. package/src/context.ts +37 -24
  357. package/src/directives/Public.ts +4 -1
  358. package/src/directives/RequireSystemUser.ts +4 -1
  359. package/src/generated/graphql-schemas/__mj.ts +933 -5
  360. package/src/generic/CacheInvalidationResolver.ts +12 -4
  361. package/src/generic/FireAndForgetHeartbeat.ts +19 -14
  362. package/src/generic/PushStatusResolver.ts +21 -7
  363. package/src/generic/ResolverBase.ts +66 -5
  364. package/src/generic/RunViewResolver.ts +22 -22
  365. package/src/generic/__tests__/FireAndForgetHeartbeat.test.ts +7 -7
  366. package/src/index.ts +34 -7
  367. package/src/integration/CustomColumnPromoter.ts +6 -1
  368. package/src/integration/EntityMapLifecycle.ts +20 -2
  369. package/src/logging/NoLog.ts +16 -2
  370. package/src/logging/StartupLogger.ts +6 -1
  371. package/src/logging/bootAudit.ts +26 -16
  372. package/src/logging/boundaryLogPayload.ts +8 -1
  373. package/src/logging/secretRedactor.ts +14 -9
  374. package/src/logging/shortenForLog.ts +8 -3
  375. package/src/logging/variablesLoggingMiddleware.ts +9 -6
  376. package/src/metadataRefreshSignal.ts +45 -0
  377. package/src/middleware/MJTenantFilterMiddleware.ts +4 -4
  378. package/src/multiTenancy/index.ts +29 -5
  379. package/src/realtimeWidget/WidgetRouter.ts +15 -10
  380. package/src/realtimeWidget/WidgetSessionService.ts +76 -76
  381. package/src/realtimeWidget/host-identity.ts +24 -10
  382. package/src/realtimeWidget/index.ts +3 -3
  383. package/src/realtimeWidget/visitorIdentity.ts +39 -8
  384. package/src/realtimeWidget/widgetCore.ts +75 -10
  385. package/src/realtimeWidget/widgetGuestElevation.ts +25 -12
  386. package/src/resolvers/AdhocQueryResolver.ts +3 -3
  387. package/src/resolvers/AgentSessionResolver.ts +3 -3
  388. package/src/resolvers/ColorResolver.ts +6 -6
  389. package/src/resolvers/ComponentRegistryResolver.ts +36 -36
  390. package/src/resolvers/EntityCommunicationsResolver.ts +4 -4
  391. package/src/resolvers/ExecuteRemoteOperationResolver.ts +9 -9
  392. package/src/resolvers/FetchEntityVectorsResolver.ts +2 -2
  393. package/src/resolvers/FileResolver.ts +42 -42
  394. package/src/resolvers/GeoResolver.ts +4 -4
  395. package/src/resolvers/GetDataResolver.ts +50 -15
  396. package/src/resolvers/IntegrationDiscoveryResolver.ts +2 -2
  397. package/src/resolvers/ListOperationsResolver.ts +78 -28
  398. package/src/resolvers/MCPResolver.ts +30 -15
  399. package/src/resolvers/QueryResolver.ts +13 -13
  400. package/src/resolvers/QuerySystemUserResolver.ts +2 -1
  401. package/src/resolvers/RealtimeBridgeResolver.ts +3 -3
  402. package/src/resolvers/RealtimeClientSessionResolver.ts +126 -13
  403. package/src/resolvers/RemoteBrowserActionResolver.ts +5 -5
  404. package/src/resolvers/RunAIAgentResolver.ts +118 -76
  405. package/src/resolvers/RunAIPromptResolver.ts +22 -22
  406. package/src/resolvers/RunTemplateResolver.ts +4 -4
  407. package/src/resolvers/RunTestResolver.ts +25 -25
  408. package/src/resolvers/SearchEntitiesResolver.ts +3 -1
  409. package/src/resolvers/SearchKnowledgeResolver.ts +4 -0
  410. package/src/resolvers/SearchKnowledgeSystemUserResolver.ts +1 -0
  411. package/src/resolvers/SqlLoggingConfigResolver.ts +56 -56
  412. package/src/resolvers/TaskGraphFrameResolver.ts +37 -28
  413. package/src/resolvers/TelemetryResolver.ts +79 -79
  414. package/src/resolvers/TransactionGroupResolver.ts +57 -4
  415. package/src/resolvers/__tests__/GetDataResolver.tokens.test.ts +40 -38
  416. package/src/resolvers/__tests__/artifact-routing.test.ts +23 -23
  417. package/src/resolvers/adhoc-query-helpers.ts +19 -2
  418. package/src/resolvers/artifact-routing.ts +19 -19
  419. package/src/resolvers/meetingRecordingRegistration.ts +44 -10
  420. package/src/resolvers/peaksSidecar.ts +12 -2
  421. package/src/rest/EntityCRUDHandler.ts +24 -4
  422. package/src/rest/MediaStreamHandler.ts +11 -6
  423. package/src/rest/OAuthCallbackHandler.ts +25 -7
  424. package/src/rest/RESTEndpointHandler.ts +20 -15
  425. package/src/rest/RealtimeSdpBrokerHandler.ts +14 -4
  426. package/src/rest/SignatureWebhookHandler.ts +6 -1
  427. package/src/rest/UploadTokenManager.ts +66 -30
  428. package/src/rest/ViewOperationsHandler.ts +24 -4
  429. package/src/rest/mediaRange.ts +16 -6
  430. package/src/rest/setupRESTEndpoints.ts +24 -12
  431. package/src/serverExtensionReservedRoots.ts +6 -1
  432. package/src/services/MJStorageBlobStore.ts +209 -0
  433. package/src/services/TaskGraphActionRunner.ts +16 -15
  434. package/src/types.ts +21 -16
  435. package/src/util.ts +22 -9
@@ -42,7 +42,7 @@ import { GetReadOnlyProvider } from '../util.js';
42
42
  import { configInfo } from '../config.js';
43
43
  import { MediaAccessKeyManager } from '../rest/MediaAccessKeys.js';
44
44
  import { UploadTokenManager } from '../rest/UploadTokenManager.js';
45
- import { deriveSidecarPath, parsePeaksSidecar } from './peaksSidecar.js';
45
+ import { DeriveSidecarPath, ParsePeaksSidecar } from './peaksSidecar.js';
46
46
 
47
47
  @InputType()
48
48
  export class CreateUploadURLInput {
@@ -126,40 +126,40 @@ export class FileExt extends MJFile_ {
126
126
  @ObjectType()
127
127
  export class StorageObjectMetadata {
128
128
  @Field(() => String)
129
- name: string;
129
+ name: string; // case-violation-ok-legacy-back-compat: the property name is the GraphQL schema field name — renaming it breaks every client query
130
130
 
131
131
  @Field(() => String)
132
- path: string;
132
+ path: string; // case-violation-ok-legacy-back-compat: the property name is the GraphQL schema field name — renaming it breaks every client query
133
133
 
134
134
  @Field(() => String)
135
- fullPath: string;
135
+ fullPath: string; // case-violation-ok-legacy-back-compat: the property name is the GraphQL schema field name — renaming it breaks every client query
136
136
 
137
137
  @Field(() => Int)
138
- size: number;
138
+ size: number; // case-violation-ok-legacy-back-compat: the property name is the GraphQL schema field name — renaming it breaks every client query
139
139
 
140
140
  @Field(() => String)
141
- contentType: string;
141
+ contentType: string; // case-violation-ok-legacy-back-compat: the property name is the GraphQL schema field name — renaming it breaks every client query
142
142
 
143
143
  @Field(() => String)
144
- lastModified: string;
144
+ lastModified: string; // case-violation-ok-legacy-back-compat: the property name is the GraphQL schema field name — renaming it breaks every client query
145
145
 
146
146
  @Field(() => Boolean)
147
- isDirectory: boolean;
147
+ isDirectory: boolean; // case-violation-ok-legacy-back-compat: the property name is the GraphQL schema field name — renaming it breaks every client query
148
148
 
149
149
  @Field(() => String, { nullable: true })
150
- etag?: string;
150
+ etag?: string; // case-violation-ok-legacy-back-compat: the property name is the GraphQL schema field name — renaming it breaks every client query
151
151
 
152
152
  @Field(() => String, { nullable: true })
153
- cacheControl?: string;
153
+ cacheControl?: string; // case-violation-ok-legacy-back-compat: the property name is the GraphQL schema field name — renaming it breaks every client query
154
154
  }
155
155
 
156
156
  @ObjectType()
157
157
  export class StorageListResult {
158
158
  @Field(() => [StorageObjectMetadata])
159
- objects: StorageObjectMetadata[];
159
+ objects: StorageObjectMetadata[]; // case-violation-ok-legacy-back-compat: the property name is the GraphQL schema field name — renaming it breaks every client query
160
160
 
161
161
  @Field(() => [String])
162
- prefixes: string[];
162
+ prefixes: string[]; // case-violation-ok-legacy-back-compat: the property name is the GraphQL schema field name — renaming it breaks every client query
163
163
  }
164
164
 
165
165
  @InputType()
@@ -264,25 +264,25 @@ export class CopyObjectBetweenAccountsInput {
264
264
  @ObjectType()
265
265
  export class CopyObjectBetweenAccountsPayload {
266
266
  @Field(() => Boolean)
267
- success: boolean;
267
+ success: boolean; // case-violation-ok-legacy-back-compat: the property name is the GraphQL schema field name — renaming it breaks every client query
268
268
 
269
269
  @Field(() => String)
270
- message: string;
270
+ message: string; // case-violation-ok-legacy-back-compat: the property name is the GraphQL schema field name — renaming it breaks every client query
271
271
 
272
272
  @Field(() => Int, { nullable: true })
273
- bytesTransferred?: number;
273
+ bytesTransferred?: number; // case-violation-ok-legacy-back-compat: the property name is the GraphQL schema field name — renaming it breaks every client query
274
274
 
275
275
  @Field(() => String)
276
- sourceAccount: string;
276
+ sourceAccount: string; // case-violation-ok-legacy-back-compat: the property name is the GraphQL schema field name — renaming it breaks every client query
277
277
 
278
278
  @Field(() => String)
279
- destinationAccount: string;
279
+ destinationAccount: string; // case-violation-ok-legacy-back-compat: the property name is the GraphQL schema field name — renaming it breaks every client query
280
280
 
281
281
  @Field(() => String)
282
- sourcePath: string;
282
+ sourcePath: string; // case-violation-ok-legacy-back-compat: the property name is the GraphQL schema field name — renaming it breaks every client query
283
283
 
284
284
  @Field(() => String)
285
- destinationPath: string;
285
+ destinationPath: string; // case-violation-ok-legacy-back-compat: the property name is the GraphQL schema field name — renaming it breaks every client query
286
286
  }
287
287
 
288
288
  @InputType()
@@ -306,73 +306,73 @@ export class SearchAcrossAccountsInput {
306
306
  @ObjectType()
307
307
  export class FileSearchResultPayload {
308
308
  @Field(() => String)
309
- path: string;
309
+ path: string; // case-violation-ok-legacy-back-compat: the property name is the GraphQL schema field name — renaming it breaks every client query
310
310
 
311
311
  @Field(() => String)
312
- name: string;
312
+ name: string; // case-violation-ok-legacy-back-compat: the property name is the GraphQL schema field name — renaming it breaks every client query
313
313
 
314
314
  @Field(() => Int)
315
- size: number;
315
+ size: number; // case-violation-ok-legacy-back-compat: the property name is the GraphQL schema field name — renaming it breaks every client query
316
316
 
317
317
  @Field(() => String)
318
- contentType: string;
318
+ contentType: string; // case-violation-ok-legacy-back-compat: the property name is the GraphQL schema field name — renaming it breaks every client query
319
319
 
320
320
  @Field(() => String)
321
- lastModified: string;
321
+ lastModified: string; // case-violation-ok-legacy-back-compat: the property name is the GraphQL schema field name — renaming it breaks every client query
322
322
 
323
323
  @Field(() => Number, { nullable: true })
324
- relevance?: number;
324
+ relevance?: number; // case-violation-ok-legacy-back-compat: the property name is the GraphQL schema field name — renaming it breaks every client query
325
325
 
326
326
  @Field(() => String, { nullable: true })
327
- excerpt?: string;
327
+ excerpt?: string; // case-violation-ok-legacy-back-compat: the property name is the GraphQL schema field name — renaming it breaks every client query
328
328
 
329
329
  @Field(() => Boolean, { nullable: true })
330
- matchInFilename?: boolean;
330
+ matchInFilename?: boolean; // case-violation-ok-legacy-back-compat: the property name is the GraphQL schema field name — renaming it breaks every client query
331
331
 
332
332
  @Field(() => String, { nullable: true })
333
- objectId?: string;
333
+ objectId?: string; // case-violation-ok-legacy-back-compat: the property name is the GraphQL schema field name — renaming it breaks every client query
334
334
  }
335
335
 
336
336
  @ObjectType()
337
337
  export class AccountSearchResultPayload {
338
338
  @Field(() => String)
339
- accountID: string;
339
+ accountID: string; // case-violation-ok-legacy-back-compat: the property name is the GraphQL schema field name — renaming it breaks every client query
340
340
 
341
341
  @Field(() => String)
342
- accountName: string;
342
+ accountName: string; // case-violation-ok-legacy-back-compat: the property name is the GraphQL schema field name — renaming it breaks every client query
343
343
 
344
344
  @Field(() => Boolean)
345
- success: boolean;
345
+ success: boolean; // case-violation-ok-legacy-back-compat: the property name is the GraphQL schema field name — renaming it breaks every client query
346
346
 
347
347
  @Field(() => String, { nullable: true })
348
- errorMessage?: string;
348
+ errorMessage?: string; // case-violation-ok-legacy-back-compat: the property name is the GraphQL schema field name — renaming it breaks every client query
349
349
 
350
350
  @Field(() => [FileSearchResultPayload])
351
- results: FileSearchResultPayload[];
351
+ results: FileSearchResultPayload[]; // case-violation-ok-legacy-back-compat: the property name is the GraphQL schema field name — renaming it breaks every client query
352
352
 
353
353
  @Field(() => Int, { nullable: true })
354
- totalMatches?: number;
354
+ totalMatches?: number; // case-violation-ok-legacy-back-compat: the property name is the GraphQL schema field name — renaming it breaks every client query
355
355
 
356
356
  @Field(() => Boolean)
357
- hasMore: boolean;
357
+ hasMore: boolean; // case-violation-ok-legacy-back-compat: the property name is the GraphQL schema field name — renaming it breaks every client query
358
358
 
359
359
  @Field(() => String, { nullable: true })
360
- nextPageToken?: string;
360
+ nextPageToken?: string; // case-violation-ok-legacy-back-compat: the property name is the GraphQL schema field name — renaming it breaks every client query
361
361
  }
362
362
 
363
363
  @ObjectType()
364
364
  export class SearchAcrossAccountsPayload {
365
365
  @Field(() => [AccountSearchResultPayload])
366
- accountResults: AccountSearchResultPayload[];
366
+ accountResults: AccountSearchResultPayload[]; // case-violation-ok-legacy-back-compat: the property name is the GraphQL schema field name — renaming it breaks every client query
367
367
 
368
368
  @Field(() => Int)
369
- totalResultsReturned: number;
369
+ totalResultsReturned: number; // case-violation-ok-legacy-back-compat: the property name is the GraphQL schema field name — renaming it breaks every client query
370
370
 
371
371
  @Field(() => Int)
372
- successfulAccounts: number;
372
+ successfulAccounts: number; // case-violation-ok-legacy-back-compat: the property name is the GraphQL schema field name — renaming it breaks every client query
373
373
 
374
374
  @Field(() => Int)
375
- failedAccounts: number;
375
+ failedAccounts: number; // case-violation-ok-legacy-back-compat: the property name is the GraphQL schema field name — renaming it breaks every client query
376
376
  }
377
377
 
378
378
  /**
@@ -503,7 +503,7 @@ export class FileResolver extends FileResolverBase {
503
503
  private async tryReadPeaksSidecar(file: MJFileEntity, contextUser: UserInfo): Promise<number[] | undefined> {
504
504
  try {
505
505
  // The sidecar lives next to the recording: replace the final path segment with peaks.json.
506
- const sidecarPath = deriveSidecarPath(file.ProviderKey);
506
+ const sidecarPath = DeriveSidecarPath(file.ProviderKey);
507
507
  if (!sidecarPath) {
508
508
  return undefined;
509
509
  }
@@ -524,7 +524,7 @@ export class FileResolver extends FileResolverBase {
524
524
  if (!bytes || bytes.length === 0) {
525
525
  return undefined;
526
526
  }
527
- return parsePeaksSidecar(bytes);
527
+ return ParsePeaksSidecar(bytes);
528
528
  } catch {
529
529
  // No sidecar / unreadable / parse failure — peaks are optional, never surface the error.
530
530
  return undefined;
@@ -98,7 +98,7 @@ export class GeoResolver extends ResolverBase {
98
98
  /**
99
99
  * Lazily load all countries into memory (~250 records).
100
100
  */
101
- private async GetCountries(contextUser: UserInfo | undefined): Promise<MJCountryEntity[]> {
101
+ private async getCountries(contextUser: UserInfo | undefined): Promise<MJCountryEntity[]> {
102
102
  if (this._countries) return this._countries;
103
103
  const rv = new RunView();
104
104
  const result = await rv.RunView<MJCountryEntity>({
@@ -114,7 +114,7 @@ export class GeoResolver extends ResolverBase {
114
114
  /**
115
115
  * Lazily load all state/provinces into memory (~5000 records).
116
116
  */
117
- private async GetStates(contextUser: UserInfo | undefined): Promise<MJStateProvinceEntity[]> {
117
+ private async getStates(contextUser: UserInfo | undefined): Promise<MJStateProvinceEntity[]> {
118
118
  if (this._states) return this._states;
119
119
  const rv = new RunView();
120
120
  const result = await rv.RunView<MJStateProvinceEntity>({
@@ -138,7 +138,7 @@ export class GeoResolver extends ResolverBase {
138
138
  ): Promise<GeoResolveResult> {
139
139
  try {
140
140
  const user = this.GetUserFromPayload(userPayload);
141
- const countries = await this.GetCountries(user);
141
+ const countries = await this.getCountries(user);
142
142
  const normalized = input.trim().toLowerCase();
143
143
 
144
144
  // 1. Exact match on Name, ISO2, ISO3
@@ -204,7 +204,7 @@ export class GeoResolver extends ResolverBase {
204
204
  return { Success: false, ErrorMessage: `Could not resolve country "${countryInput}"` };
205
205
  }
206
206
 
207
- const states = await this.GetStates(user);
207
+ const states = await this.getStates(user);
208
208
  const countryStates = states.filter(s => s.CountryID === countryResult.CountryID);
209
209
  const normalized = stateInput.trim().toLowerCase();
210
210
 
@@ -6,8 +6,8 @@ import { RequireSystemUser } from '../directives/RequireSystemUser.js';
6
6
  import { NoLog } from '../logging/NoLog.js';
7
7
  import { v4 as uuidv4 } from 'uuid';
8
8
  import { GetReadOnlyDataSource, GetReadOnlyProvider } from '../util.js';
9
- import { getDbType } from '../index.js';
10
- import { getSystemUser } from '../auth/index.js';
9
+ import { GetDbType } from '../index.js';
10
+ import { GetSystemUser } from '../auth/index.js';
11
11
  import sql from 'mssql';
12
12
 
13
13
  @InputType()
@@ -125,7 +125,7 @@ export class GetDataResolver {
125
125
  LogStatus(`GetData invoked: ${input.Queries.length} queries`);
126
126
 
127
127
  // validate the token
128
- if (!isTokenValid(input.Token)) {
128
+ if (!IsTokenValid(input.Token)) {
129
129
  throw new Error(`Token ${input.Token} is not valid or has expired`);
130
130
  }
131
131
 
@@ -139,8 +139,8 @@ export class GetDataResolver {
139
139
  // Queries may contain {{query:"CategoryPath/QueryName(params)"}} tokens that
140
140
  // reference reusable queries. These must be resolved to CTEs before raw SQL execution.
141
141
  const compositionEngine = new QueryCompositionEngine();
142
- const platform = getDbType();
143
- const systemUser = await getSystemUser();
142
+ const platform = GetDbType();
143
+ const systemUser = await GetSystemUser();
144
144
 
145
145
  // Execute all queries in parallel, but execute each individual query in its own try catch block so that if one fails, the others can still be processed
146
146
  // and also so that we can capture the error message for each query and return it
@@ -204,7 +204,7 @@ export class GetDataResolver {
204
204
  Queries: input.Queries,
205
205
  ErrorMessages: errorMessages }
206
206
 
207
- recordTokenUse(input.Token, {request: input, results: returnVal});
207
+ RecordTokenUse(input.Token, {request: input, results: returnVal});
208
208
 
209
209
  // Success below is derived from having no errorMessages, check that array
210
210
  return returnVal;
@@ -296,7 +296,7 @@ const __defaultTokenLifeSpan = 1000 * 60 * 5; // 5 minutes
296
296
  * Critical finding).
297
297
  * @param now injectable for tests; defaults to the real current time
298
298
  */
299
- export function pruneExpiredTokens(now: Date = new Date()): void {
299
+ export function PruneExpiredTokens(now: Date = new Date()): void {
300
300
  for (let i = __accessTokens.length - 1; i >= 0; i--) {
301
301
  if (__accessTokens[i].ExpiresAt <= now) {
302
302
  __accessTokens.splice(i, 1);
@@ -304,17 +304,27 @@ export function pruneExpiredTokens(now: Date = new Date()): void {
304
304
  }
305
305
  }
306
306
 
307
+ /** @deprecated Use {@link PruneExpiredTokens}. */
308
+ export function pruneExpiredTokens(now: Date = new Date()): void {
309
+ return PruneExpiredTokens(now);
310
+ }
311
+
307
312
  /** Number of tokens currently tracked (post-sweep, at last mutation). Exposed for tests/diagnostics. */
308
- export function getAccessTokenCount(): number {
313
+ export function GetAccessTokenCount(): number {
309
314
  return __accessTokens.length;
310
315
  }
311
316
 
312
- export function registerAccessToken(token?: string, lifeSpan: number = __defaultTokenLifeSpan, requestorPayload?: any): GetDataAccessToken {
313
- pruneExpiredTokens();
317
+ /** @deprecated Use {@link GetAccessTokenCount}. */
318
+ export function getAccessTokenCount(): number {
319
+ return GetAccessTokenCount();
320
+ }
321
+
322
+ export function RegisterAccessToken(token?: string, lifeSpan: number = __defaultTokenLifeSpan, requestorPayload?: any): GetDataAccessToken {
323
+ PruneExpiredTokens();
314
324
 
315
325
  const tokenToUse = token || uuidv4();
316
326
 
317
- if (tokenExists(tokenToUse)) {
327
+ if (TokenExists(tokenToUse)) {
318
328
  // should never happen if we used the uuidv4() function but could happen if someone tries to use a custom token
319
329
  throw new Error(`Token ${tokenToUse} already exists`);
320
330
  }
@@ -327,7 +337,12 @@ export function registerAccessToken(token?: string, lifeSpan: number = __default
327
337
  __accessTokens.push(newToken);
328
338
  return newToken;
329
339
  }
330
- export function deleteAccessToken(token: string) {
340
+
341
+ /** @deprecated Use {@link RegisterAccessToken}. */
342
+ export function registerAccessToken(token?: string, lifeSpan: number = __defaultTokenLifeSpan, requestorPayload?: any): GetDataAccessToken {
343
+ return RegisterAccessToken(token, lifeSpan, requestorPayload);
344
+ }
345
+ export function DeleteAccessToken(token: string) {
331
346
  const index = __accessTokens.findIndex((t) => t.Token === token);
332
347
  if (index >= 0) {
333
348
  __accessTokens.splice(index, 1);
@@ -336,17 +351,32 @@ export function deleteAccessToken(token: string) {
336
351
  throw new Error(`Token ${token} does not exist`);
337
352
  }
338
353
  }
339
- export function tokenExists(token: string) {
354
+
355
+ /** @deprecated Use {@link DeleteAccessToken}. */
356
+ export function deleteAccessToken(token: string) {
357
+ return DeleteAccessToken(token);
358
+ }
359
+ export function TokenExists(token: string) {
340
360
  return __accessTokens.find((t) => t.Token === token) !== undefined;
341
361
  }
342
- export function isTokenValid(token: string) {
362
+
363
+ /** @deprecated Use {@link TokenExists}. */
364
+ export function tokenExists(token: string) {
365
+ return TokenExists(token);
366
+ }
367
+ export function IsTokenValid(token: string) {
343
368
  const t = __accessTokens.find((t) => t.Token === token);
344
369
  if (t) {
345
370
  return t.ExpiresAt > new Date();
346
371
  }
347
372
  return false;
373
+ }
374
+
375
+ /** @deprecated Use {@link IsTokenValid}. */
376
+ export function isTokenValid(token: string) {
377
+ return IsTokenValid(token);
348
378
  }
349
- export function recordTokenUse(token: string, usePayload: any) {
379
+ export function RecordTokenUse(token: string, usePayload: any) {
350
380
  const t = __accessTokens.find((t) => t.Token === token);
351
381
  if (t) {
352
382
  if (!t.TokenUses) {
@@ -358,3 +388,8 @@ export function recordTokenUse(token: string, usePayload: any) {
358
388
  throw new Error(`Token ${token} does not exist`);
359
389
  }
360
390
  }
391
+
392
+ /** @deprecated Use {@link RecordTokenUse}. */
393
+ export function recordTokenUse(token: string, usePayload: any) {
394
+ return RecordTokenUse(token, usePayload);
395
+ }
@@ -56,7 +56,7 @@ import { IntegrationProgressEmitter, IntegrationProgressReader } from "@memberju
56
56
  import type { IntegrationRunSnapshot, IntegrationRunKind } from "@memberjunction/integration-progress-artifacts";
57
57
  import { ResolverBase } from "../generic/ResolverBase.js";
58
58
  import { IntegrationCustomColumnPromoter } from "../integration/CustomColumnPromoter.js";
59
- import { ComputeCascadeRemovalSet, ComputeRemovedDependencyWarnings, decideFieldMapReconcile, DisableUnselectedEntityMaps, ReenableFieldMapsForEntityMap, ResetPullWatermarks, SetEntityMapEnabled } from "../integration/EntityMapLifecycle.js";
59
+ import { ComputeCascadeRemovalSet, ComputeRemovedDependencyWarnings, DecideFieldMapReconcile, DisableUnselectedEntityMaps, ReenableFieldMapsForEntityMap, ResetPullWatermarks, SetEntityMapEnabled } from "../integration/EntityMapLifecycle.js";
60
60
  import { ComputeInactiveRowWarnings } from "../integration/InactiveRowWarnings.js";
61
61
  import { BuildCreateConnectionMessage, BuildDetachedRefreshMessage, BuildReactivateMessage, BuildUpdateConnectionMessage } from "../integration/SchemaRefreshLaunch.js";
62
62
  // Type-only: the registered runtime class for 'MJ: Company Integrations'. Lets the create path name the
@@ -6418,7 +6418,7 @@ export class IntegrationDiscoveryResolver extends ResolverBase {
6418
6418
  // The CHOICES live in a pure function (decideFieldMapReconcile — unit-tested); this method
6419
6419
  // applies the EFFECTS. Inline, the decision was untestable: this resolver imports
6420
6420
  // schema-builder and schema-engine, so it cannot be loaded in a unit test at all.
6421
- const plan = decideFieldMapReconcile(
6421
+ const plan = DecideFieldMapReconcile(
6422
6422
  activeFields.map(f => f.Name),
6423
6423
  existingRows.map(fm => ({ SourceFieldName: fm.SourceFieldName, Status: fm.Status })),
6424
6424
  mapEnabled,
@@ -239,7 +239,7 @@ export class ComposeListsInput {
239
239
  // AppContext / type-graphql runtime.
240
240
  // ---------------------------------------------------------------------------
241
241
 
242
- export function toCoreSource(input: ListSourceInput): CoreListSource {
242
+ export function ToCoreSource(input: ListSourceInput): CoreListSource {
243
243
  switch (input.Kind) {
244
244
  case 'list':
245
245
  if (!input.ListID) throw new Error("ListSourceInput.ListID is required when Kind='list'");
@@ -257,7 +257,12 @@ export function toCoreSource(input: ListSourceInput): CoreListSource {
257
257
  }
258
258
  }
259
259
 
260
- export function fromCoreDelta(delta: CoreListDelta): ListDeltaType {
260
+ /** @deprecated Use {@link ToCoreSource}. */
261
+ export function toCoreSource(input: ListSourceInput): CoreListSource {
262
+ return ToCoreSource(input);
263
+ }
264
+
265
+ export function FromCoreDelta(delta: CoreListDelta): ListDeltaType {
261
266
  return {
262
267
  TargetListId: delta.TargetListId,
263
268
  EntityName: delta.EntityName,
@@ -265,12 +270,17 @@ export function fromCoreDelta(delta: CoreListDelta): ListDeltaType {
265
270
  ToRemove: delta.ToRemove,
266
271
  Unchanged: delta.Unchanged,
267
272
  Counts: { ...delta.Counts },
268
- Warnings: delta.Warnings.map(fromCoreWarning),
273
+ Warnings: delta.Warnings.map(FromCoreWarning),
269
274
  DeltaToken: delta.DeltaToken,
270
275
  };
271
276
  }
272
277
 
273
- export function fromCoreWarning(w: CoreListDeltaWarning): ListDeltaWarningType {
278
+ /** @deprecated Use {@link FromCoreDelta}. */
279
+ export function fromCoreDelta(delta: CoreListDelta): ListDeltaType {
280
+ return FromCoreDelta(delta);
281
+ }
282
+
283
+ export function FromCoreWarning(w: CoreListDeltaWarning): ListDeltaWarningType {
274
284
  return {
275
285
  Code: w.Code,
276
286
  Message: w.Message,
@@ -278,7 +288,12 @@ export function fromCoreWarning(w: CoreListDeltaWarning): ListDeltaWarningType {
278
288
  };
279
289
  }
280
290
 
281
- export function fromCoreApplyResult(r: CoreApplyResult): ApplyListResultType {
291
+ /** @deprecated Use {@link FromCoreWarning}. */
292
+ export function fromCoreWarning(w: CoreListDeltaWarning): ListDeltaWarningType {
293
+ return FromCoreWarning(w);
294
+ }
295
+
296
+ export function FromCoreApplyResult(r: CoreApplyResult): ApplyListResultType {
282
297
  return {
283
298
  Success: r.Success,
284
299
  ResultCode: r.ResultCode,
@@ -292,8 +307,13 @@ export function fromCoreApplyResult(r: CoreApplyResult): ApplyListResultType {
292
307
  };
293
308
  }
294
309
 
310
+ /** @deprecated Use {@link FromCoreApplyResult}. */
311
+ export function fromCoreApplyResult(r: CoreApplyResult): ApplyListResultType {
312
+ return FromCoreApplyResult(r);
313
+ }
314
+
295
315
  /** Convert a `ListShareSummary` from the core into the GraphQL DTO. */
296
- export function fromCoreShareSummary(s: ListShareSummary): ListShareSummaryType {
316
+ export function FromCoreShareSummary(s: ListShareSummary): ListShareSummaryType {
297
317
  return {
298
318
  PermissionID: s.PermissionID,
299
319
  ListID: s.ListID,
@@ -308,28 +328,53 @@ export function fromCoreShareSummary(s: ListShareSummary): ListShareSummaryType
308
328
  };
309
329
  }
310
330
 
331
+ /** @deprecated Use {@link FromCoreShareSummary}. */
332
+ export function fromCoreShareSummary(s: ListShareSummary): ListShareSummaryType {
333
+ return FromCoreShareSummary(s);
334
+ }
335
+
311
336
  /** Guard for required-when-Kind-X fields on discriminated inputs. */
312
- export function requireField<T>(value: T | undefined, name: string): T {
337
+ export function RequireField<T>(value: T | undefined, name: string): T {
313
338
  if (value == null) throw new Error(`'${name}' is required`);
314
339
  return value;
315
340
  }
316
341
 
342
+ /** @deprecated Use {@link RequireField}. */
343
+ export function requireField<T>(value: T | undefined, name: string): T {
344
+ return RequireField(value, name);
345
+ }
346
+
317
347
  /** Three failure helpers — one per output type — keep the try/catch
318
348
  * sites in the resolver methods tiny. */
349
+ export function ShareUnexpected(e: unknown, op: string): ShareResultType {
350
+ const message = e instanceof Error ? e.message : String(e);
351
+ return { Success: false, ResultCode: 'UNEXPECTED_ERROR', Message: `${op}: ${message}` };
352
+ }
353
+
354
+ /** @deprecated Use {@link ShareUnexpected}. */
319
355
  export function shareUnexpected(e: unknown, op: string): ShareResultType {
356
+ return ShareUnexpected(e, op);
357
+ }
358
+ export function InviteUnexpected(e: unknown, op: string): InviteResultType {
320
359
  const message = e instanceof Error ? e.message : String(e);
321
360
  return { Success: false, ResultCode: 'UNEXPECTED_ERROR', Message: `${op}: ${message}` };
322
361
  }
362
+
363
+ /** @deprecated Use {@link InviteUnexpected}. */
323
364
  export function inviteUnexpected(e: unknown, op: string): InviteResultType {
365
+ return InviteUnexpected(e, op);
366
+ }
367
+ export function AcceptInvitationUnexpected(e: unknown, op: string): AcceptInvitationResultType {
324
368
  const message = e instanceof Error ? e.message : String(e);
325
369
  return { Success: false, ResultCode: 'UNEXPECTED_ERROR', Message: `${op}: ${message}` };
326
370
  }
371
+
372
+ /** @deprecated Use {@link AcceptInvitationUnexpected}. */
327
373
  export function acceptInvitationUnexpected(e: unknown, op: string): AcceptInvitationResultType {
328
- const message = e instanceof Error ? e.message : String(e);
329
- return { Success: false, ResultCode: 'UNEXPECTED_ERROR', Message: `${op}: ${message}` };
374
+ return AcceptInvitationUnexpected(e, op);
330
375
  }
331
376
 
332
- export function rebuildDeltaFromInput(input: ApplyDeltaInput): CoreListDelta {
377
+ export function RebuildDeltaFromInput(input: ApplyDeltaInput): CoreListDelta {
333
378
  return {
334
379
  TargetListId: input.TargetListId,
335
380
  EntityName: input.EntityName,
@@ -348,6 +393,11 @@ export function rebuildDeltaFromInput(input: ApplyDeltaInput): CoreListDelta {
348
393
  };
349
394
  }
350
395
 
396
+ /** @deprecated Use {@link RebuildDeltaFromInput}. */
397
+ export function rebuildDeltaFromInput(input: ApplyDeltaInput): CoreListDelta {
398
+ return RebuildDeltaFromInput(input);
399
+ }
400
+
351
401
  // ---------------------------------------------------------------------------
352
402
  // Resolver
353
403
  //
@@ -369,10 +419,10 @@ export class ListOperationsResolver extends ResolverBase {
369
419
  @Ctx() ctx: AppContext,
370
420
  ): Promise<ListDeltaType> {
371
421
  const ops = this.buildOps(ctx);
372
- const source = toCoreSource(input.Source);
422
+ const source = ToCoreSource(input.Source);
373
423
  const target = input.Target === 'new' ? 'new' : ({ kind: 'list', listId: input.Target } as const);
374
424
  const delta = await ops.ComputeDelta(target, source, input.Mode);
375
- return fromCoreDelta(delta);
425
+ return FromCoreDelta(delta);
376
426
  }
377
427
 
378
428
  @Mutation(() => ApplyListResultType, {
@@ -384,12 +434,12 @@ export class ListOperationsResolver extends ResolverBase {
384
434
  ): Promise<ApplyListResultType> {
385
435
  const ops = this.buildOps(ctx);
386
436
  try {
387
- const delta = rebuildDeltaFromInput(input);
437
+ const delta = RebuildDeltaFromInput(input);
388
438
  const result = await ops.ApplyDelta(delta, {
389
439
  ConfirmDrops: input.ConfirmDrops,
390
440
  DeltaToken: input.DeltaToken,
391
441
  });
392
- return fromCoreApplyResult(result);
442
+ return FromCoreApplyResult(result);
393
443
  } catch (e) {
394
444
  return this.unexpectedFailure(e, 'ApplyListDelta');
395
445
  }
@@ -412,7 +462,7 @@ export class ListOperationsResolver extends ResolverBase {
412
462
  RefreshMode: options.RefreshMode,
413
463
  };
414
464
  const result = await ops.MaterializeFromView(viewId, opts);
415
- return fromCoreApplyResult(result);
465
+ return FromCoreApplyResult(result);
416
466
  } catch (e) {
417
467
  return this.unexpectedFailure(e, 'MaterializeListFromView');
418
468
  }
@@ -427,7 +477,7 @@ export class ListOperationsResolver extends ResolverBase {
427
477
  const ops = this.buildOps(ctx);
428
478
  try {
429
479
  const result = await ops.AddViewResultsToList(viewId, listId);
430
- return fromCoreApplyResult(result);
480
+ return FromCoreApplyResult(result);
431
481
  } catch (e) {
432
482
  return this.unexpectedFailure(e, 'AddViewResultsToList');
433
483
  }
@@ -443,7 +493,7 @@ export class ListOperationsResolver extends ResolverBase {
443
493
  const ops = this.buildOps(ctx);
444
494
  try {
445
495
  const result = await ops.RefreshFromSource(listId, mode, { ConfirmDrops: confirmDrops });
446
- return fromCoreApplyResult(result);
496
+ return FromCoreApplyResult(result);
447
497
  } catch (e) {
448
498
  return this.unexpectedFailure(e, 'RefreshListFromSource');
449
499
  }
@@ -458,10 +508,10 @@ export class ListOperationsResolver extends ResolverBase {
458
508
  @Ctx() ctx: AppContext,
459
509
  ): Promise<ListDeltaType> {
460
510
  const ops = this.buildOps(ctx);
461
- const inputs = input.Inputs.map(toCoreSource);
462
- const target = input.Target ? toCoreSource(input.Target) : undefined;
511
+ const inputs = input.Inputs.map(ToCoreSource);
512
+ const target = input.Target ? ToCoreSource(input.Target) : undefined;
463
513
  const delta = await ops.ComputeSetOp(input.Op, inputs, target);
464
- return fromCoreDelta(delta);
514
+ return FromCoreDelta(delta);
465
515
  }
466
516
 
467
517
  // -----------------------------------------------------------------------
@@ -480,8 +530,8 @@ export class ListOperationsResolver extends ResolverBase {
480
530
  try {
481
531
  const target: ShareTarget =
482
532
  input.Target.Kind === 'user'
483
- ? { kind: 'user', userId: requireField(input.Target.UserID, 'Target.UserID') }
484
- : { kind: 'role', roleId: requireField(input.Target.RoleID, 'Target.RoleID') };
533
+ ? { kind: 'user', userId: RequireField(input.Target.UserID, 'Target.UserID') }
534
+ : { kind: 'role', roleId: RequireField(input.Target.RoleID, 'Target.RoleID') };
485
535
  const result = await sharing.Share({
486
536
  ListID: input.ListID,
487
537
  Target: target,
@@ -489,7 +539,7 @@ export class ListOperationsResolver extends ResolverBase {
489
539
  });
490
540
  return result;
491
541
  } catch (e) {
492
- return shareUnexpected(e, 'ShareList');
542
+ return ShareUnexpected(e, 'ShareList');
493
543
  }
494
544
  }
495
545
 
@@ -502,7 +552,7 @@ export class ListOperationsResolver extends ResolverBase {
502
552
  try {
503
553
  return await sharing.Unshare(permissionId);
504
554
  } catch (e) {
505
- return shareUnexpected(e, 'UnshareList');
555
+ return ShareUnexpected(e, 'UnshareList');
506
556
  }
507
557
  }
508
558
 
@@ -520,7 +570,7 @@ export class ListOperationsResolver extends ResolverBase {
520
570
  TtlMs: input.TtlHours != null ? input.TtlHours * 60 * 60 * 1000 : undefined,
521
571
  });
522
572
  } catch (e) {
523
- return inviteUnexpected(e, 'InviteToList');
573
+ return InviteUnexpected(e, 'InviteToList');
524
574
  }
525
575
  }
526
576
 
@@ -533,7 +583,7 @@ export class ListOperationsResolver extends ResolverBase {
533
583
  try {
534
584
  return await sharing.AcceptInvitation(token);
535
585
  } catch (e) {
536
- return acceptInvitationUnexpected(e, 'AcceptListInvitation');
586
+ return AcceptInvitationUnexpected(e, 'AcceptListInvitation');
537
587
  }
538
588
  }
539
589
 
@@ -546,7 +596,7 @@ export class ListOperationsResolver extends ResolverBase {
546
596
  try {
547
597
  return await sharing.RevokeInvitation(invitationId);
548
598
  } catch (e) {
549
- return shareUnexpected(e, 'RevokeListInvitation');
599
+ return ShareUnexpected(e, 'RevokeListInvitation');
550
600
  }
551
601
  }
552
602
 
@@ -557,7 +607,7 @@ export class ListOperationsResolver extends ResolverBase {
557
607
  ): Promise<ListShareSummaryType[]> {
558
608
  const sharing = this.buildSharing(ctx);
559
609
  const shares = await sharing.GetSharesForList(listId);
560
- return shares.map(fromCoreShareSummary);
610
+ return shares.map(FromCoreShareSummary);
561
611
  }
562
612
 
563
613
  @Query(() => [SharedListSummaryType])