@memberjunction/server 6.2.0-edge.0 → 6.2.0-edge.2
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.
- package/dist/.tsbuildinfo +1 -1
- package/dist/agentSessions/ReturningVisitorRecap.d.ts +2 -0
- package/dist/agentSessions/ReturningVisitorRecap.d.ts.map +1 -1
- package/dist/agentSessions/ReturningVisitorRecap.js +5 -1
- package/dist/agentSessions/ReturningVisitorRecap.js.map +1 -1
- package/dist/agentSessions/SessionManager.js +2 -2
- package/dist/agentSessions/remoteBrowserGoalEngine.d.ts +8 -0
- package/dist/agentSessions/remoteBrowserGoalEngine.d.ts.map +1 -1
- package/dist/agentSessions/remoteBrowserGoalEngine.js +21 -5
- package/dist/agentSessions/remoteBrowserGoalEngine.js.map +1 -1
- package/dist/auth/AuthProviderCatalogRouter.d.ts +2 -0
- package/dist/auth/AuthProviderCatalogRouter.d.ts.map +1 -1
- package/dist/auth/AuthProviderCatalogRouter.js +5 -1
- package/dist/auth/AuthProviderCatalogRouter.js.map +1 -1
- package/dist/auth/index.d.ts +20 -1
- package/dist/auth/index.d.ts.map +1 -1
- package/dist/auth/index.js +20 -10
- package/dist/auth/index.js.map +1 -1
- package/dist/auth/initializeProviders.d.ts +8 -0
- package/dist/auth/initializeProviders.d.ts.map +1 -1
- package/dist/auth/initializeProviders.js +21 -5
- package/dist/auth/initializeProviders.js.map +1 -1
- package/dist/auth/magicLink/MagicLinkRouter.d.ts +9 -0
- package/dist/auth/magicLink/MagicLinkRouter.d.ts.map +1 -1
- package/dist/auth/magicLink/MagicLinkRouter.js +22 -10
- package/dist/auth/magicLink/MagicLinkRouter.js.map +1 -1
- package/dist/auth/magicLink/MagicLinkService.d.ts +17 -15
- package/dist/auth/magicLink/MagicLinkService.d.ts.map +1 -1
- package/dist/auth/magicLink/MagicLinkService.js +65 -51
- package/dist/auth/magicLink/MagicLinkService.js.map +1 -1
- package/dist/auth/magicLink/index.d.ts +2 -2
- package/dist/auth/magicLink/index.d.ts.map +1 -1
- package/dist/auth/magicLink/index.js +2 -2
- package/dist/auth/magicLink/index.js.map +1 -1
- package/dist/auth/magicLink/magicLinkCore.d.ts +54 -33
- package/dist/auth/magicLink/magicLinkCore.d.ts.map +1 -1
- package/dist/auth/magicLink/magicLinkCore.js +61 -61
- package/dist/auth/magicLink/magicLinkCore.js.map +1 -1
- package/dist/auth/magicLink/redeemLanding.d.ts +4 -0
- package/dist/auth/magicLink/redeemLanding.d.ts.map +1 -1
- package/dist/auth/magicLink/redeemLanding.js +12 -4
- package/dist/auth/magicLink/redeemLanding.js.map +1 -1
- package/dist/auth/magicLink/types.d.ts +4 -4
- package/dist/auth/principals.d.ts +2 -0
- package/dist/auth/principals.d.ts.map +1 -1
- package/dist/auth/principals.js +6 -2
- package/dist/auth/principals.js.map +1 -1
- package/dist/cache.d.ts +2 -0
- package/dist/cache.d.ts.map +1 -1
- package/dist/cache.js +3 -1
- package/dist/cache.js.map +1 -1
- package/dist/config.d.ts +346 -2
- package/dist/config.d.ts.map +1 -1
- package/dist/config.js +34 -4
- package/dist/config.js.map +1 -1
- package/dist/context.d.ts +20 -0
- package/dist/context.d.ts.map +1 -1
- package/dist/context.js +27 -19
- package/dist/context.js.map +1 -1
- package/dist/directives/Public.d.ts +2 -0
- package/dist/directives/Public.d.ts.map +1 -1
- package/dist/directives/Public.js +3 -1
- package/dist/directives/Public.js.map +1 -1
- package/dist/directives/RequireSystemUser.d.ts +2 -0
- package/dist/directives/RequireSystemUser.d.ts.map +1 -1
- package/dist/directives/RequireSystemUser.js +3 -1
- package/dist/directives/RequireSystemUser.js.map +1 -1
- package/dist/generated/graphql-schemas/__mj.d.ts +1021 -0
- package/dist/generated/graphql-schemas/__mj.d.ts.map +1 -1
- package/dist/generated/graphql-schemas/__mj.js +7368 -2145
- package/dist/generated/graphql-schemas/__mj.js.map +1 -1
- package/dist/generic/CacheInvalidationResolver.d.ts +94 -4
- package/dist/generic/CacheInvalidationResolver.d.ts.map +1 -1
- package/dist/generic/CacheInvalidationResolver.js +122 -3
- package/dist/generic/CacheInvalidationResolver.js.map +1 -1
- package/dist/generic/DeleteOptionsInput.d.ts +8 -1
- package/dist/generic/DeleteOptionsInput.d.ts.map +1 -1
- package/dist/generic/DeleteOptionsInput.js +1 -1
- package/dist/generic/DeleteOptionsInput.js.map +1 -1
- package/dist/generic/FireAndForgetHeartbeat.d.ts +18 -2
- package/dist/generic/FireAndForgetHeartbeat.d.ts.map +1 -1
- package/dist/generic/FireAndForgetHeartbeat.js +24 -6
- package/dist/generic/FireAndForgetHeartbeat.js.map +1 -1
- package/dist/generic/OrphanedConversationDetailReconciler.d.ts +31 -0
- package/dist/generic/OrphanedConversationDetailReconciler.d.ts.map +1 -0
- package/dist/generic/OrphanedConversationDetailReconciler.js +215 -0
- package/dist/generic/OrphanedConversationDetailReconciler.js.map +1 -0
- package/dist/generic/PushStatusResolver.d.ts +48 -1
- package/dist/generic/PushStatusResolver.d.ts.map +1 -1
- package/dist/generic/PushStatusResolver.js +95 -4
- package/dist/generic/PushStatusResolver.js.map +1 -1
- package/dist/generic/ResolverBase.d.ts +18 -2
- package/dist/generic/ResolverBase.d.ts.map +1 -1
- package/dist/generic/ResolverBase.js +64 -55
- package/dist/generic/ResolverBase.js.map +1 -1
- package/dist/index.d.ts +9 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +120 -11
- package/dist/index.js.map +1 -1
- package/dist/integration/CustomColumnPromoter.d.ts +2 -0
- package/dist/integration/CustomColumnPromoter.d.ts.map +1 -1
- package/dist/integration/CustomColumnPromoter.js +5 -1
- package/dist/integration/CustomColumnPromoter.js.map +1 -1
- package/dist/integration/EntityMapLifecycle.d.ts +4 -0
- package/dist/integration/EntityMapLifecycle.d.ts.map +1 -1
- package/dist/integration/EntityMapLifecycle.js +10 -2
- package/dist/integration/EntityMapLifecycle.js.map +1 -1
- package/dist/logging/NoLog.d.ts +4 -0
- package/dist/logging/NoLog.d.ts.map +1 -1
- package/dist/logging/NoLog.js +10 -2
- package/dist/logging/NoLog.js.map +1 -1
- package/dist/logging/StartupLogger.d.ts +2 -0
- package/dist/logging/StartupLogger.d.ts.map +1 -1
- package/dist/logging/StartupLogger.js +5 -1
- package/dist/logging/StartupLogger.js.map +1 -1
- package/dist/logging/bootAudit.d.ts +11 -7
- package/dist/logging/bootAudit.d.ts.map +1 -1
- package/dist/logging/bootAudit.js +15 -7
- package/dist/logging/bootAudit.js.map +1 -1
- package/dist/logging/boundaryLogPayload.d.ts +4 -0
- package/dist/logging/boundaryLogPayload.d.ts.map +1 -1
- package/dist/logging/boundaryLogPayload.js +5 -1
- package/dist/logging/boundaryLogPayload.js.map +1 -1
- package/dist/logging/secretRedactor.d.ts +2 -0
- package/dist/logging/secretRedactor.d.ts.map +1 -1
- package/dist/logging/secretRedactor.js +8 -4
- package/dist/logging/secretRedactor.js.map +1 -1
- package/dist/logging/shortenForLog.d.ts +2 -0
- package/dist/logging/shortenForLog.d.ts.map +1 -1
- package/dist/logging/shortenForLog.js +7 -3
- package/dist/logging/shortenForLog.js.map +1 -1
- package/dist/logging/variablesLoggingMiddleware.d.ts +2 -0
- package/dist/logging/variablesLoggingMiddleware.d.ts.map +1 -1
- package/dist/logging/variablesLoggingMiddleware.js +8 -6
- package/dist/logging/variablesLoggingMiddleware.js.map +1 -1
- package/dist/metadataRefreshSignal.d.ts +19 -0
- package/dist/metadataRefreshSignal.d.ts.map +1 -0
- package/dist/metadataRefreshSignal.js +45 -0
- package/dist/metadataRefreshSignal.js.map +1 -0
- package/dist/middleware/MJTenantFilterMiddleware.js +4 -4
- package/dist/multiTenancy/index.d.ts +8 -0
- package/dist/multiTenancy/index.d.ts.map +1 -1
- package/dist/multiTenancy/index.js +21 -5
- package/dist/multiTenancy/index.js.map +1 -1
- package/dist/realtimeWidget/WidgetRouter.d.ts +5 -0
- package/dist/realtimeWidget/WidgetRouter.d.ts.map +1 -1
- package/dist/realtimeWidget/WidgetRouter.js +14 -10
- package/dist/realtimeWidget/WidgetRouter.js.map +1 -1
- package/dist/realtimeWidget/WidgetSessionService.d.ts +6 -6
- package/dist/realtimeWidget/WidgetSessionService.js +27 -27
- package/dist/realtimeWidget/host-identity.d.ts +5 -1
- package/dist/realtimeWidget/host-identity.d.ts.map +1 -1
- package/dist/realtimeWidget/host-identity.js +11 -3
- package/dist/realtimeWidget/host-identity.js.map +1 -1
- package/dist/realtimeWidget/index.d.ts +2 -2
- package/dist/realtimeWidget/index.d.ts.map +1 -1
- package/dist/realtimeWidget/index.js +2 -2
- package/dist/realtimeWidget/index.js.map +1 -1
- package/dist/realtimeWidget/visitorIdentity.d.ts +21 -1
- package/dist/realtimeWidget/visitorIdentity.d.ts.map +1 -1
- package/dist/realtimeWidget/visitorIdentity.js +16 -4
- package/dist/realtimeWidget/visitorIdentity.js.map +1 -1
- package/dist/realtimeWidget/widgetCore.d.ts +48 -0
- package/dist/realtimeWidget/widgetCore.d.ts.map +1 -1
- package/dist/realtimeWidget/widgetCore.js +38 -10
- package/dist/realtimeWidget/widgetCore.js.map +1 -1
- package/dist/realtimeWidget/widgetGuestElevation.d.ts +10 -6
- package/dist/realtimeWidget/widgetGuestElevation.d.ts.map +1 -1
- package/dist/realtimeWidget/widgetGuestElevation.js +14 -6
- package/dist/realtimeWidget/widgetGuestElevation.js.map +1 -1
- package/dist/resolvers/AdhocQueryResolver.js +3 -3
- package/dist/resolvers/AgentRunStatusPublisher.d.ts +55 -0
- package/dist/resolvers/AgentRunStatusPublisher.d.ts.map +1 -0
- package/dist/resolvers/AgentRunStatusPublisher.js +141 -0
- package/dist/resolvers/AgentRunStatusPublisher.js.map +1 -0
- package/dist/resolvers/ConversationRunEventsResolver.d.ts +90 -0
- package/dist/resolvers/ConversationRunEventsResolver.d.ts.map +1 -0
- package/dist/resolvers/ConversationRunEventsResolver.js +283 -0
- package/dist/resolvers/ConversationRunEventsResolver.js.map +1 -0
- package/dist/resolvers/DuplicateEntryCheckResolver.d.ts +98 -0
- package/dist/resolvers/DuplicateEntryCheckResolver.d.ts.map +1 -0
- package/dist/resolvers/DuplicateEntryCheckResolver.js +227 -0
- package/dist/resolvers/DuplicateEntryCheckResolver.js.map +1 -0
- package/dist/resolvers/FetchEntityVectorsResolver.d.ts.map +1 -1
- package/dist/resolvers/FetchEntityVectorsResolver.js +2 -1
- package/dist/resolvers/FetchEntityVectorsResolver.js.map +1 -1
- package/dist/resolvers/FileResolver.js +3 -3
- package/dist/resolvers/GeoResolver.d.ts +2 -2
- package/dist/resolvers/GeoResolver.js +4 -4
- package/dist/resolvers/GetDataResolver.d.ts +14 -0
- package/dist/resolvers/GetDataResolver.d.ts.map +1 -1
- package/dist/resolvers/GetDataResolver.js +43 -15
- package/dist/resolvers/GetDataResolver.js.map +1 -1
- package/dist/resolvers/IntegrationDiscoveryResolver.js +2 -2
- package/dist/resolvers/ListOperationsResolver.d.ts +20 -0
- package/dist/resolvers/ListOperationsResolver.d.ts.map +1 -1
- package/dist/resolvers/ListOperationsResolver.js +68 -28
- package/dist/resolvers/ListOperationsResolver.js.map +1 -1
- package/dist/resolvers/MCPResolver.d.ts +11 -1
- package/dist/resolvers/MCPResolver.d.ts.map +1 -1
- package/dist/resolvers/MCPResolver.js +7 -3
- package/dist/resolvers/MCPResolver.js.map +1 -1
- package/dist/resolvers/MergeRecordsResolver.d.ts +7 -0
- package/dist/resolvers/MergeRecordsResolver.d.ts.map +1 -1
- package/dist/resolvers/MergeRecordsResolver.js +16 -2
- package/dist/resolvers/MergeRecordsResolver.js.map +1 -1
- package/dist/resolvers/RealtimeBridgeResolver.js +3 -3
- package/dist/resolvers/RealtimeClientSessionResolver.d.ts +44 -6
- package/dist/resolvers/RealtimeClientSessionResolver.d.ts.map +1 -1
- package/dist/resolvers/RealtimeClientSessionResolver.js +93 -37
- package/dist/resolvers/RealtimeClientSessionResolver.js.map +1 -1
- package/dist/resolvers/RemoteBrowserActionResolver.js +5 -5
- package/dist/resolvers/RunAIAgentResolver.d.ts +8 -18
- package/dist/resolvers/RunAIAgentResolver.d.ts.map +1 -1
- package/dist/resolvers/RunAIAgentResolver.js +85 -184
- package/dist/resolvers/RunAIAgentResolver.js.map +1 -1
- package/dist/resolvers/RunAIPromptResolver.d.ts +1 -1
- package/dist/resolvers/RunAIPromptResolver.js +2 -2
- package/dist/resolvers/RunDecisionResolver.d.ts +149 -0
- package/dist/resolvers/RunDecisionResolver.d.ts.map +1 -0
- package/dist/resolvers/RunDecisionResolver.js +396 -0
- package/dist/resolvers/RunDecisionResolver.js.map +1 -0
- package/dist/resolvers/RunTestResolver.js +5 -5
- package/dist/resolvers/SqlLoggingConfigResolver.d.ts +8 -4
- package/dist/resolvers/SqlLoggingConfigResolver.d.ts.map +1 -1
- package/dist/resolvers/SqlLoggingConfigResolver.js +5 -5
- package/dist/resolvers/TaskGraphFrameResolver.d.ts +8 -1
- package/dist/resolvers/TaskGraphFrameResolver.d.ts.map +1 -1
- package/dist/resolvers/TaskGraphFrameResolver.js +6 -2
- package/dist/resolvers/TaskGraphFrameResolver.js.map +1 -1
- package/dist/resolvers/VectorizeEntityResolver.d.ts +1 -1
- package/dist/resolvers/VectorizeEntityResolver.d.ts.map +1 -1
- package/dist/resolvers/VectorizeEntityResolver.js +14 -10
- package/dist/resolvers/VectorizeEntityResolver.js.map +1 -1
- package/dist/resolvers/adhoc-query-helpers.d.ts +6 -0
- package/dist/resolvers/adhoc-query-helpers.d.ts.map +1 -1
- package/dist/resolvers/adhoc-query-helpers.js +10 -2
- package/dist/resolvers/adhoc-query-helpers.js.map +1 -1
- package/dist/resolvers/artifact-routing.d.ts +8 -8
- package/dist/resolvers/artifact-routing.js +2 -2
- package/dist/resolvers/artifact-routing.js.map +1 -1
- package/dist/resolvers/meetingRecordingRegistration.d.ts +10 -2
- package/dist/resolvers/meetingRecordingRegistration.d.ts.map +1 -1
- package/dist/resolvers/meetingRecordingRegistration.js +24 -8
- package/dist/resolvers/meetingRecordingRegistration.js.map +1 -1
- package/dist/resolvers/peaksSidecar.d.ts +4 -0
- package/dist/resolvers/peaksSidecar.d.ts.map +1 -1
- package/dist/resolvers/peaksSidecar.js +10 -2
- package/dist/resolvers/peaksSidecar.js.map +1 -1
- package/dist/rest/EntityCRUDHandler.d.ts +28 -0
- package/dist/rest/EntityCRUDHandler.d.ts.map +1 -1
- package/dist/rest/EntityCRUDHandler.js +20 -4
- package/dist/rest/EntityCRUDHandler.js.map +1 -1
- package/dist/rest/MediaStreamHandler.d.ts +2 -0
- package/dist/rest/MediaStreamHandler.d.ts.map +1 -1
- package/dist/rest/MediaStreamHandler.js +10 -6
- package/dist/rest/MediaStreamHandler.js.map +1 -1
- package/dist/rest/OAuthCallbackHandler.d.ts +9 -0
- package/dist/rest/OAuthCallbackHandler.d.ts.map +1 -1
- package/dist/rest/OAuthCallbackHandler.js +15 -3
- package/dist/rest/OAuthCallbackHandler.js.map +1 -1
- package/dist/rest/RESTEndpointHandler.d.ts +6 -4
- package/dist/rest/RESTEndpointHandler.d.ts.map +1 -1
- package/dist/rest/RESTEndpointHandler.js +15 -11
- package/dist/rest/RESTEndpointHandler.js.map +1 -1
- package/dist/rest/RealtimeSdpBrokerHandler.d.ts +5 -1
- package/dist/rest/RealtimeSdpBrokerHandler.d.ts.map +1 -1
- package/dist/rest/RealtimeSdpBrokerHandler.js +12 -4
- package/dist/rest/RealtimeSdpBrokerHandler.js.map +1 -1
- package/dist/rest/SignatureWebhookHandler.d.ts +2 -0
- package/dist/rest/SignatureWebhookHandler.d.ts.map +1 -1
- package/dist/rest/SignatureWebhookHandler.js +5 -1
- package/dist/rest/SignatureWebhookHandler.js.map +1 -1
- package/dist/rest/UploadTokenManager.d.ts +24 -8
- package/dist/rest/UploadTokenManager.d.ts.map +1 -1
- package/dist/rest/UploadTokenManager.js +53 -21
- package/dist/rest/UploadTokenManager.js.map +1 -1
- package/dist/rest/ViewOperationsHandler.d.ts +20 -0
- package/dist/rest/ViewOperationsHandler.d.ts.map +1 -1
- package/dist/rest/ViewOperationsHandler.js +20 -4
- package/dist/rest/ViewOperationsHandler.js.map +1 -1
- package/dist/rest/mediaRange.d.ts +4 -0
- package/dist/rest/mediaRange.d.ts.map +1 -1
- package/dist/rest/mediaRange.js +10 -2
- package/dist/rest/mediaRange.js.map +1 -1
- package/dist/rest/setupRESTEndpoints.d.ts +4 -0
- package/dist/rest/setupRESTEndpoints.d.ts.map +1 -1
- package/dist/rest/setupRESTEndpoints.js +13 -7
- package/dist/rest/setupRESTEndpoints.js.map +1 -1
- package/dist/serverExtensionReservedRoots.d.ts +2 -0
- package/dist/serverExtensionReservedRoots.d.ts.map +1 -1
- package/dist/serverExtensionReservedRoots.js +5 -1
- package/dist/serverExtensionReservedRoots.js.map +1 -1
- package/dist/services/TaskGraphActionRunner.d.ts +13 -8
- package/dist/services/TaskGraphActionRunner.d.ts.map +1 -1
- package/dist/services/TaskGraphActionRunner.js +16 -15
- package/dist/services/TaskGraphActionRunner.js.map +1 -1
- package/dist/types.d.ts +2 -0
- package/dist/types.d.ts.map +1 -1
- package/dist/types.js +7 -3
- package/dist/types.js.map +1 -1
- package/dist/util.d.ts +6 -0
- package/dist/util.d.ts.map +1 -1
- package/dist/util.js +13 -5
- package/dist/util.js.map +1 -1
- package/package.json +94 -92
- package/src/__tests__/AgentRunStatusPublisher.test.ts +175 -0
- package/src/__tests__/DeleteOptionsInput.wireShape.test.ts +62 -0
- package/src/__tests__/DuplicateEntryCheckResolver.test.ts +300 -0
- package/src/__tests__/FileResolverPeaks.test.ts +13 -13
- package/src/__tests__/ListOperationsResolver.test.ts +17 -17
- package/src/__tests__/MediaStreamHandler.test.ts +28 -28
- package/src/__tests__/NoLog.test.ts +11 -11
- package/src/__tests__/PrimaryKeyAlwaysMapped.test.ts +10 -10
- package/src/__tests__/RESTEndpointHandler.test.ts +14 -14
- package/src/__tests__/RealtimeBridgeResolver.test.ts +4 -2
- package/src/__tests__/RealtimeClientSessionResolver.test.ts +216 -2
- package/src/__tests__/RealtimeSdpBrokerHandler.test.ts +6 -6
- package/src/__tests__/RefreshAdoptsNewColumns.test.ts +8 -8
- package/src/__tests__/RemoteBrowserActionRecovery.test.ts +7 -1
- package/src/__tests__/RemoteBrowserAudioStream.test.ts +7 -1
- package/src/__tests__/RemoteBrowserGoalEngine.test.ts +18 -18
- package/src/__tests__/RemoteBrowserSnapshot.test.ts +7 -1
- package/src/__tests__/ResolverBase.clientOldValues.test.ts +52 -0
- package/src/__tests__/RunAIAgentResolver.historyFrom.test.ts +398 -0
- package/src/__tests__/RunAIAgentResolver.streaming.test.ts +18 -27
- package/src/__tests__/RunDecisionResolver.test.ts +699 -0
- package/src/__tests__/TaskGraphActionRunner.durablePayload.test.ts +131 -0
- package/src/__tests__/TaskGraphFrameResolver.test.ts +2 -2
- package/src/__tests__/VectorizeEntityResolver.test.ts +106 -0
- package/src/__tests__/WidgetSessionService.test.ts +8 -4
- package/src/__tests__/adhoc-query-helpers.test.ts +21 -21
- package/src/__tests__/bootAudit.test.ts +11 -11
- package/src/__tests__/boundaryLogPayload.test.ts +6 -6
- package/src/__tests__/cacheInvalidationRecordData.test.ts +177 -0
- package/src/__tests__/conversationRunEvents.test.ts +399 -0
- package/src/__tests__/databaseAbstraction.test.ts +12 -6
- package/src/__tests__/getDataTokenRedaction.test.ts +7 -7
- package/src/__tests__/initializeProviders.refresh.test.ts +4 -4
- package/src/__tests__/magicLink.test.ts +73 -134
- package/src/__tests__/magicLinkService.consume.test.ts +224 -0
- package/src/__tests__/meetingRecordingRegistration.test.ts +12 -12
- package/src/__tests__/metadataRefreshSignal.test.ts +78 -0
- package/src/__tests__/multiTenancy.security.test.ts +40 -40
- package/src/__tests__/multiTenancy.test.ts +18 -18
- package/src/__tests__/newUsers.test.ts +24 -23
- package/src/__tests__/orphanedConversationDetailReconciler.test.ts +283 -0
- package/src/__tests__/principals.test.ts +22 -22
- package/src/__tests__/pushStatusFanOut.test.ts +206 -0
- package/src/__tests__/pushStatusResolver.filter.test.ts +8 -8
- package/src/__tests__/secretRedactor.failOpen.test.ts +12 -12
- package/src/__tests__/secretRedactor.test.ts +12 -12
- package/src/__tests__/serverExtensionReservedRoots.test.ts +7 -7
- package/src/__tests__/subscriptionRedaction.test.ts +5 -5
- package/src/__tests__/unifiedAuth.test.ts +15 -9
- package/src/__tests__/visitorIdentity.resolve.test.ts +6 -6
- package/src/__tests__/widget.test.ts +45 -45
- package/src/__tests__/widgetGuestElevation.test.ts +7 -7
- package/src/__tests__/widgetHostIdentity.test.ts +14 -14
- package/src/agentSessions/ReturningVisitorRecap.ts +12 -1
- package/src/agentSessions/SessionManager.ts +2 -2
- package/src/agentSessions/remoteBrowserGoalEngine.ts +30 -5
- package/src/auth/AuthProviderCatalogRouter.ts +6 -1
- package/src/auth/__tests__/backward-compatibility.test.ts +4 -3
- package/src/auth/index.ts +43 -28
- package/src/auth/initializeProviders.ts +25 -5
- package/src/auth/magicLink/MagicLinkRouter.ts +28 -10
- package/src/auth/magicLink/MagicLinkService.ts +71 -52
- package/src/auth/magicLink/index.ts +7 -7
- package/src/auth/magicLink/magicLinkCore.ts +96 -64
- package/src/auth/magicLink/redeemLanding.ts +14 -4
- package/src/auth/magicLink/types.ts +54 -54
- package/src/auth/newUsers.ts +1 -1
- package/src/auth/principals.ts +11 -2
- package/src/cache.ts +4 -1
- package/src/config.ts +37 -4
- package/src/context.ts +37 -24
- package/src/directives/Public.ts +4 -1
- package/src/directives/RequireSystemUser.ts +4 -1
- package/src/generated/graphql-schemas/__mj.ts +3674 -4
- package/src/generic/CacheInvalidationResolver.ts +148 -4
- package/src/generic/DeleteOptionsInput.ts +9 -2
- package/src/generic/FireAndForgetHeartbeat.ts +35 -16
- package/src/generic/OrphanedConversationDetailReconciler.ts +267 -0
- package/src/generic/PushStatusResolver.ts +118 -8
- package/src/generic/ResolverBase.ts +65 -57
- package/src/generic/RunViewResolver.ts +22 -22
- package/src/generic/__tests__/FireAndForgetHeartbeat.test.ts +7 -7
- package/src/index.ts +137 -11
- package/src/integration/CustomColumnPromoter.ts +6 -1
- package/src/integration/EntityMapLifecycle.ts +20 -2
- package/src/logging/NoLog.ts +16 -2
- package/src/logging/StartupLogger.ts +6 -1
- package/src/logging/bootAudit.ts +26 -16
- package/src/logging/boundaryLogPayload.ts +8 -1
- package/src/logging/secretRedactor.ts +14 -9
- package/src/logging/shortenForLog.ts +8 -3
- package/src/logging/variablesLoggingMiddleware.ts +9 -6
- package/src/metadataRefreshSignal.ts +45 -0
- package/src/middleware/MJTenantFilterMiddleware.ts +4 -4
- package/src/multiTenancy/index.ts +29 -5
- package/src/realtimeWidget/WidgetRouter.ts +15 -10
- package/src/realtimeWidget/WidgetSessionService.ts +76 -76
- package/src/realtimeWidget/host-identity.ts +24 -10
- package/src/realtimeWidget/index.ts +3 -3
- package/src/realtimeWidget/visitorIdentity.ts +39 -8
- package/src/realtimeWidget/widgetCore.ts +75 -10
- package/src/realtimeWidget/widgetGuestElevation.ts +25 -12
- package/src/resolvers/AdhocQueryResolver.ts +3 -3
- package/src/resolvers/AgentRunStatusPublisher.ts +175 -0
- package/src/resolvers/AgentSessionResolver.ts +3 -3
- package/src/resolvers/ColorResolver.ts +6 -6
- package/src/resolvers/ComponentRegistryResolver.ts +36 -36
- package/src/resolvers/ConversationRunEventsResolver.ts +308 -0
- package/src/resolvers/DuplicateEntryCheckResolver.ts +232 -0
- package/src/resolvers/EntityCommunicationsResolver.ts +4 -4
- package/src/resolvers/ExecuteRemoteOperationResolver.ts +9 -9
- package/src/resolvers/FetchEntityVectorsResolver.ts +2 -1
- package/src/resolvers/FileResolver.ts +42 -42
- package/src/resolvers/GeoResolver.ts +4 -4
- package/src/resolvers/GetDataResolver.ts +50 -15
- package/src/resolvers/IntegrationDiscoveryResolver.ts +2 -2
- package/src/resolvers/ListOperationsResolver.ts +78 -28
- package/src/resolvers/MCPResolver.ts +30 -15
- package/src/resolvers/MergeRecordsResolver.ts +14 -2
- package/src/resolvers/QueryResolver.ts +13 -13
- package/src/resolvers/RealtimeBridgeResolver.ts +3 -3
- package/src/resolvers/RealtimeClientSessionResolver.ts +96 -38
- package/src/resolvers/RemoteBrowserActionResolver.ts +5 -5
- package/src/resolvers/RunAIAgentResolver.ts +134 -239
- package/src/resolvers/RunAIPromptResolver.ts +22 -22
- package/src/resolvers/RunDecisionResolver.ts +435 -0
- package/src/resolvers/RunTemplateResolver.ts +4 -4
- package/src/resolvers/RunTestResolver.ts +25 -25
- package/src/resolvers/SqlLoggingConfigResolver.ts +56 -56
- package/src/resolvers/TaskGraphFrameResolver.ts +37 -28
- package/src/resolvers/TelemetryResolver.ts +79 -79
- package/src/resolvers/VectorizeEntityResolver.ts +16 -11
- package/src/resolvers/__tests__/GetDataResolver.tokens.test.ts +40 -38
- package/src/resolvers/__tests__/MergeRecordsResolver.test.ts +93 -0
- package/src/resolvers/__tests__/artifact-routing.test.ts +23 -23
- package/src/resolvers/adhoc-query-helpers.ts +19 -2
- package/src/resolvers/artifact-routing.ts +19 -19
- package/src/resolvers/meetingRecordingRegistration.ts +44 -10
- package/src/resolvers/peaksSidecar.ts +12 -2
- package/src/rest/EntityCRUDHandler.ts +24 -4
- package/src/rest/MediaStreamHandler.ts +11 -6
- package/src/rest/OAuthCallbackHandler.ts +25 -7
- package/src/rest/RESTEndpointHandler.ts +20 -15
- package/src/rest/RealtimeSdpBrokerHandler.ts +14 -4
- package/src/rest/SignatureWebhookHandler.ts +6 -1
- package/src/rest/UploadTokenManager.ts +66 -30
- package/src/rest/ViewOperationsHandler.ts +24 -4
- package/src/rest/mediaRange.ts +16 -6
- package/src/rest/setupRESTEndpoints.ts +24 -12
- package/src/serverExtensionReservedRoots.ts +6 -1
- package/src/services/TaskGraphActionRunner.ts +16 -15
- package/src/types.ts +21 -16
- package/src/util.ts +16 -6
|
@@ -0,0 +1,232 @@
|
|
|
1
|
+
import { Resolver, Mutation, Arg, Ctx, ObjectType, Field, Float, Int } from 'type-graphql';
|
|
2
|
+
import { AppContext, UserPayload } from '../types.js';
|
|
3
|
+
import { EntityFieldInfo, EntityInfo, IMetadataProvider, LogError, Metadata } from '@memberjunction/core';
|
|
4
|
+
import { DuplicateRecordDetector } from '@memberjunction/ai-vector-dupe';
|
|
5
|
+
import type { DuplicateEntryCheckResult, DuplicateEntryCheckStatus } from '@memberjunction/ai-vector-dupe';
|
|
6
|
+
import { ResolverBase } from '../generic/ResolverBase.js';
|
|
7
|
+
import { GetReadOnlyProvider } from '../util.js';
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* The most characters `valuesJSON` may hold. A larger request is refused before it is parsed. The
|
|
11
|
+
* form sends each field's text cut to 500 characters, so a real entry stays well under it; the
|
|
12
|
+
* detector then cuts what reaches the template and the decision model on its own.
|
|
13
|
+
*/
|
|
14
|
+
export const DUPLICATE_ENTRY_CHECK_MAX_VALUES_JSON_LENGTH = 16 * 1024;
|
|
15
|
+
|
|
16
|
+
/**
|
|
17
|
+
* How a `CheckDuplicateEntry` call ended: a detector status, or `NotAuthorized` when the caller may
|
|
18
|
+
* not run the check (an API key without the scopes, or a user who cannot read the entity). Nothing
|
|
19
|
+
* ran, and a form stops asking about the entity for the session, as it does on `NotConfigured`.
|
|
20
|
+
*/
|
|
21
|
+
export type DuplicateEntryCheckOutputStatus = DuplicateEntryCheckStatus | 'NotAuthorized';
|
|
22
|
+
|
|
23
|
+
/** One entered value, as `valuesJSON` may carry it. */
|
|
24
|
+
type EntryValue = string | number | boolean | null;
|
|
25
|
+
|
|
26
|
+
/** One existing record the entry-time check flags as a possible duplicate. */
|
|
27
|
+
@ObjectType()
|
|
28
|
+
export class DuplicateEntryCandidateOutput {
|
|
29
|
+
/** The candidate's primary key as a compact URL segment; `CompositeKey.FromURLSegment` reads it back. */
|
|
30
|
+
@Field()
|
|
31
|
+
RecordID: string;
|
|
32
|
+
|
|
33
|
+
/** The candidate's name, or its key when the caller may not read a name. */
|
|
34
|
+
@Field()
|
|
35
|
+
DisplayName: string;
|
|
36
|
+
|
|
37
|
+
/** The vector similarity score that surfaced the candidate. */
|
|
38
|
+
@Field(() => Float)
|
|
39
|
+
VectorScore: number;
|
|
40
|
+
|
|
41
|
+
/** The decision's probability that the candidate is the same entity; null when it gave no answer. */
|
|
42
|
+
@Field(() => Float, { nullable: true })
|
|
43
|
+
Probability: number | null;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
/**
|
|
47
|
+
* The result of the `CheckDuplicateEntry` mutation. The mutation never throws to the client: an
|
|
48
|
+
* authorization denial is `Status: 'NotAuthorized'` and any other failure is `Status: 'Failed'`,
|
|
49
|
+
* each with an `ErrorMessage`.
|
|
50
|
+
*/
|
|
51
|
+
@ObjectType()
|
|
52
|
+
export class DuplicateEntryCheckOutput {
|
|
53
|
+
/** `Checked`, `NotConfigured`, `NotAuthorized` or `Failed`. */
|
|
54
|
+
@Field(() => String)
|
|
55
|
+
Status: DuplicateEntryCheckOutputStatus;
|
|
56
|
+
|
|
57
|
+
@Field({ nullable: true })
|
|
58
|
+
ErrorMessage?: string;
|
|
59
|
+
|
|
60
|
+
/** The flagged candidates, most probable first. Empty unless `Status` is `Checked`. */
|
|
61
|
+
@Field(() => [DuplicateEntryCandidateOutput])
|
|
62
|
+
Candidates: DuplicateEntryCandidateOutput[];
|
|
63
|
+
|
|
64
|
+
/** How long the check took on the server, in milliseconds. */
|
|
65
|
+
@Field(() => Int)
|
|
66
|
+
ElapsedMs: number;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
/** What the resolver needs from the detector. `DuplicateRecordDetector` provides it. */
|
|
70
|
+
export type DuplicateEntryChecker = Pick<DuplicateRecordDetector, 'CheckRecordValues'>;
|
|
71
|
+
|
|
72
|
+
/**
|
|
73
|
+
* Checks the values a person is entering for a new record against the entity's existing records,
|
|
74
|
+
* through `DuplicateRecordDetector.CheckRecordValues`, and returns the plausible duplicates to flag.
|
|
75
|
+
* It only flags: it saves, merges and blocks nothing.
|
|
76
|
+
*/
|
|
77
|
+
@Resolver()
|
|
78
|
+
export class DuplicateEntryCheckResolver extends ResolverBase {
|
|
79
|
+
/**
|
|
80
|
+
* Flags existing records that may duplicate a new record being entered.
|
|
81
|
+
*
|
|
82
|
+
* Authorization comes before any other work. An API key needs two scopes: `view:run` on the
|
|
83
|
+
* entity, the scope `RunDynamicView` checks, since the check reads the entity's records; and
|
|
84
|
+
* `prompt:execute`, the scope `ExecuteSimplePrompt` checks, since each check pays for an embedding
|
|
85
|
+
* and a decision-model call. A session without an API key skips both. Then the user needs read
|
|
86
|
+
* permission on the entity. A denial is `NotAuthorized`, and is not logged. The detector then
|
|
87
|
+
* narrows the candidates to the rows the user can read.
|
|
88
|
+
*
|
|
89
|
+
* The detector bounds the check's time on the server (`DUPLICATE_ENTRY_CHECK_SERVER_BUDGET_MS` in
|
|
90
|
+
* `@memberjunction/ai-vector-dupe`), a little above the form's own budget.
|
|
91
|
+
*
|
|
92
|
+
* @param entityName The entity the new record belongs to.
|
|
93
|
+
* @param valuesJSON The entered values as the JSON of an object, by field name, at most
|
|
94
|
+
* {@link DUPLICATE_ENTRY_CHECK_MAX_VALUES_JSON_LENGTH} characters. Each value is a string,
|
|
95
|
+
* number, boolean or null. Fields the entity does not have, primary keys, read-only fields and
|
|
96
|
+
* MJ system fields are ignored.
|
|
97
|
+
*/
|
|
98
|
+
@Mutation(() => DuplicateEntryCheckOutput)
|
|
99
|
+
async CheckDuplicateEntry(
|
|
100
|
+
@Arg('entityName') entityName: string,
|
|
101
|
+
@Arg('valuesJSON') valuesJSON: string,
|
|
102
|
+
@Ctx() { userPayload, providers }: AppContext
|
|
103
|
+
): Promise<DuplicateEntryCheckOutput> {
|
|
104
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
105
|
+
return this.RunEntryCheck(entityName, valuesJSON, userPayload, provider);
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
/**
|
|
109
|
+
* The check without the GraphQL plumbing: authorizes, reads the values, and runs the detector.
|
|
110
|
+
* Never throws.
|
|
111
|
+
*
|
|
112
|
+
* @param provider the request's metadata provider; the global one when null
|
|
113
|
+
*/
|
|
114
|
+
public async RunEntryCheck(
|
|
115
|
+
entityName: string,
|
|
116
|
+
valuesJSON: string,
|
|
117
|
+
userPayload: UserPayload,
|
|
118
|
+
provider: IMetadataProvider | null
|
|
119
|
+
): Promise<DuplicateEntryCheckOutput> {
|
|
120
|
+
const startTime = Date.now();
|
|
121
|
+
const entity = (provider ?? new Metadata()).EntityByName(entityName);
|
|
122
|
+
if (!entity) {
|
|
123
|
+
return this.failure('Failed', 'Entity not found in metadata', startTime);
|
|
124
|
+
}
|
|
125
|
+
const denial = await this.authorizeEntryCheck(entity, userPayload, provider);
|
|
126
|
+
if (denial) {
|
|
127
|
+
return this.failure('NotAuthorized', denial, startTime);
|
|
128
|
+
}
|
|
129
|
+
try {
|
|
130
|
+
const user = this.GetUserFromPayload(userPayload);
|
|
131
|
+
if (!user) {
|
|
132
|
+
return this.failure('Failed', 'Unable to determine current user', startTime);
|
|
133
|
+
}
|
|
134
|
+
const values = this.parseValues(valuesJSON, entity);
|
|
135
|
+
if ('Error' in values) {
|
|
136
|
+
return this.failure('Failed', values.Error, startTime);
|
|
137
|
+
}
|
|
138
|
+
const result = await this.CreateEntryChecker(provider).CheckRecordValues(entity.Name, values.Values, user);
|
|
139
|
+
return this.mapResult(result);
|
|
140
|
+
} catch (error) {
|
|
141
|
+
const message = error instanceof Error ? error.message : String(error);
|
|
142
|
+
LogError(`CheckDuplicateEntry failed for ${entityName}: ${message}`);
|
|
143
|
+
return this.failure('Failed', message || 'Unknown error occurred', startTime);
|
|
144
|
+
}
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
/** The detector a check runs on, bound to the request's provider. */
|
|
148
|
+
protected CreateEntryChecker(provider: IMetadataProvider | null): DuplicateEntryChecker {
|
|
149
|
+
return new DuplicateRecordDetector(provider);
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
/**
|
|
153
|
+
* Why the caller may not run the check, or null when they may: the API-key scopes, then the
|
|
154
|
+
* user's read permission on the entity. A denial is an answer, not a fault, so nothing is logged.
|
|
155
|
+
*/
|
|
156
|
+
private async authorizeEntryCheck(
|
|
157
|
+
entity: EntityInfo,
|
|
158
|
+
userPayload: UserPayload,
|
|
159
|
+
provider: IMetadataProvider | null
|
|
160
|
+
): Promise<string | null> {
|
|
161
|
+
try {
|
|
162
|
+
await this.CheckAPIKeyScopeAuthorization('view:run', entity.Name, userPayload);
|
|
163
|
+
await this.CheckAPIKeyScopeAuthorization('prompt:execute', '*', userPayload);
|
|
164
|
+
this.CheckUserReadPermissions(entity.Name, userPayload, provider ?? undefined);
|
|
165
|
+
return null;
|
|
166
|
+
} catch (error) {
|
|
167
|
+
return error instanceof Error ? error.message : String(error);
|
|
168
|
+
}
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
/**
|
|
172
|
+
* Reads the entered values: the JSON of an object of scalar values, at most
|
|
173
|
+
* {@link DUPLICATE_ENTRY_CHECK_MAX_VALUES_JSON_LENGTH} characters, kept to the fields a person
|
|
174
|
+
* can enter (matched by name, case-insensitively, and keyed by the field's real name).
|
|
175
|
+
*/
|
|
176
|
+
private parseValues(valuesJSON: string, entity: EntityInfo): { Values: Record<string, EntryValue> } | { Error: string } {
|
|
177
|
+
if (valuesJSON.length > DUPLICATE_ENTRY_CHECK_MAX_VALUES_JSON_LENGTH) {
|
|
178
|
+
return { Error: `valuesJSON is ${valuesJSON.length} characters; the limit is ${DUPLICATE_ENTRY_CHECK_MAX_VALUES_JSON_LENGTH}` };
|
|
179
|
+
}
|
|
180
|
+
let parsed: unknown;
|
|
181
|
+
try {
|
|
182
|
+
parsed = JSON.parse(valuesJSON);
|
|
183
|
+
} catch (e) {
|
|
184
|
+
return { Error: `valuesJSON is not valid JSON: ${e instanceof Error ? e.message : String(e)}` };
|
|
185
|
+
}
|
|
186
|
+
if (!this.isPlainObject(parsed)) {
|
|
187
|
+
return { Error: 'valuesJSON must be the JSON of an object of field values' };
|
|
188
|
+
}
|
|
189
|
+
const values: Record<string, EntryValue> = {};
|
|
190
|
+
for (const [name, value] of Object.entries(parsed)) {
|
|
191
|
+
if (!this.isEntryValue(value)) {
|
|
192
|
+
return { Error: `valuesJSON field '${name}' must be a string, number, boolean or null` };
|
|
193
|
+
}
|
|
194
|
+
const field = entity.FieldByName(name);
|
|
195
|
+
if (field && this.isEnterable(field)) {
|
|
196
|
+
values[field.Name] = value;
|
|
197
|
+
}
|
|
198
|
+
}
|
|
199
|
+
return { Values: values };
|
|
200
|
+
}
|
|
201
|
+
|
|
202
|
+
/** Whether a person can enter the field: not a primary key, not read-only, not an MJ system field. */
|
|
203
|
+
private isEnterable(field: EntityFieldInfo): boolean {
|
|
204
|
+
return !field.IsPrimaryKey && !field.ReadOnly && !field.Name.startsWith('__mj_');
|
|
205
|
+
}
|
|
206
|
+
|
|
207
|
+
private isEntryValue(value: unknown): value is EntryValue {
|
|
208
|
+
return value === null || typeof value === 'string' || typeof value === 'number' || typeof value === 'boolean';
|
|
209
|
+
}
|
|
210
|
+
|
|
211
|
+
private isPlainObject(value: unknown): value is Record<string, unknown> {
|
|
212
|
+
return typeof value === 'object' && value !== null && !Array.isArray(value);
|
|
213
|
+
}
|
|
214
|
+
|
|
215
|
+
private mapResult(result: DuplicateEntryCheckResult): DuplicateEntryCheckOutput {
|
|
216
|
+
return {
|
|
217
|
+
Status: result.Status,
|
|
218
|
+
ErrorMessage: result.ErrorMessage,
|
|
219
|
+
Candidates: result.Candidates.map(c => ({
|
|
220
|
+
RecordID: c.RecordID,
|
|
221
|
+
DisplayName: c.DisplayName,
|
|
222
|
+
VectorScore: c.VectorScore,
|
|
223
|
+
Probability: c.Probability,
|
|
224
|
+
})),
|
|
225
|
+
ElapsedMs: result.ElapsedMs,
|
|
226
|
+
};
|
|
227
|
+
}
|
|
228
|
+
|
|
229
|
+
private failure(status: DuplicateEntryCheckOutputStatus, errorMessage: string, startTime: number): DuplicateEntryCheckOutput {
|
|
230
|
+
return { Status: status, ErrorMessage: errorMessage, Candidates: [], ElapsedMs: Date.now() - startTime };
|
|
231
|
+
}
|
|
232
|
+
}
|
|
@@ -31,10 +31,10 @@ export class CommunicationProviderMessageType {
|
|
|
31
31
|
AdditionalAttributes: string;
|
|
32
32
|
|
|
33
33
|
@Field()
|
|
34
|
-
_mj_CreatedAt: Date;
|
|
34
|
+
_mj_CreatedAt: Date; // case-violation-ok-legacy-back-compat: the property name is the GraphQL schema field name — renaming it breaks every client query
|
|
35
35
|
|
|
36
36
|
@Field()
|
|
37
|
-
_mj_UpdatedAt: Date;
|
|
37
|
+
_mj_UpdatedAt: Date; // case-violation-ok-legacy-back-compat: the property name is the GraphQL schema field name — renaming it breaks every client query
|
|
38
38
|
|
|
39
39
|
@Field()
|
|
40
40
|
CommunicationProvider?: string;
|
|
@@ -73,10 +73,10 @@ export class TemplateInputType {
|
|
|
73
73
|
IsActive: boolean;
|
|
74
74
|
|
|
75
75
|
@Field()
|
|
76
|
-
_mj_CreatedAt: Date;
|
|
76
|
+
_mj_CreatedAt: Date; // case-violation-ok-legacy-back-compat: the property name is the GraphQL schema field name — renaming it breaks every client query
|
|
77
77
|
|
|
78
78
|
@Field()
|
|
79
|
-
_mj_UpdatedAt: Date;
|
|
79
|
+
_mj_UpdatedAt: Date; // case-violation-ok-legacy-back-compat: the property name is the GraphQL schema field name — renaming it breaks every client query
|
|
80
80
|
|
|
81
81
|
@Field({ nullable: true })
|
|
82
82
|
Category?: string;
|
|
@@ -13,13 +13,13 @@ const REMOTE_OP_PROGRESS_TOPIC = 'RemoteOperationProgress';
|
|
|
13
13
|
@InputType()
|
|
14
14
|
export class ExecuteRemoteOperationInput {
|
|
15
15
|
@Field()
|
|
16
|
-
operationKey: string;
|
|
16
|
+
operationKey: string; // case-violation-ok-legacy-back-compat: the property name is the GraphQL schema field name — renaming it breaks every client query
|
|
17
17
|
|
|
18
18
|
@Field()
|
|
19
|
-
inputJSON: string;
|
|
19
|
+
inputJSON: string; // case-violation-ok-legacy-back-compat: the property name is the GraphQL schema field name — renaming it breaks every client query
|
|
20
20
|
|
|
21
21
|
@Field()
|
|
22
|
-
invokeMode: string;
|
|
22
|
+
invokeMode: string; // case-violation-ok-legacy-back-compat: the property name is the GraphQL schema field name — renaming it breaks every client query
|
|
23
23
|
|
|
24
24
|
/**
|
|
25
25
|
* Optional client-generated channel id. When set (attached mode over the wire), the server publishes every
|
|
@@ -27,7 +27,7 @@ export class ExecuteRemoteOperationInput {
|
|
|
27
27
|
* so the caller's `onProgress` fires live while the operation runs. Omitted for sync / no-progress calls.
|
|
28
28
|
*/
|
|
29
29
|
@Field(() => String, { nullable: true })
|
|
30
|
-
progressChannelId?: string;
|
|
30
|
+
progressChannelId?: string; // case-violation-ok-legacy-back-compat: the property name is the GraphQL schema field name — renaming it breaks every client query
|
|
31
31
|
}
|
|
32
32
|
|
|
33
33
|
/** A single streamed progress envelope delivered over the `RemoteOperationProgress` subscription. */
|
|
@@ -45,19 +45,19 @@ export class RemoteOperationProgressNotification {
|
|
|
45
45
|
@ObjectType()
|
|
46
46
|
export class ExecuteRemoteOperationResultType {
|
|
47
47
|
@Field(() => Boolean)
|
|
48
|
-
success: boolean;
|
|
48
|
+
success: boolean; // case-violation-ok-legacy-back-compat: the property name is the GraphQL schema field name — renaming it breaks every client query
|
|
49
49
|
|
|
50
50
|
@Field(() => String, { nullable: true })
|
|
51
|
-
resultCode?: string;
|
|
51
|
+
resultCode?: string; // case-violation-ok-legacy-back-compat: the property name is the GraphQL schema field name — renaming it breaks every client query
|
|
52
52
|
|
|
53
53
|
@Field(() => String, { nullable: true })
|
|
54
|
-
outputJSON?: string;
|
|
54
|
+
outputJSON?: string; // case-violation-ok-legacy-back-compat: the property name is the GraphQL schema field name — renaming it breaks every client query
|
|
55
55
|
|
|
56
56
|
@Field(() => String, { nullable: true })
|
|
57
|
-
handle?: string;
|
|
57
|
+
handle?: string; // case-violation-ok-legacy-back-compat: the property name is the GraphQL schema field name — renaming it breaks every client query
|
|
58
58
|
|
|
59
59
|
@Field(() => String, { nullable: true })
|
|
60
|
-
errorMessage?: string;
|
|
60
|
+
errorMessage?: string; // case-violation-ok-legacy-back-compat: the property name is the GraphQL schema field name — renaming it breaks every client query
|
|
61
61
|
}
|
|
62
62
|
|
|
63
63
|
/**
|
|
@@ -5,6 +5,7 @@ import { MJEntityDocumentEntity, MJVectorIndexEntity, MJVectorDatabaseEntity } f
|
|
|
5
5
|
import { ResolverBase } from '../generic/ResolverBase.js';
|
|
6
6
|
import { GetAIAPIKey } from '@memberjunction/ai';
|
|
7
7
|
import { VectorDBBase } from '@memberjunction/ai-vectordb';
|
|
8
|
+
import { AIEngine } from '@memberjunction/aiengine';
|
|
8
9
|
import { EscapeSQLString, MJGlobal, UUIDsEqual } from '@memberjunction/global';
|
|
9
10
|
|
|
10
11
|
/* ───── GraphQL types ───── */
|
|
@@ -99,7 +100,7 @@ export class FetchEntityVectorsResolver extends ResolverBase {
|
|
|
99
100
|
const metadataFilter: Record<string, unknown> = { Entity: { $eq: entityName } };
|
|
100
101
|
|
|
101
102
|
const queryResponse = await vectorDBInstance.QueryIndex({
|
|
102
|
-
id:
|
|
103
|
+
id: AIEngine.Instance.GetProviderIndexName(vectorIndex),
|
|
103
104
|
vector: uniformVector,
|
|
104
105
|
topK: limit,
|
|
105
106
|
includeMetadata: true,
|
|
@@ -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 {
|
|
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 =
|
|
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
|
|
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
|
|
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
|
|
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.
|
|
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.
|
|
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
|
|