@memberjunction/server 6.2.0-edge.0 → 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.
- 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 +11 -0
- package/dist/generated/graphql-schemas/__mj.d.ts.map +1 -1
- package/dist/generated/graphql-schemas/__mj.js +48 -0
- 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 +3 -1
- package/dist/generic/FireAndForgetHeartbeat.d.ts.map +1 -1
- package/dist/generic/FireAndForgetHeartbeat.js +8 -4
- package/dist/generic/FireAndForgetHeartbeat.js.map +1 -1
- package/dist/generic/PushStatusResolver.d.ts +10 -1
- package/dist/generic/PushStatusResolver.d.ts.map +1 -1
- package/dist/generic/PushStatusResolver.js +11 -3
- package/dist/generic/PushStatusResolver.js.map +1 -1
- package/dist/generic/ResolverBase.d.ts +5 -1
- package/dist/generic/ResolverBase.d.ts.map +1 -1
- package/dist/generic/ResolverBase.js +15 -8
- package/dist/generic/ResolverBase.js.map +1 -1
- package/dist/index.d.ts +6 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +30 -9
- 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/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/RealtimeBridgeResolver.js +3 -3
- package/dist/resolvers/RealtimeClientSessionResolver.js +3 -3
- package/dist/resolvers/RemoteBrowserActionResolver.js +5 -5
- package/dist/resolvers/RunAIAgentResolver.d.ts +10 -4
- package/dist/resolvers/RunAIAgentResolver.d.ts.map +1 -1
- package/dist/resolvers/RunAIAgentResolver.js +69 -38
- 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/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/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 +92 -92
- package/src/__tests__/DeleteOptionsInput.wireShape.test.ts +62 -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__/RealtimeSdpBrokerHandler.test.ts +6 -6
- package/src/__tests__/RefreshAdoptsNewColumns.test.ts +8 -8
- package/src/__tests__/RemoteBrowserGoalEngine.test.ts +18 -18
- package/src/__tests__/RunAIAgentResolver.historyFrom.test.ts +228 -0
- package/src/__tests__/TaskGraphActionRunner.durablePayload.test.ts +129 -0
- package/src/__tests__/TaskGraphFrameResolver.test.ts +2 -2
- 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__/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__/principals.test.ts +22 -22
- 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 +3 -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 +37 -0
- package/src/generic/CacheInvalidationResolver.ts +148 -4
- package/src/generic/DeleteOptionsInput.ts +9 -2
- package/src/generic/FireAndForgetHeartbeat.ts +19 -14
- package/src/generic/PushStatusResolver.ts +21 -7
- package/src/generic/ResolverBase.ts +16 -8
- package/src/generic/RunViewResolver.ts +22 -22
- package/src/generic/__tests__/FireAndForgetHeartbeat.test.ts +7 -7
- package/src/index.ts +35 -9
- 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/AgentSessionResolver.ts +3 -3
- package/src/resolvers/ColorResolver.ts +6 -6
- package/src/resolvers/ComponentRegistryResolver.ts +36 -36
- package/src/resolvers/EntityCommunicationsResolver.ts +4 -4
- package/src/resolvers/ExecuteRemoteOperationResolver.ts +9 -9
- 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/QueryResolver.ts +13 -13
- package/src/resolvers/RealtimeBridgeResolver.ts +3 -3
- package/src/resolvers/RealtimeClientSessionResolver.ts +3 -3
- package/src/resolvers/RemoteBrowserActionResolver.ts +5 -5
- package/src/resolvers/RunAIAgentResolver.ts +113 -72
- package/src/resolvers/RunAIPromptResolver.ts +22 -22
- 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/__tests__/GetDataResolver.tokens.test.ts +40 -38
- 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
|
@@ -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
|
|
|
@@ -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 {
|
|
10
|
-
import {
|
|
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 (!
|
|
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 =
|
|
143
|
-
const systemUser = await
|
|
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
|
-
|
|
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
|
|
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
|
|
313
|
+
export function GetAccessTokenCount(): number {
|
|
309
314
|
return __accessTokens.length;
|
|
310
315
|
}
|
|
311
316
|
|
|
312
|
-
|
|
313
|
-
|
|
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 (
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
|
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,
|
|
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 =
|
|
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
|
|
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
|
-
|
|
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(
|
|
273
|
+
Warnings: delta.Warnings.map(FromCoreWarning),
|
|
269
274
|
DeltaToken: delta.DeltaToken,
|
|
270
275
|
};
|
|
271
276
|
}
|
|
272
277
|
|
|
273
|
-
|
|
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
|
-
|
|
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
|
|
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
|
|
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
|
-
|
|
329
|
-
return { Success: false, ResultCode: 'UNEXPECTED_ERROR', Message: `${op}: ${message}` };
|
|
374
|
+
return AcceptInvitationUnexpected(e, op);
|
|
330
375
|
}
|
|
331
376
|
|
|
332
|
-
export function
|
|
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 =
|
|
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
|
|
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 =
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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(
|
|
462
|
-
const target = input.Target ?
|
|
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
|
|
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:
|
|
484
|
-
: { kind: 'role', 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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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(
|
|
610
|
+
return shares.map(FromCoreShareSummary);
|
|
561
611
|
}
|
|
562
612
|
|
|
563
613
|
@Query(() => [SharedListSummaryType])
|