@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
|
@@ -18,7 +18,7 @@ import { mj_core_schema } from '../../config.js';
|
|
|
18
18
|
|
|
19
19
|
|
|
20
20
|
|
|
21
|
-
import { MJAIActionEntity, MJAIAgentActionEntity, MJAIAgentArtifactTypeEntity, MJAIAgentCategoryEntity, MJAIAgentChannelEntity, MJAIAgentClientToolEntity, MJAIAgentCoAgentEntity, MJAIAgentConfigurationEntity, MJAIAgentCredentialEntity, MJAIAgentDataSourceEntity, MJAIAgentExampleEntity, MJAIAgentHarnessEntity, MJAIAgentLearningCycleEntity, MJAIAgentModalityEntity, MJAIAgentModelEntity, MJAIAgentNoteTypeEntity, MJAIAgentNoteEntity, MJAIAgentPermissionEntity, MJAIAgentPersonaEntity, MJAIAgentPromptEntity, MJAIAgentRelationshipEntity, MJAIAgentRequestTypeEntity, MJAIAgentRequestEntity, MJAIAgentRunMediaEntity, MJAIAgentRunStepEntity, MJAIAgentRunEntity, MJAIAgentSearchScopeEntity, MJAIAgentSessionBridgeParticipantEntity, MJAIAgentSessionBridgeEntity, MJAIAgentSessionChannelEntity, MJAIAgentSessionEntity, MJAIAgentSkillEntity, MJAIAgentStepPathEntity, MJAIAgentStepEntity, MJAIAgentTypeEntity, MJAIAgentEntity, MJAIArchitectureEntity, MJAIBridgeAgentIdentityEntity, MJAIBridgeProviderChannelEntity, MJAIBridgeProviderEntity, MJAIClientToolDefinitionEntity, MJAIConfigurationParamEntity, MJAIConfigurationEntity, MJAICredentialBindingEntity, MJAIModalityEntity, MJAIModelActionEntity, MJAIModelArchitectureEntity, MJAIModelCostEntity, MJAIModelModalityEntity, MJAIModelPersonaEntity, MJAIModelPriceTypeEntity, MJAIModelPriceUnitTypeEntity, MJAIModelTypeEntity, MJAIModelVendorEntity, MJAIModelEntity, MJAIPersonaVendorEntity, MJAIPersonaEntity, MJAIPromptCategoryEntity, MJAIPromptModelEntity, MJAIPromptRunMediaEntity, MJAIPromptRunEntity, MJAIPromptTypeEntity, MJAIPromptEntity, MJAIRemoteBrowserProviderEntity, MJAIResultCacheEntity, MJAISkillActionEntity, MJAISkillPermissionEntity, MJAISkillSearchScopeEntity, MJAISkillSubAgentEntity, MJAISkillEntity, MJAIUsageTypeEntity, MJAIVendorTypeDefinitionEntity, MJAIVendorTypeEntity, MJAIVendorEntity, MJAPIApplicationScopeEntity, MJAPIApplicationEntity, MJAPIKeyApplicationEntity, MJAPIKeyScopeEntity, MJAPIKeyUsageLogEntity, MJAPIKeyEntity, MJAPIScopeEntity, MJAccessControlRuleEntity, MJActionAuthorizationEntity, MJActionCategoryEntity, MJActionContextTypeEntity, MJActionContextEntity, MJActionExecutionLogEntity, MJActionFilterEntity, MJActionLibraryEntity, MJActionParamEntity, MJActionResultCodeEntity, MJActionEntity, MJApplicationEntityEntity, MJApplicationRoleEntity, MJApplicationSettingEntity, MJApplicationEntity, MJArchiveConfigurationEntityEntity, MJArchiveConfigurationEntity, MJArchiveRunDetailEntity, MJArchiveRunEntity, MJArtifactPermissionEntity, MJArtifactTypeEntity, MJArtifactUseEntity, MJArtifactVersionAttributeEntity, MJArtifactVersionEntity, MJArtifactEntity, MJAuditLogTypeEntity, MJAuditLogEntity, MJAuthenticationProviderEntity, MJAuthorizationRoleEntity, MJAuthorizationEntity, MJClusterAnalysisEntity, MJClusterAnalysisClusterEntity, MJCollectionArtifactEntity, MJCollectionPermissionEntity, MJCollectionEntity, MJCommunicationBaseMessageTypeEntity, MJCommunicationLogEntity, MJCommunicationProviderMessageTypeEntity, MJCommunicationProviderEntity, MJCommunicationRunEntity, MJCompanyEntity, MJCompanyIntegrationEntityMapEntity, MJCompanyIntegrationFieldMapEntity, MJCompanyIntegrationRecordMapEntity, MJCompanyIntegrationRunAPILogEntity, MJCompanyIntegrationRunDetailEntity, MJCompanyIntegrationRunEntity, MJCompanyIntegrationSyncWatermarkEntity, MJCompanyIntegrationEntity, MJComponentDependencyEntity, MJComponentLibraryEntity, MJComponentLibraryLinkEntity, MJComponentRegistryEntity, MJComponentEntity, MJContentFileTypeEntity, MJContentItemAttributeEntity, MJContentItemChunkEntity, MJContentItemDuplicateEntity, MJContentItemTagEntity, MJContentItemEntity, MJContentProcessRunDetailEntity, MJContentProcessRunPromptRunEntity, MJContentProcessRunEntity, MJContentSourceParamEntity, MJContentSourceTypeParamEntity, MJContentSourceTypeEntity, MJContentSourceEntity, MJContentTypeAttributeEntity, MJContentTypeEntity, MJConversationArtifactPermissionEntity, MJConversationArtifactVersionEntity, MJConversationArtifactEntity, MJConversationCompactionRunEntity, MJConversationDetailArtifactEntity, MJConversationDetailAttachmentEntity, MJConversationDetailRatingEntity, MJConversationDetailEntity, MJConversationSkillEntity, MJConversationWidgetInstanceEntity, MJConversationEntity, MJCountryEntity, MJCredentialCategoryEntity, MJCredentialTypeEntity, MJCredentialEntity, MJDashboardCategoryEntity, MJDashboardCategoryLinkEntity, MJDashboardCategoryPermissionEntity, MJDashboardPartTypeEntity, MJDashboardPermissionEntity, MJDashboardUserPreferenceEntity, MJDashboardUserStateEntity, MJDashboardEntity, MJDataContextItemEntity, MJDataContextEntity, MJDatasetItemEntity, MJDatasetEntity, MJDuplicateRunDetailMatchEntity, MJDuplicateRunDetailEntity, MJDuplicateRunEntity, MJEmployeeCompanyIntegrationEntity, MJEmployeeRoleEntity, MJEmployeeSkillEntity, MJEmployeeEntity, MJEncryptionAlgorithmEntity, MJEncryptionKeySourceEntity, MJEncryptionKeyEntity, MJEntityEntity, MJEntityAIActionEntity, MJEntityActionFilterEntity, MJEntityActionInvocationTypeEntity, MJEntityActionInvocationEntity, MJEntityActionParamEntity, MJEntityActionEntity, MJEntityCommunicationFieldEntity, MJEntityCommunicationMessageTypeEntity, MJEntityDocumentRunEntity, MJEntityDocumentSettingEntity, MJEntityDocumentTypeEntity, MJEntityDocumentEntity, MJEntityFieldPermissionEntity, MJEntityFieldValueEntity, MJEntityFieldEntity, MJEntityFormOverrideEntity, MJEntityOrganicKeyRelatedEntityEntity, MJEntityOrganicKeyEntity, MJEntityPermissionEntity, MJEntityRecordDocumentEntity, MJEntityRelationshipDisplayComponentEntity, MJEntityRelationshipEntity, MJEntitySettingEntity, MJEnvironmentEntity, MJErrorLogEntity, MJExperimentSessionIterationEntity, MJExperimentSessionEntity, MJExperimentEntity, MJExplorerNavigationItemEntity, MJExternalDataSourceTypeEntity, MJExternalDataSourceEntity, MJFeatureValueCacheEntity, MJFeatureValueEntity, MJFileCategoryEntity, MJFileEntityRecordLinkEntity, MJFileStorageAccountPermissionEntity, MJFileStorageAccountEntity, MJFileStorageProviderEntity, MJFileEntity, MJFormChromeRuleEntity, MJGeneratedCodeCategoryEntity, MJGeneratedCodeEntity, MJIdentityClaimTypeEntity, MJIdentityClaimEntity, MJInstanceConfigurationEntity, MJIntegrationObjectFieldEntity, MJIntegrationObjectEntity, MJIntegrationSourceTypeEntity, MJIntegrationURLFormatEntity, MJIntegrationEntity, MJKnowledgeHubSavedSearchEntity, MJLibraryEntity, MJLibraryItemEntity, MJListCategoryEntity, MJListDetailEntity, MJListInvitationEntity, MJListShareEntity, MJListEntity, MJMCPServerConnectionPermissionEntity, MJMCPServerConnectionToolEntity, MJMCPServerConnectionEntity, MJMCPServerToolEntity, MJMCPServerEntity, MJMCPToolExecutionLogEntity, MJMCPToolFavoriteEntity, MJMLAlgorithmUseCaseRankingEntity, MJMLAlgorithmUseCaseEntity, MJMLAlgorithmEntity, MJMLModelScoringBindingEntity, MJMLModelEntity, MJMLTrainingPipelineEntity, MJMLTrainingRunEntity, MJMagicLinkInviteAllowedDomainEntity, MJMagicLinkInviteAllowedPathEntity, MJMagicLinkInviteApplicationEntity, MJMagicLinkInviteRoleEntity, MJMagicLinkInviteEntity, MJMagicLinkRedemptionEntity, MJMaterializedResultQueryEntity, MJMaterializedResultEntity, MJOAuthAuthServerMetadataCacheEntity, MJOAuthAuthorizationStateEntity, MJOAuthClientRegistrationEntity, MJOAuthTokenEntity, MJOpenAppDependencyEntity, MJOpenAppInstallHistoryEntity, MJOpenAppEntity, MJOutputDeliveryTypeEntity, MJOutputFormatTypeEntity, MJPermissionDomainEntity, MJProcessRunDetailEntity, MJProcessRunEntity, MJProjectEntity, MJPublicLinkEntity, MJQueryEntity, MJQueryCategoryEntity, MJQueryDependencyEntity, MJQueryEntityEntity, MJQueryFieldEntity, MJQueryParameterEntity, MJQueryPermissionEntity, MJQuerySQLEntity, MJQueueTaskEntity, MJQueueTypeEntity, MJQueueEntity, MJRSUPendingWorkEntity, MJRecommendationItemEntity, MJRecommendationProviderEntity, MJRecommendationRunEntity, MJRecommendationEntity, MJRecordChangeReplayRunEntity, MJRecordChangeEntity, MJRecordGeoCodeEntity, MJRecordLinkEntity, MJRecordMergeDeletionLogEntity, MJRecordMergeLogEntity, MJRecordProcessCategoryEntity, MJRecordProcessWatermarkEntity, MJRecordProcessEntity, MJRemoteOperationCategoryEntity, MJRemoteOperationEntity, MJResourceLinkEntity, MJResourcePermissionEntity, MJResourceTypeEntity, MJRoleEntity, MJRowLevelSecurityFilterEntity, MJSQLDialectEntity, MJScheduledJobRunEntity, MJScheduledJobTypeEntity, MJScheduledJobEntity, MJSchemaInfoEntity, MJScopedPromptConfigEntity, MJScopedPromptPartEntity, MJSearchExecutionLogEntity, MJSearchProviderEntity, MJSearchScopeEntityEntity, MJSearchScopeExternalIndexEntity, MJSearchScopePermissionEntity, MJSearchScopeProviderEntity, MJSearchScopeStorageAccountEntity, MJSearchScopeTestQueryEntity, MJSearchScopeEntity, MJSignatureAccountEntity, MJSignatureProviderEntity, MJSignatureRequestDocumentEntity, MJSignatureRequestLogEntity, MJSignatureRequestRecipientEntity, MJSignatureRequestEntity, MJSkillEntity, MJStateProvinceEntity, MJTagAuditLogEntity, MJTagCoOccurrenceEntity, MJTagScopeEntity, MJTagSuggestionEntity, MJTagSynonymEntity, MJTaggedItemEntity, MJTagEntity, MJTaskDependencyEntity, MJTaskTypeEntity, MJTaskEntity, MJTemplateCategoryEntity, MJTemplateContentTypeEntity, MJTemplateContentEntity, MJTemplateParamEntity, MJTemplateEntity, MJTestRubricEntity, MJTestRunFeedbackEntity, MJTestRunOutputTypeEntity, MJTestRunOutputEntity, MJTestRunEntity, MJTestSuiteRunEntity, MJTestSuiteTestEntity, MJTestSuiteEntity, MJTestTypeEntity, MJTestEntity, MJThemeEntity, MJUserApplicationEntityEntity, MJUserApplicationEntity, MJUserFavoriteEntity, MJUserNotificationPreferenceEntity, MJUserNotificationTypeEntity, MJUserNotificationEntity, MJUserRecordLogEntity, MJUserRoleEntity, MJUserRoutineRecipientEntity, MJUserRoutineRunEntity, MJUserRoutineEntity, MJUserSettingEntity, MJUserViewCategoryEntity, MJUserViewRunDetailEntity, MJUserViewRunEntity, MJUserViewEntity, MJUserEntity, MJVectorDatabaseEntity, MJVectorIndexEntity, MJVersionInstallationEntity, MJVersionLabelItemEntity, MJVersionLabelRestoreEntity, MJVersionLabelEntity, MJViewTypeEntity, MJWebSearchProviderEntity, MJWorkspaceItemEntity, MJWorkspaceEntity } from '@memberjunction/core-entities';
|
|
21
|
+
import { MJAIActionEntity, MJAIAgentActionEntity, MJAIAgentArtifactTypeEntity, MJAIAgentCategoryEntity, MJAIAgentChannelEntity, MJAIAgentClientToolEntity, MJAIAgentCoAgentEntity, MJAIAgentConfigurationEntity, MJAIAgentCredentialEntity, MJAIAgentDataSourceEntity, MJAIAgentExampleEntity, MJAIAgentHarnessEntity, MJAIAgentLearningCycleEntity, MJAIAgentModalityEntity, MJAIAgentModelEntity, MJAIAgentNoteTypeEntity, MJAIAgentNoteEntity, MJAIAgentPermissionEntity, MJAIAgentPersonaEntity, MJAIAgentPromptEntity, MJAIAgentRelationshipEntity, MJAIAgentRequestTypeEntity, MJAIAgentRequestEntity, MJAIAgentRubricEntity, MJAIAgentRunMediaEntity, MJAIAgentRunStepEntity, MJAIAgentRunEntity, MJAIAgentSearchScopeEntity, MJAIAgentSessionBridgeParticipantEntity, MJAIAgentSessionBridgeEntity, MJAIAgentSessionChannelEntity, MJAIAgentSessionEntity, MJAIAgentSkillEntity, MJAIAgentStepPathEntity, MJAIAgentStepEntity, MJAIAgentTypeEntity, MJAIAgentEntity, MJAIArchitectureEntity, MJAIBridgeAgentIdentityEntity, MJAIBridgeProviderChannelEntity, MJAIBridgeProviderEntity, MJAIClientToolDefinitionEntity, MJAIConfigurationParamEntity, MJAIConfigurationEntity, MJAICredentialBindingEntity, MJAIModalityEntity, MJAIModelActionEntity, MJAIModelArchitectureEntity, MJAIModelCostEntity, MJAIModelModalityEntity, MJAIModelPersonaEntity, MJAIModelPriceTypeEntity, MJAIModelPriceUnitTypeEntity, MJAIModelTypeEntity, MJAIModelVendorEntity, MJAIModelEntity, MJAIPersonaVendorEntity, MJAIPersonaEntity, MJAIPromptCategoryEntity, MJAIPromptModelEntity, MJAIPromptRunMediaEntity, MJAIPromptRunEntity, MJAIPromptTypeEntity, MJAIPromptEntity, MJAIRemoteBrowserProviderEntity, MJAIResultCacheEntity, MJAISkillActionEntity, MJAISkillPermissionEntity, MJAISkillSearchScopeEntity, MJAISkillSubAgentEntity, MJAISkillEntity, MJAIUsageTypeEntity, MJAIVendorTypeDefinitionEntity, MJAIVendorTypeEntity, MJAIVendorEntity, MJAPIApplicationScopeEntity, MJAPIApplicationEntity, MJAPIKeyApplicationEntity, MJAPIKeyScopeEntity, MJAPIKeyUsageLogEntity, MJAPIKeyEntity, MJAPIScopeEntity, MJAccessControlRuleEntity, MJActionAuthorizationEntity, MJActionCategoryEntity, MJActionContextTypeEntity, MJActionContextEntity, MJActionExecutionLogEntity, MJActionFilterEntity, MJActionLibraryEntity, MJActionParamEntity, MJActionResultCodeEntity, MJActionEntity, MJApplicationEntityEntity, MJApplicationRoleEntity, MJApplicationSettingEntity, MJApplicationEntity, MJArchiveConfigurationEntityEntity, MJArchiveConfigurationEntity, MJArchiveRunDetailEntity, MJArchiveRunEntity, MJArtifactPermissionEntity, MJArtifactTypeEntity, MJArtifactUseEntity, MJArtifactVersionAttributeEntity, MJArtifactVersionEntity, MJArtifactEntity, MJAuditLogTypeEntity, MJAuditLogEntity, MJAuthenticationProviderEntity, MJAuthorizationRoleEntity, MJAuthorizationEntity, MJClusterAnalysisEntity, MJClusterAnalysisClusterEntity, MJCollectionArtifactEntity, MJCollectionPermissionEntity, MJCollectionEntity, MJCommunicationBaseMessageTypeEntity, MJCommunicationLogEntity, MJCommunicationProviderMessageTypeEntity, MJCommunicationProviderEntity, MJCommunicationRunEntity, MJCompanyEntity, MJCompanyIntegrationEntityMapEntity, MJCompanyIntegrationFieldMapEntity, MJCompanyIntegrationRecordMapEntity, MJCompanyIntegrationRunAPILogEntity, MJCompanyIntegrationRunDetailEntity, MJCompanyIntegrationRunEntity, MJCompanyIntegrationSyncWatermarkEntity, MJCompanyIntegrationEntity, MJComponentDependencyEntity, MJComponentLibraryEntity, MJComponentLibraryLinkEntity, MJComponentRegistryEntity, MJComponentEntity, MJContentFileTypeEntity, MJContentItemAttributeEntity, MJContentItemChunkEntity, MJContentItemDuplicateEntity, MJContentItemTagEntity, MJContentItemEntity, MJContentProcessRunDetailEntity, MJContentProcessRunPromptRunEntity, MJContentProcessRunEntity, MJContentSourceParamEntity, MJContentSourceTypeParamEntity, MJContentSourceTypeEntity, MJContentSourceEntity, MJContentTypeAttributeEntity, MJContentTypeEntity, MJConversationArtifactPermissionEntity, MJConversationArtifactVersionEntity, MJConversationArtifactEntity, MJConversationCompactionRunEntity, MJConversationDetailArtifactEntity, MJConversationDetailAttachmentEntity, MJConversationDetailRatingEntity, MJConversationDetailEntity, MJConversationSkillEntity, MJConversationWidgetInstanceEntity, MJConversationEntity, MJCountryEntity, MJCredentialCategoryEntity, MJCredentialTypeEntity, MJCredentialEntity, MJDashboardCategoryEntity, MJDashboardCategoryLinkEntity, MJDashboardCategoryPermissionEntity, MJDashboardPartTypeEntity, MJDashboardPermissionEntity, MJDashboardUserPreferenceEntity, MJDashboardUserStateEntity, MJDashboardEntity, MJDataContextItemEntity, MJDataContextEntity, MJDatasetItemEntity, MJDatasetEntity, MJDuplicateRunDetailMatchEntity, MJDuplicateRunDetailEntity, MJDuplicateRunEntity, MJEmployeeCompanyIntegrationEntity, MJEmployeeRoleEntity, MJEmployeeSkillEntity, MJEmployeeEntity, MJEncryptionAlgorithmEntity, MJEncryptionKeySourceEntity, MJEncryptionKeyEntity, MJEntityEntity, MJEntityAIActionEntity, MJEntityActionFilterEntity, MJEntityActionInvocationTypeEntity, MJEntityActionInvocationEntity, MJEntityActionParamEntity, MJEntityActionEntity, MJEntityCommunicationFieldEntity, MJEntityCommunicationMessageTypeEntity, MJEntityDocumentRunEntity, MJEntityDocumentSettingEntity, MJEntityDocumentTypeEntity, MJEntityDocumentEntity, MJEntityFieldPermissionEntity, MJEntityFieldValueEntity, MJEntityFieldEntity, MJEntityFormOverrideEntity, MJEntityOrganicKeyRelatedEntityEntity, MJEntityOrganicKeyEntity, MJEntityPermissionEntity, MJEntityRecordDocumentEntity, MJEntityRelationshipDisplayComponentEntity, MJEntityRelationshipEntity, MJEntitySettingEntity, MJEnvironmentEntity, MJErrorLogEntity, MJExperimentSessionIterationEntity, MJExperimentSessionEntity, MJExperimentEntity, MJExplorerNavigationItemEntity, MJExternalDataSourceTypeEntity, MJExternalDataSourceEntity, MJFeaturePipelineTypeEntity, MJFeatureValueCacheEntity, MJFeatureValueEntity, MJFileCategoryEntity, MJFileEntityRecordLinkEntity, MJFileStorageAccountPermissionEntity, MJFileStorageAccountEntity, MJFileStorageProviderEntity, MJFileEntity, MJFormChromeRuleEntity, MJGeneratedCodeCategoryEntity, MJGeneratedCodeEntity, MJIdentityClaimTypeEntity, MJIdentityClaimEntity, MJInstanceConfigurationEntity, MJIntegrationObjectFieldEntity, MJIntegrationObjectEntity, MJIntegrationSourceTypeEntity, MJIntegrationURLFormatEntity, MJIntegrationEntity, MJKnowledgeHubSavedSearchEntity, MJLibraryEntity, MJLibraryItemEntity, MJListCategoryEntity, MJListDetailEntity, MJListInvitationEntity, MJListShareEntity, MJListEntity, MJMCPServerConnectionPermissionEntity, MJMCPServerConnectionToolEntity, MJMCPServerConnectionEntity, MJMCPServerToolEntity, MJMCPServerEntity, MJMCPToolExecutionLogEntity, MJMCPToolFavoriteEntity, MJMLAlgorithmUseCaseRankingEntity, MJMLAlgorithmUseCaseEntity, MJMLAlgorithmEntity, MJMLModelScoringBindingEntity, MJMLModelEntity, MJMLTrainingPipelineEntity, MJMLTrainingRunEntity, MJMagicLinkInviteAllowedDomainEntity, MJMagicLinkInviteAllowedPathEntity, MJMagicLinkInviteApplicationEntity, MJMagicLinkInviteRoleEntity, MJMagicLinkInviteEntity, MJMagicLinkRedemptionEntity, MJMaterializedResultQueryEntity, MJMaterializedResultEntity, MJOAuthAuthServerMetadataCacheEntity, MJOAuthAuthorizationStateEntity, MJOAuthClientRegistrationEntity, MJOAuthTokenEntity, MJOpenAppDependencyEntity, MJOpenAppInstallHistoryEntity, MJOpenAppEntity, MJOutputDeliveryTypeEntity, MJOutputFormatTypeEntity, MJPermissionDomainEntity, MJProcessRunDetailEntity, MJProcessRunEntity, MJProjectEntity, MJPublicLinkEntity, MJQueryEntity, MJQueryCategoryEntity, MJQueryDependencyEntity, MJQueryEntityEntity, MJQueryFieldEntity, MJQueryParameterEntity, MJQueryPermissionEntity, MJQuerySQLEntity, MJQueueTaskEntity, MJQueueTypeEntity, MJQueueEntity, MJRSUPendingWorkEntity, MJRecommendationItemEntity, MJRecommendationProviderEntity, MJRecommendationRunEntity, MJRecommendationEntity, MJRecordChangeReplayRunEntity, MJRecordChangeEntity, MJRecordCloneLogItemEntity, MJRecordCloneLogEntity, MJRecordGeoCodeEntity, MJRecordLinkEntity, MJRecordMergeDeletionLogEntity, MJRecordMergeLogEntity, MJRecordProcessCategoryEntity, MJRecordProcessWatermarkEntity, MJRecordProcessEntity, MJRemoteOperationCategoryEntity, MJRemoteOperationEntity, MJResourceLinkEntity, MJResourcePermissionEntity, MJResourceTypeEntity, MJRoleEntity, MJRowLevelSecurityFilterEntity, MJRubricBandEntity, MJRubricCategoryEntity, MJRubricCriterionEntity, MJRubricCriterionLevelEntity, MJRubricEvaluationScoreEntity, MJRubricEvaluationEntity, MJRubricScaleLevelEntity, MJRubricScaleEntity, MJRubricVersionEntity, MJRubricEntity, MJSQLDialectEntity, MJScheduledJobRunEntity, MJScheduledJobTypeEntity, MJScheduledJobEntity, MJSchemaInfoEntity, MJScopedPromptConfigEntity, MJScopedPromptPartEntity, MJSearchExecutionLogEntity, MJSearchProviderEntity, MJSearchScopeEntityEntity, MJSearchScopeExternalIndexEntity, MJSearchScopePermissionEntity, MJSearchScopeProviderEntity, MJSearchScopeStorageAccountEntity, MJSearchScopeTestQueryEntity, MJSearchScopeEntity, MJSignatureAccountEntity, MJSignatureProviderEntity, MJSignatureRequestDocumentEntity, MJSignatureRequestLogEntity, MJSignatureRequestRecipientEntity, MJSignatureRequestEntity, MJSkillEntity, MJStateProvinceEntity, MJTagAuditLogEntity, MJTagCoOccurrenceEntity, MJTagScopeEntity, MJTagSuggestionEntity, MJTagSynonymEntity, MJTaggedItemEntity, MJTagEntity, MJTaskDependencyEntity, MJTaskTypeEntity, MJTaskEntity, MJTemplateCategoryEntity, MJTemplateContentTypeEntity, MJTemplateContentEntity, MJTemplateParamEntity, MJTemplateEntity, MJTestRubricEntity, MJTestRunFeedbackEntity, MJTestRunOutputTypeEntity, MJTestRunOutputEntity, MJTestRunEntity, MJTestSuiteRunEntity, MJTestSuiteTestEntity, MJTestSuiteEntity, MJTestTypeEntity, MJTestEntity, MJThemeEntity, MJUserApplicationEntityEntity, MJUserApplicationEntity, MJUserFavoriteEntity, MJUserNotificationPreferenceEntity, MJUserNotificationTypeEntity, MJUserNotificationEntity, MJUserRecordLogEntity, MJUserRoleEntity, MJUserRoutineRecipientEntity, MJUserRoutineRunEntity, MJUserRoutineEntity, MJUserSettingEntity, MJUserViewCategoryEntity, MJUserViewRunDetailEntity, MJUserViewRunEntity, MJUserViewEntity, MJUserEntity, MJVectorDatabaseEntity, MJVectorIndexEntity, MJVersionInstallationEntity, MJVersionLabelItemEntity, MJVersionLabelRestoreEntity, MJVersionLabelEntity, MJViewTypeEntity, MJWebSearchProviderEntity, MJWorkspaceItemEntity, MJWorkspaceEntity } from '@memberjunction/core-entities';
|
|
22
22
|
|
|
23
23
|
|
|
24
24
|
//****************************************************************************
|
|
@@ -5379,6 +5379,242 @@ export class MJAIAgentRequestResolver extends ResolverBase {
|
|
|
5379
5379
|
|
|
5380
5380
|
}
|
|
5381
5381
|
|
|
5382
|
+
//****************************************************************************
|
|
5383
|
+
// ENTITY CLASS for MJ: AI Agent Rubrics
|
|
5384
|
+
//****************************************************************************
|
|
5385
|
+
@ObjectType({ description: `A rubric an agent publishes for how it should be judged: Evaluation (used by agent eval tests), SelfCheck (the agent checks its own output before returning), or ProductionSampling (a share of real runs is evaluated asynchronously to watch for drift).` })
|
|
5386
|
+
export class MJAIAgentRubric_ {
|
|
5387
|
+
@Field()
|
|
5388
|
+
@MaxLength(36)
|
|
5389
|
+
ID: string;
|
|
5390
|
+
|
|
5391
|
+
@Field({nullable: true})
|
|
5392
|
+
@MaxLength(36)
|
|
5393
|
+
AgentID?: string;
|
|
5394
|
+
|
|
5395
|
+
@Field({nullable: true})
|
|
5396
|
+
@MaxLength(36)
|
|
5397
|
+
RubricID?: string;
|
|
5398
|
+
|
|
5399
|
+
@Field({nullable: true, description: `How the agent uses the rubric: Evaluation, SelfCheck or ProductionSampling.`})
|
|
5400
|
+
@MaxLength(30)
|
|
5401
|
+
Purpose?: string;
|
|
5402
|
+
|
|
5403
|
+
@Field(() => Boolean, {nullable: true, description: `1 = the rubric used for this purpose when a caller does not name one.`})
|
|
5404
|
+
IsDefault?: boolean;
|
|
5405
|
+
|
|
5406
|
+
@Field({nullable: true, description: `Active links are used; Disabled links are kept but ignored.`})
|
|
5407
|
+
@MaxLength(20)
|
|
5408
|
+
Status?: string;
|
|
5409
|
+
|
|
5410
|
+
@Field(() => Float, {nullable: true, description: `Overrides the rubric version's PassThreshold (0..1) for this agent and purpose. NULL = use the version default.`})
|
|
5411
|
+
PassThreshold?: number;
|
|
5412
|
+
|
|
5413
|
+
@Field(() => Float, {nullable: true, description: `Share (0..1) of completed production runs to evaluate. Required for ProductionSampling. Sampling is deterministic on the run ID so it is reproducible.`})
|
|
5414
|
+
SampleRate?: number;
|
|
5415
|
+
|
|
5416
|
+
@Field(() => Int, {nullable: true, description: `For SelfCheck: how many times the agent may revise its output after a failed self-check before returning anyway (with the failure recorded). NULL = 1.`})
|
|
5417
|
+
MaxSelfCheckAttempts?: number;
|
|
5418
|
+
|
|
5419
|
+
@Field({nullable: true, description: `JSON (IRubricEvaluatorSelection) naming which evaluator to use and its settings (e.g. judge prompt, model), overriding the defaults.`})
|
|
5420
|
+
EvaluatorConfig?: string;
|
|
5421
|
+
|
|
5422
|
+
@Field(() => Int, {nullable: true, description: `Display and evaluation order when an agent has several rubrics for one purpose.`})
|
|
5423
|
+
Sequence?: number;
|
|
5424
|
+
|
|
5425
|
+
@Field()
|
|
5426
|
+
_mj__CreatedAt: Date;
|
|
5427
|
+
|
|
5428
|
+
@Field()
|
|
5429
|
+
_mj__UpdatedAt: Date;
|
|
5430
|
+
|
|
5431
|
+
@Field({nullable: true})
|
|
5432
|
+
@MaxLength(255)
|
|
5433
|
+
Agent?: string;
|
|
5434
|
+
|
|
5435
|
+
@Field({nullable: true})
|
|
5436
|
+
@MaxLength(255)
|
|
5437
|
+
Rubric?: string;
|
|
5438
|
+
|
|
5439
|
+
@Field(() => [String], { nullable: true, description: `Field-level security: when non-null, the fields on this entity the calling user may read. Any other field arriving as null was withheld by the server rather than genuinely empty. Null for callers with no field restrictions.` })
|
|
5440
|
+
ReadableFields___?: string[];
|
|
5441
|
+
|
|
5442
|
+
}
|
|
5443
|
+
|
|
5444
|
+
//****************************************************************************
|
|
5445
|
+
// INPUT TYPE for MJ: AI Agent Rubrics
|
|
5446
|
+
//****************************************************************************
|
|
5447
|
+
@InputType()
|
|
5448
|
+
export class CreateMJAIAgentRubricInput {
|
|
5449
|
+
@Field({ nullable: true })
|
|
5450
|
+
ID?: string;
|
|
5451
|
+
|
|
5452
|
+
@Field({ nullable: true })
|
|
5453
|
+
AgentID?: string;
|
|
5454
|
+
|
|
5455
|
+
@Field({ nullable: true })
|
|
5456
|
+
RubricID?: string;
|
|
5457
|
+
|
|
5458
|
+
@Field({ nullable: true })
|
|
5459
|
+
Purpose?: string;
|
|
5460
|
+
|
|
5461
|
+
@Field(() => Boolean, { nullable: true })
|
|
5462
|
+
IsDefault?: boolean;
|
|
5463
|
+
|
|
5464
|
+
@Field({ nullable: true })
|
|
5465
|
+
Status?: string;
|
|
5466
|
+
|
|
5467
|
+
@Field(() => Float, { nullable: true })
|
|
5468
|
+
PassThreshold: number | null;
|
|
5469
|
+
|
|
5470
|
+
@Field(() => Float, { nullable: true })
|
|
5471
|
+
SampleRate: number | null;
|
|
5472
|
+
|
|
5473
|
+
@Field(() => Int, { nullable: true })
|
|
5474
|
+
MaxSelfCheckAttempts: number | null;
|
|
5475
|
+
|
|
5476
|
+
@Field({ nullable: true })
|
|
5477
|
+
EvaluatorConfig: string | null;
|
|
5478
|
+
|
|
5479
|
+
@Field(() => Int, { nullable: true })
|
|
5480
|
+
Sequence?: number;
|
|
5481
|
+
|
|
5482
|
+
@Field(() => RestoreContextInput, { nullable: true })
|
|
5483
|
+
RestoreContext___?: RestoreContextInput;
|
|
5484
|
+
}
|
|
5485
|
+
|
|
5486
|
+
|
|
5487
|
+
//****************************************************************************
|
|
5488
|
+
// INPUT TYPE for MJ: AI Agent Rubrics
|
|
5489
|
+
//****************************************************************************
|
|
5490
|
+
@InputType()
|
|
5491
|
+
export class UpdateMJAIAgentRubricInput {
|
|
5492
|
+
@Field()
|
|
5493
|
+
ID: string;
|
|
5494
|
+
|
|
5495
|
+
@Field({ nullable: true })
|
|
5496
|
+
AgentID?: string;
|
|
5497
|
+
|
|
5498
|
+
@Field({ nullable: true })
|
|
5499
|
+
RubricID?: string;
|
|
5500
|
+
|
|
5501
|
+
@Field({ nullable: true })
|
|
5502
|
+
Purpose?: string;
|
|
5503
|
+
|
|
5504
|
+
@Field(() => Boolean, { nullable: true })
|
|
5505
|
+
IsDefault?: boolean;
|
|
5506
|
+
|
|
5507
|
+
@Field({ nullable: true })
|
|
5508
|
+
Status?: string;
|
|
5509
|
+
|
|
5510
|
+
@Field(() => Float, { nullable: true })
|
|
5511
|
+
PassThreshold?: number | null;
|
|
5512
|
+
|
|
5513
|
+
@Field(() => Float, { nullable: true })
|
|
5514
|
+
SampleRate?: number | null;
|
|
5515
|
+
|
|
5516
|
+
@Field(() => Int, { nullable: true })
|
|
5517
|
+
MaxSelfCheckAttempts?: number | null;
|
|
5518
|
+
|
|
5519
|
+
@Field({ nullable: true })
|
|
5520
|
+
EvaluatorConfig?: string | null;
|
|
5521
|
+
|
|
5522
|
+
@Field(() => Int, { nullable: true })
|
|
5523
|
+
Sequence?: number;
|
|
5524
|
+
|
|
5525
|
+
@Field(() => [KeyValuePairInput], { nullable: true })
|
|
5526
|
+
OldValues___?: KeyValuePairInput[];
|
|
5527
|
+
|
|
5528
|
+
@Field(() => RestoreContextInput, { nullable: true })
|
|
5529
|
+
RestoreContext___?: RestoreContextInput;
|
|
5530
|
+
}
|
|
5531
|
+
|
|
5532
|
+
//****************************************************************************
|
|
5533
|
+
// RESOLVER for MJ: AI Agent Rubrics
|
|
5534
|
+
//****************************************************************************
|
|
5535
|
+
@ObjectType()
|
|
5536
|
+
export class RunMJAIAgentRubricViewResult {
|
|
5537
|
+
@Field(() => [MJAIAgentRubric_])
|
|
5538
|
+
Results: MJAIAgentRubric_[];
|
|
5539
|
+
|
|
5540
|
+
@Field(() => String, {nullable: true})
|
|
5541
|
+
UserViewRunID?: string;
|
|
5542
|
+
|
|
5543
|
+
@Field(() => Int, {nullable: true})
|
|
5544
|
+
RowCount: number;
|
|
5545
|
+
|
|
5546
|
+
@Field(() => Int, {nullable: true})
|
|
5547
|
+
TotalRowCount: number;
|
|
5548
|
+
|
|
5549
|
+
@Field(() => Int, {nullable: true})
|
|
5550
|
+
ExecutionTime: number;
|
|
5551
|
+
|
|
5552
|
+
@Field({nullable: true})
|
|
5553
|
+
ErrorMessage?: string;
|
|
5554
|
+
|
|
5555
|
+
@Field(() => Boolean, {nullable: false})
|
|
5556
|
+
Success: boolean;
|
|
5557
|
+
}
|
|
5558
|
+
|
|
5559
|
+
@Resolver(MJAIAgentRubric_)
|
|
5560
|
+
export class MJAIAgentRubricResolver extends ResolverBase {
|
|
5561
|
+
@Query(() => RunMJAIAgentRubricViewResult)
|
|
5562
|
+
async RunMJAIAgentRubricViewByID(@Arg('input', () => RunViewByIDInput) input: RunViewByIDInput, @Ctx() { providers, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
5563
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
5564
|
+
return super.RunViewByIDGeneric(input, provider, userPayload, pubSub);
|
|
5565
|
+
}
|
|
5566
|
+
|
|
5567
|
+
@Query(() => RunMJAIAgentRubricViewResult)
|
|
5568
|
+
async RunMJAIAgentRubricViewByName(@Arg('input', () => RunViewByNameInput) input: RunViewByNameInput, @Ctx() { providers, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
5569
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
5570
|
+
return super.RunViewByNameGeneric(input, provider, userPayload, pubSub);
|
|
5571
|
+
}
|
|
5572
|
+
|
|
5573
|
+
@Query(() => RunMJAIAgentRubricViewResult)
|
|
5574
|
+
async RunMJAIAgentRubricDynamicView(@Arg('input', () => RunDynamicViewInput) input: RunDynamicViewInput, @Ctx() { providers, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
5575
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
5576
|
+
input.EntityName = 'MJ: AI Agent Rubrics';
|
|
5577
|
+
return super.RunDynamicViewGeneric(input, provider, userPayload, pubSub);
|
|
5578
|
+
}
|
|
5579
|
+
@Query(() => MJAIAgentRubric_, { nullable: true })
|
|
5580
|
+
async MJAIAgentRubric(@Arg('ID', () => String) ID: string, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine): Promise<MJAIAgentRubric_ | null> {
|
|
5581
|
+
this.CheckUserReadPermissions('MJ: AI Agent Rubrics', userPayload);
|
|
5582
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
5583
|
+
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwAIAgentRubrics')} WHERE ${provider.QuoteIdentifier('ID')}=${provider.BuildParameterPlaceholder(0)} ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: AI Agent Rubrics', userPayload, EntityPermissionType.Read, 'AND');
|
|
5584
|
+
const rows = await provider.ExecuteSQL(sSQL, [ID], undefined, this.GetUserFromPayload(userPayload));
|
|
5585
|
+
const result = await this.MapFieldNamesToCodeNames('MJ: AI Agent Rubrics', rows && rows.length > 0 ? rows[0] : null, this.GetUserFromPayload(userPayload));
|
|
5586
|
+
return result;
|
|
5587
|
+
}
|
|
5588
|
+
|
|
5589
|
+
@Mutation(() => MJAIAgentRubric_)
|
|
5590
|
+
async CreateMJAIAgentRubric(
|
|
5591
|
+
@Arg('input', () => CreateMJAIAgentRubricInput) input: CreateMJAIAgentRubricInput,
|
|
5592
|
+
@Ctx() { providers, userPayload }: AppContext,
|
|
5593
|
+
@PubSub() pubSub: PubSubEngine
|
|
5594
|
+
) {
|
|
5595
|
+
const provider = GetReadWriteProvider(providers);
|
|
5596
|
+
return this.CreateRecord('MJ: AI Agent Rubrics', input, provider, userPayload, pubSub)
|
|
5597
|
+
}
|
|
5598
|
+
|
|
5599
|
+
@Mutation(() => MJAIAgentRubric_)
|
|
5600
|
+
async UpdateMJAIAgentRubric(
|
|
5601
|
+
@Arg('input', () => UpdateMJAIAgentRubricInput) input: UpdateMJAIAgentRubricInput,
|
|
5602
|
+
@Ctx() { providers, userPayload }: AppContext,
|
|
5603
|
+
@PubSub() pubSub: PubSubEngine
|
|
5604
|
+
) {
|
|
5605
|
+
const provider = GetReadWriteProvider(providers);
|
|
5606
|
+
return this.UpdateRecord('MJ: AI Agent Rubrics', input, provider, userPayload, pubSub);
|
|
5607
|
+
}
|
|
5608
|
+
|
|
5609
|
+
@Mutation(() => MJAIAgentRubric_)
|
|
5610
|
+
async DeleteMJAIAgentRubric(@Arg('ID', () => String) ID: string, @Arg('options___', () => DeleteOptionsInput) options: DeleteOptionsInput, @Ctx() { providers, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
5611
|
+
const provider = GetReadWriteProvider(providers);
|
|
5612
|
+
const key = new CompositeKey([{FieldName: 'ID', Value: ID}]);
|
|
5613
|
+
return this.DeleteRecord('MJ: AI Agent Rubrics', key, options, provider, userPayload, pubSub);
|
|
5614
|
+
}
|
|
5615
|
+
|
|
5616
|
+
}
|
|
5617
|
+
|
|
5382
5618
|
//****************************************************************************
|
|
5383
5619
|
// ENTITY CLASS for MJ: AI Agent Run Medias
|
|
5384
5620
|
//****************************************************************************
|
|
@@ -8394,7 +8630,7 @@ export class MJAIAgentStep_ {
|
|
|
8394
8630
|
@Field({nullable: true})
|
|
8395
8631
|
Description?: string;
|
|
8396
8632
|
|
|
8397
|
-
@Field({nullable: true, description: `Type of step: Action (execute an action), Sub-Agent (delegate to another agent),
|
|
8633
|
+
@Field({nullable: true, description: `Type of step: Action (execute an action), Sub-Agent (delegate to another agent), Prompt (run an AI prompt), Decision (one typed decision call whose answers the outgoing paths route on), Human (ask a person), or ForEach / While (a loop).`})
|
|
8398
8634
|
@MaxLength(20)
|
|
8399
8635
|
StepType?: string;
|
|
8400
8636
|
|
|
@@ -8455,7 +8691,7 @@ export class MJAIAgentStep_ {
|
|
|
8455
8691
|
@MaxLength(50)
|
|
8456
8692
|
LoopBodyType?: string;
|
|
8457
8693
|
|
|
8458
|
-
@Field({nullable: true, description: `JSON configuration object for step-specific settings. For loop steps: { type: "ForEach"|"While", collectionPath?, itemVariable?, indexVariable?, maxIterations?, continueOnError?, condition? }. For
|
|
8694
|
+
@Field({nullable: true, description: `JSON configuration object for step-specific settings. For loop steps: { type: "ForEach"|"While", collectionPath?, itemVariable?, indexVariable?, maxIterations?, continueOnError?, condition? }. For Decision steps: { key, state?, questions }, where key names the step in path conditions (decisions.<key>.<question>), state is "payload" or "payload.<path>", and questions are Likelihood, Choice or Score questions. For Human steps: { assignToUserID?, expiresInHours? }.`})
|
|
8459
8695
|
Configuration?: string;
|
|
8460
8696
|
|
|
8461
8697
|
@Field({nullable: true})
|
|
@@ -15685,6 +15921,10 @@ export class MJAIPromptRun_ {
|
|
|
15685
15921
|
@MaxLength(25)
|
|
15686
15922
|
ToolCallingMode?: string;
|
|
15687
15923
|
|
|
15924
|
+
@Field({nullable: true, description: `The user on whose behalf this prompt was executed, written when the run is created. NULL for automated/unauthenticated runs and for runs that pre-date this column. For an agent-driven run the agent run's user is also reachable through AIAgentRunStep.TargetLogID, which vwAIUsageFacts falls back to.`})
|
|
15925
|
+
@MaxLength(36)
|
|
15926
|
+
UserID?: string;
|
|
15927
|
+
|
|
15688
15928
|
@Field({nullable: true})
|
|
15689
15929
|
@MaxLength(255)
|
|
15690
15930
|
Prompt?: string;
|
|
@@ -15733,6 +15973,10 @@ export class MJAIPromptRun_ {
|
|
|
15733
15973
|
@MaxLength(50)
|
|
15734
15974
|
UsageType?: string;
|
|
15735
15975
|
|
|
15976
|
+
@Field({nullable: true})
|
|
15977
|
+
@MaxLength(100)
|
|
15978
|
+
User?: string;
|
|
15979
|
+
|
|
15736
15980
|
@Field({nullable: true})
|
|
15737
15981
|
@MaxLength(36)
|
|
15738
15982
|
RootParentID?: string;
|
|
@@ -16029,6 +16273,9 @@ export class CreateMJAIPromptRunInput {
|
|
|
16029
16273
|
@Field({ nullable: true })
|
|
16030
16274
|
ToolCallingMode: string | null;
|
|
16031
16275
|
|
|
16276
|
+
@Field({ nullable: true })
|
|
16277
|
+
UserID: string | null;
|
|
16278
|
+
|
|
16032
16279
|
@Field(() => RestoreContextInput, { nullable: true })
|
|
16033
16280
|
RestoreContext___?: RestoreContextInput;
|
|
16034
16281
|
}
|
|
@@ -16309,6 +16556,9 @@ export class UpdateMJAIPromptRunInput {
|
|
|
16309
16556
|
@Field({ nullable: true })
|
|
16310
16557
|
ToolCallingMode?: string | null;
|
|
16311
16558
|
|
|
16559
|
+
@Field({ nullable: true })
|
|
16560
|
+
UserID?: string | null;
|
|
16561
|
+
|
|
16312
16562
|
@Field(() => [KeyValuePairInput], { nullable: true })
|
|
16313
16563
|
OldValues___?: KeyValuePairInput[];
|
|
16314
16564
|
|
|
@@ -19215,6 +19465,9 @@ export class MJAIVendor_ {
|
|
|
19215
19465
|
@MaxLength(36)
|
|
19216
19466
|
CredentialTypeID?: string;
|
|
19217
19467
|
|
|
19468
|
+
@Field({nullable: true, description: `Vendor configuration bag (JSON, IAIVendorConfiguration shape). Its ModelDefaults key is an IAIModelConfiguration bag (LLM / Realtime / Vision / Audio sections) that forms the default model configuration for every model this vendor serves: the vendor layer of the ModelConfiguration cascade, above AIModelType and AIModel and below AIModelVendor, which may override it per key. NULL = contributes nothing.`})
|
|
19469
|
+
Configuration?: string;
|
|
19470
|
+
|
|
19218
19471
|
@Field({nullable: true})
|
|
19219
19472
|
@MaxLength(100)
|
|
19220
19473
|
CredentialType?: string;
|
|
@@ -19241,6 +19494,9 @@ export class CreateMJAIVendorInput {
|
|
|
19241
19494
|
@Field({ nullable: true })
|
|
19242
19495
|
CredentialTypeID: string | null;
|
|
19243
19496
|
|
|
19497
|
+
@Field({ nullable: true })
|
|
19498
|
+
Configuration: string | null;
|
|
19499
|
+
|
|
19244
19500
|
@Field(() => RestoreContextInput, { nullable: true })
|
|
19245
19501
|
RestoreContext___?: RestoreContextInput;
|
|
19246
19502
|
}
|
|
@@ -19263,6 +19519,9 @@ export class UpdateMJAIVendorInput {
|
|
|
19263
19519
|
@Field({ nullable: true })
|
|
19264
19520
|
CredentialTypeID?: string | null;
|
|
19265
19521
|
|
|
19522
|
+
@Field({ nullable: true })
|
|
19523
|
+
Configuration?: string | null;
|
|
19524
|
+
|
|
19266
19525
|
@Field(() => [KeyValuePairInput], { nullable: true })
|
|
19267
19526
|
OldValues___?: KeyValuePairInput[];
|
|
19268
19527
|
|
|
@@ -52701,6 +52960,179 @@ export class MJExternalDataSourceResolver extends ResolverBase {
|
|
|
52701
52960
|
|
|
52702
52961
|
}
|
|
52703
52962
|
|
|
52963
|
+
//****************************************************************************
|
|
52964
|
+
// ENTITY CLASS for MJ: Feature Pipeline Types
|
|
52965
|
+
//****************************************************************************
|
|
52966
|
+
@ObjectType({ description: `The catalog of Feature Pipeline types. Each type names the driver that turns one record\'s context into its output values: LLM runs a prompt, and further types (such as Decision) run other kinds of model. A pipeline names its type in DataFeatureSpec.PipelineType, and a spec without one is an LLM pipeline.` })
|
|
52967
|
+
export class MJFeaturePipelineType_ {
|
|
52968
|
+
@Field()
|
|
52969
|
+
@MaxLength(36)
|
|
52970
|
+
ID: string;
|
|
52971
|
+
|
|
52972
|
+
@Field({nullable: true, description: `The type's name, as a pipeline spec refers to it in PipelineType (for example LLM or Decision). Unique.`})
|
|
52973
|
+
@MaxLength(100)
|
|
52974
|
+
Name?: string;
|
|
52975
|
+
|
|
52976
|
+
@Field({nullable: true, description: `What the type does, and what it can and cannot produce, for pipeline authors choosing a type.`})
|
|
52977
|
+
Description?: string;
|
|
52978
|
+
|
|
52979
|
+
@Field({nullable: true, description: `The registered class name of the type's BaseFeaturePipelineDriver subclass, which the ClassFactory resolves to compute each record's outputs.`})
|
|
52980
|
+
@MaxLength(255)
|
|
52981
|
+
DriverClass?: string;
|
|
52982
|
+
|
|
52983
|
+
@Field({nullable: true, description: `Active types can be chosen for a pipeline. A Disabled type is hidden from the builder, and a pipeline that names it fails validation.`})
|
|
52984
|
+
@MaxLength(20)
|
|
52985
|
+
Status?: string;
|
|
52986
|
+
|
|
52987
|
+
@Field()
|
|
52988
|
+
_mj__CreatedAt: Date;
|
|
52989
|
+
|
|
52990
|
+
@Field()
|
|
52991
|
+
_mj__UpdatedAt: Date;
|
|
52992
|
+
|
|
52993
|
+
@Field(() => [String], { nullable: true, description: `Field-level security: when non-null, the fields on this entity the calling user may read. Any other field arriving as null was withheld by the server rather than genuinely empty. Null for callers with no field restrictions.` })
|
|
52994
|
+
ReadableFields___?: string[];
|
|
52995
|
+
|
|
52996
|
+
}
|
|
52997
|
+
|
|
52998
|
+
//****************************************************************************
|
|
52999
|
+
// INPUT TYPE for MJ: Feature Pipeline Types
|
|
53000
|
+
//****************************************************************************
|
|
53001
|
+
@InputType()
|
|
53002
|
+
export class CreateMJFeaturePipelineTypeInput {
|
|
53003
|
+
@Field({ nullable: true })
|
|
53004
|
+
ID?: string;
|
|
53005
|
+
|
|
53006
|
+
@Field({ nullable: true })
|
|
53007
|
+
Name?: string;
|
|
53008
|
+
|
|
53009
|
+
@Field({ nullable: true })
|
|
53010
|
+
Description: string | null;
|
|
53011
|
+
|
|
53012
|
+
@Field({ nullable: true })
|
|
53013
|
+
DriverClass?: string;
|
|
53014
|
+
|
|
53015
|
+
@Field({ nullable: true })
|
|
53016
|
+
Status?: string;
|
|
53017
|
+
|
|
53018
|
+
@Field(() => RestoreContextInput, { nullable: true })
|
|
53019
|
+
RestoreContext___?: RestoreContextInput;
|
|
53020
|
+
}
|
|
53021
|
+
|
|
53022
|
+
|
|
53023
|
+
//****************************************************************************
|
|
53024
|
+
// INPUT TYPE for MJ: Feature Pipeline Types
|
|
53025
|
+
//****************************************************************************
|
|
53026
|
+
@InputType()
|
|
53027
|
+
export class UpdateMJFeaturePipelineTypeInput {
|
|
53028
|
+
@Field()
|
|
53029
|
+
ID: string;
|
|
53030
|
+
|
|
53031
|
+
@Field({ nullable: true })
|
|
53032
|
+
Name?: string;
|
|
53033
|
+
|
|
53034
|
+
@Field({ nullable: true })
|
|
53035
|
+
Description?: string | null;
|
|
53036
|
+
|
|
53037
|
+
@Field({ nullable: true })
|
|
53038
|
+
DriverClass?: string;
|
|
53039
|
+
|
|
53040
|
+
@Field({ nullable: true })
|
|
53041
|
+
Status?: string;
|
|
53042
|
+
|
|
53043
|
+
@Field(() => [KeyValuePairInput], { nullable: true })
|
|
53044
|
+
OldValues___?: KeyValuePairInput[];
|
|
53045
|
+
|
|
53046
|
+
@Field(() => RestoreContextInput, { nullable: true })
|
|
53047
|
+
RestoreContext___?: RestoreContextInput;
|
|
53048
|
+
}
|
|
53049
|
+
|
|
53050
|
+
//****************************************************************************
|
|
53051
|
+
// RESOLVER for MJ: Feature Pipeline Types
|
|
53052
|
+
//****************************************************************************
|
|
53053
|
+
@ObjectType()
|
|
53054
|
+
export class RunMJFeaturePipelineTypeViewResult {
|
|
53055
|
+
@Field(() => [MJFeaturePipelineType_])
|
|
53056
|
+
Results: MJFeaturePipelineType_[];
|
|
53057
|
+
|
|
53058
|
+
@Field(() => String, {nullable: true})
|
|
53059
|
+
UserViewRunID?: string;
|
|
53060
|
+
|
|
53061
|
+
@Field(() => Int, {nullable: true})
|
|
53062
|
+
RowCount: number;
|
|
53063
|
+
|
|
53064
|
+
@Field(() => Int, {nullable: true})
|
|
53065
|
+
TotalRowCount: number;
|
|
53066
|
+
|
|
53067
|
+
@Field(() => Int, {nullable: true})
|
|
53068
|
+
ExecutionTime: number;
|
|
53069
|
+
|
|
53070
|
+
@Field({nullable: true})
|
|
53071
|
+
ErrorMessage?: string;
|
|
53072
|
+
|
|
53073
|
+
@Field(() => Boolean, {nullable: false})
|
|
53074
|
+
Success: boolean;
|
|
53075
|
+
}
|
|
53076
|
+
|
|
53077
|
+
@Resolver(MJFeaturePipelineType_)
|
|
53078
|
+
export class MJFeaturePipelineTypeResolver extends ResolverBase {
|
|
53079
|
+
@Query(() => RunMJFeaturePipelineTypeViewResult)
|
|
53080
|
+
async RunMJFeaturePipelineTypeViewByID(@Arg('input', () => RunViewByIDInput) input: RunViewByIDInput, @Ctx() { providers, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
53081
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
53082
|
+
return super.RunViewByIDGeneric(input, provider, userPayload, pubSub);
|
|
53083
|
+
}
|
|
53084
|
+
|
|
53085
|
+
@Query(() => RunMJFeaturePipelineTypeViewResult)
|
|
53086
|
+
async RunMJFeaturePipelineTypeViewByName(@Arg('input', () => RunViewByNameInput) input: RunViewByNameInput, @Ctx() { providers, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
53087
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
53088
|
+
return super.RunViewByNameGeneric(input, provider, userPayload, pubSub);
|
|
53089
|
+
}
|
|
53090
|
+
|
|
53091
|
+
@Query(() => RunMJFeaturePipelineTypeViewResult)
|
|
53092
|
+
async RunMJFeaturePipelineTypeDynamicView(@Arg('input', () => RunDynamicViewInput) input: RunDynamicViewInput, @Ctx() { providers, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
53093
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
53094
|
+
input.EntityName = 'MJ: Feature Pipeline Types';
|
|
53095
|
+
return super.RunDynamicViewGeneric(input, provider, userPayload, pubSub);
|
|
53096
|
+
}
|
|
53097
|
+
@Query(() => MJFeaturePipelineType_, { nullable: true })
|
|
53098
|
+
async MJFeaturePipelineType(@Arg('ID', () => String) ID: string, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine): Promise<MJFeaturePipelineType_ | null> {
|
|
53099
|
+
this.CheckUserReadPermissions('MJ: Feature Pipeline Types', userPayload);
|
|
53100
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
53101
|
+
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwFeaturePipelineTypes')} WHERE ${provider.QuoteIdentifier('ID')}=${provider.BuildParameterPlaceholder(0)} ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: Feature Pipeline Types', userPayload, EntityPermissionType.Read, 'AND');
|
|
53102
|
+
const rows = await provider.ExecuteSQL(sSQL, [ID], undefined, this.GetUserFromPayload(userPayload));
|
|
53103
|
+
const result = await this.MapFieldNamesToCodeNames('MJ: Feature Pipeline Types', rows && rows.length > 0 ? rows[0] : null, this.GetUserFromPayload(userPayload));
|
|
53104
|
+
return result;
|
|
53105
|
+
}
|
|
53106
|
+
|
|
53107
|
+
@Mutation(() => MJFeaturePipelineType_)
|
|
53108
|
+
async CreateMJFeaturePipelineType(
|
|
53109
|
+
@Arg('input', () => CreateMJFeaturePipelineTypeInput) input: CreateMJFeaturePipelineTypeInput,
|
|
53110
|
+
@Ctx() { providers, userPayload }: AppContext,
|
|
53111
|
+
@PubSub() pubSub: PubSubEngine
|
|
53112
|
+
) {
|
|
53113
|
+
const provider = GetReadWriteProvider(providers);
|
|
53114
|
+
return this.CreateRecord('MJ: Feature Pipeline Types', input, provider, userPayload, pubSub)
|
|
53115
|
+
}
|
|
53116
|
+
|
|
53117
|
+
@Mutation(() => MJFeaturePipelineType_)
|
|
53118
|
+
async UpdateMJFeaturePipelineType(
|
|
53119
|
+
@Arg('input', () => UpdateMJFeaturePipelineTypeInput) input: UpdateMJFeaturePipelineTypeInput,
|
|
53120
|
+
@Ctx() { providers, userPayload }: AppContext,
|
|
53121
|
+
@PubSub() pubSub: PubSubEngine
|
|
53122
|
+
) {
|
|
53123
|
+
const provider = GetReadWriteProvider(providers);
|
|
53124
|
+
return this.UpdateRecord('MJ: Feature Pipeline Types', input, provider, userPayload, pubSub);
|
|
53125
|
+
}
|
|
53126
|
+
|
|
53127
|
+
@Mutation(() => MJFeaturePipelineType_)
|
|
53128
|
+
async DeleteMJFeaturePipelineType(@Arg('ID', () => String) ID: string, @Arg('options___', () => DeleteOptionsInput) options: DeleteOptionsInput, @Ctx() { providers, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
53129
|
+
const provider = GetReadWriteProvider(providers);
|
|
53130
|
+
const key = new CompositeKey([{FieldName: 'ID', Value: ID}]);
|
|
53131
|
+
return this.DeleteRecord('MJ: Feature Pipeline Types', key, options, provider, userPayload, pubSub);
|
|
53132
|
+
}
|
|
53133
|
+
|
|
53134
|
+
}
|
|
53135
|
+
|
|
52704
53136
|
//****************************************************************************
|
|
52705
53137
|
// ENTITY CLASS for MJ: Feature Value Caches
|
|
52706
53138
|
//****************************************************************************
|
|
@@ -66952,6 +67384,10 @@ export class MJProject_ {
|
|
|
66952
67384
|
@Field()
|
|
66953
67385
|
_mj__UpdatedAt: Date;
|
|
66954
67386
|
|
|
67387
|
+
@Field({nullable: true, description: `The user who owns this folder, or NULL when the folder is shared with the whole environment. NULL (the value every pre-existing folder carries) means SHARED: visible to anyone who can read projects in the environment, which was the only possible behaviour before this column existed. A set value means PERSONAL: the folder belongs to that user and consumers filter it to them, so it stays out of other people's sidebars. Personal is opt-in at create time; nothing is migrated.`})
|
|
67388
|
+
@MaxLength(36)
|
|
67389
|
+
OwnerUserID?: string;
|
|
67390
|
+
|
|
66955
67391
|
@Field({nullable: true})
|
|
66956
67392
|
@MaxLength(255)
|
|
66957
67393
|
Environment?: string;
|
|
@@ -66960,6 +67396,10 @@ export class MJProject_ {
|
|
|
66960
67396
|
@MaxLength(255)
|
|
66961
67397
|
Parent?: string;
|
|
66962
67398
|
|
|
67399
|
+
@Field({nullable: true})
|
|
67400
|
+
@MaxLength(100)
|
|
67401
|
+
OwnerUser?: string;
|
|
67402
|
+
|
|
66963
67403
|
@Field({nullable: true})
|
|
66964
67404
|
@MaxLength(36)
|
|
66965
67405
|
RootParentID?: string;
|
|
@@ -67010,6 +67450,9 @@ export class CreateMJProjectInput {
|
|
|
67010
67450
|
@Field(() => Boolean, { nullable: true })
|
|
67011
67451
|
IsArchived?: boolean;
|
|
67012
67452
|
|
|
67453
|
+
@Field({ nullable: true })
|
|
67454
|
+
OwnerUserID: string | null;
|
|
67455
|
+
|
|
67013
67456
|
@Field(() => RestoreContextInput, { nullable: true })
|
|
67014
67457
|
RestoreContext___?: RestoreContextInput;
|
|
67015
67458
|
}
|
|
@@ -67044,6 +67487,9 @@ export class UpdateMJProjectInput {
|
|
|
67044
67487
|
@Field(() => Boolean, { nullable: true })
|
|
67045
67488
|
IsArchived?: boolean;
|
|
67046
67489
|
|
|
67490
|
+
@Field({ nullable: true })
|
|
67491
|
+
OwnerUserID?: string | null;
|
|
67492
|
+
|
|
67047
67493
|
@Field(() => [KeyValuePairInput], { nullable: true })
|
|
67048
67494
|
OldValues___?: KeyValuePairInput[];
|
|
67049
67495
|
|
|
@@ -71021,6 +71467,9 @@ export class MJRecordChange_ {
|
|
|
71021
71467
|
@Field({nullable: true, description: `Optional user-entered explanation captured at restore time. Persisted for audit purposes (regulated industries often require a reason for every reversal). NULL when the user did not enter one or when the change was not a restore.`})
|
|
71022
71468
|
RestoreReason?: string;
|
|
71023
71469
|
|
|
71470
|
+
@Field({nullable: true, description: `Optional JSON configuration bag carrying structured provenance context (shape = IRecordChangeContext). Used by clone, merge, and other multi-record or automated operations to record lineage, root records, and field change summaries.`})
|
|
71471
|
+
ChangeContext?: string;
|
|
71472
|
+
|
|
71024
71473
|
@Field({nullable: true})
|
|
71025
71474
|
@MaxLength(255)
|
|
71026
71475
|
Entity?: string;
|
|
@@ -71102,6 +71551,9 @@ export class CreateMJRecordChangeInput {
|
|
|
71102
71551
|
@Field({ nullable: true })
|
|
71103
71552
|
RestoreReason: string | null;
|
|
71104
71553
|
|
|
71554
|
+
@Field({ nullable: true })
|
|
71555
|
+
ChangeContext: string | null;
|
|
71556
|
+
|
|
71105
71557
|
@Field(() => RestoreContextInput, { nullable: true })
|
|
71106
71558
|
RestoreContext___?: RestoreContextInput;
|
|
71107
71559
|
}
|
|
@@ -71163,6 +71615,9 @@ export class UpdateMJRecordChangeInput {
|
|
|
71163
71615
|
@Field({ nullable: true })
|
|
71164
71616
|
RestoreReason?: string | null;
|
|
71165
71617
|
|
|
71618
|
+
@Field({ nullable: true })
|
|
71619
|
+
ChangeContext?: string | null;
|
|
71620
|
+
|
|
71166
71621
|
@Field(() => [KeyValuePairInput], { nullable: true })
|
|
71167
71622
|
OldValues___?: KeyValuePairInput[];
|
|
71168
71623
|
|
|
@@ -71256,6 +71711,542 @@ export class MJRecordChangeResolver extends ResolverBase {
|
|
|
71256
71711
|
|
|
71257
71712
|
}
|
|
71258
71713
|
|
|
71714
|
+
//****************************************************************************
|
|
71715
|
+
// ENTITY CLASS for MJ: Record Clone Log Items
|
|
71716
|
+
//****************************************************************************
|
|
71717
|
+
@ObjectType({ description: `Item-level detail for each node in a record clone operation, capturing traversal route, action, status, and field changes.` })
|
|
71718
|
+
export class MJRecordCloneLogItem_ {
|
|
71719
|
+
@Field({description: `Unique identifier for the record clone log item record.`})
|
|
71720
|
+
@MaxLength(36)
|
|
71721
|
+
ID: string;
|
|
71722
|
+
|
|
71723
|
+
@Field({nullable: true, description: `Foreign key to the parent RecordCloneLog header record coordinating this clone execution.`})
|
|
71724
|
+
@MaxLength(36)
|
|
71725
|
+
RecordCloneLogID?: string;
|
|
71726
|
+
|
|
71727
|
+
@Field({nullable: true, description: `Foreign key to the Entity type of this individual cloned record.`})
|
|
71728
|
+
@MaxLength(36)
|
|
71729
|
+
EntityID?: string;
|
|
71730
|
+
|
|
71731
|
+
@Field({nullable: true, description: `Source record key identifier, encoded as a compact URL segment.`})
|
|
71732
|
+
@MaxLength(750)
|
|
71733
|
+
SourceRecordID?: string;
|
|
71734
|
+
|
|
71735
|
+
@Field({nullable: true, description: `Target record key identifier resulting from the clone, encoded as a compact URL segment. Null if skipped or failed.`})
|
|
71736
|
+
@MaxLength(750)
|
|
71737
|
+
TargetRecordID?: string;
|
|
71738
|
+
|
|
71739
|
+
@Field(() => Int, {nullable: true, description: `Distance from the root node in the clone record graph (0 for root).`})
|
|
71740
|
+
Depth?: number;
|
|
71741
|
+
|
|
71742
|
+
@Field({nullable: true, description: `Relationship route traversed to reach this record (RootSave, Collection, Embedded, IsAChain, Sidecar).`})
|
|
71743
|
+
@MaxLength(20)
|
|
71744
|
+
Route?: string;
|
|
71745
|
+
|
|
71746
|
+
@Field({nullable: true, description: `Execution outcome status for this node (Created, Referenced, Skipped, Failed).`})
|
|
71747
|
+
@MaxLength(20)
|
|
71748
|
+
Status?: string;
|
|
71749
|
+
|
|
71750
|
+
@Field(() => Int, {nullable: true, description: `Execution sequence order within the clone transaction.`})
|
|
71751
|
+
Sequence?: number;
|
|
71752
|
+
|
|
71753
|
+
@Field({nullable: true, description: `Diagnostic explanation or reason for the action taken (e.g., skip reason or failure details).`})
|
|
71754
|
+
Reason?: string;
|
|
71755
|
+
|
|
71756
|
+
@Field({nullable: true, description: `Serialized JSON array of field-level modifications, copies, transforms, resets, and remaps applied to this record.`})
|
|
71757
|
+
FieldChangesJSON?: string;
|
|
71758
|
+
|
|
71759
|
+
@Field()
|
|
71760
|
+
_mj__CreatedAt: Date;
|
|
71761
|
+
|
|
71762
|
+
@Field()
|
|
71763
|
+
_mj__UpdatedAt: Date;
|
|
71764
|
+
|
|
71765
|
+
@Field({nullable: true})
|
|
71766
|
+
@MaxLength(255)
|
|
71767
|
+
Entity?: string;
|
|
71768
|
+
|
|
71769
|
+
@Field(() => [String], { nullable: true, description: `Field-level security: when non-null, the fields on this entity the calling user may read. Any other field arriving as null was withheld by the server rather than genuinely empty. Null for callers with no field restrictions.` })
|
|
71770
|
+
ReadableFields___?: string[];
|
|
71771
|
+
|
|
71772
|
+
}
|
|
71773
|
+
|
|
71774
|
+
//****************************************************************************
|
|
71775
|
+
// INPUT TYPE for MJ: Record Clone Log Items
|
|
71776
|
+
//****************************************************************************
|
|
71777
|
+
@InputType()
|
|
71778
|
+
export class CreateMJRecordCloneLogItemInput {
|
|
71779
|
+
@Field({ nullable: true })
|
|
71780
|
+
ID?: string;
|
|
71781
|
+
|
|
71782
|
+
@Field({ nullable: true })
|
|
71783
|
+
RecordCloneLogID?: string;
|
|
71784
|
+
|
|
71785
|
+
@Field({ nullable: true })
|
|
71786
|
+
EntityID?: string;
|
|
71787
|
+
|
|
71788
|
+
@Field({ nullable: true })
|
|
71789
|
+
SourceRecordID?: string;
|
|
71790
|
+
|
|
71791
|
+
@Field({ nullable: true })
|
|
71792
|
+
TargetRecordID: string | null;
|
|
71793
|
+
|
|
71794
|
+
@Field(() => Int, { nullable: true })
|
|
71795
|
+
Depth?: number;
|
|
71796
|
+
|
|
71797
|
+
@Field({ nullable: true })
|
|
71798
|
+
Route?: string;
|
|
71799
|
+
|
|
71800
|
+
@Field({ nullable: true })
|
|
71801
|
+
Status?: string;
|
|
71802
|
+
|
|
71803
|
+
@Field(() => Int, { nullable: true })
|
|
71804
|
+
Sequence?: number;
|
|
71805
|
+
|
|
71806
|
+
@Field({ nullable: true })
|
|
71807
|
+
Reason: string | null;
|
|
71808
|
+
|
|
71809
|
+
@Field({ nullable: true })
|
|
71810
|
+
FieldChangesJSON: string | null;
|
|
71811
|
+
|
|
71812
|
+
@Field(() => RestoreContextInput, { nullable: true })
|
|
71813
|
+
RestoreContext___?: RestoreContextInput;
|
|
71814
|
+
}
|
|
71815
|
+
|
|
71816
|
+
|
|
71817
|
+
//****************************************************************************
|
|
71818
|
+
// INPUT TYPE for MJ: Record Clone Log Items
|
|
71819
|
+
//****************************************************************************
|
|
71820
|
+
@InputType()
|
|
71821
|
+
export class UpdateMJRecordCloneLogItemInput {
|
|
71822
|
+
@Field()
|
|
71823
|
+
ID: string;
|
|
71824
|
+
|
|
71825
|
+
@Field({ nullable: true })
|
|
71826
|
+
RecordCloneLogID?: string;
|
|
71827
|
+
|
|
71828
|
+
@Field({ nullable: true })
|
|
71829
|
+
EntityID?: string;
|
|
71830
|
+
|
|
71831
|
+
@Field({ nullable: true })
|
|
71832
|
+
SourceRecordID?: string;
|
|
71833
|
+
|
|
71834
|
+
@Field({ nullable: true })
|
|
71835
|
+
TargetRecordID?: string | null;
|
|
71836
|
+
|
|
71837
|
+
@Field(() => Int, { nullable: true })
|
|
71838
|
+
Depth?: number;
|
|
71839
|
+
|
|
71840
|
+
@Field({ nullable: true })
|
|
71841
|
+
Route?: string;
|
|
71842
|
+
|
|
71843
|
+
@Field({ nullable: true })
|
|
71844
|
+
Status?: string;
|
|
71845
|
+
|
|
71846
|
+
@Field(() => Int, { nullable: true })
|
|
71847
|
+
Sequence?: number;
|
|
71848
|
+
|
|
71849
|
+
@Field({ nullable: true })
|
|
71850
|
+
Reason?: string | null;
|
|
71851
|
+
|
|
71852
|
+
@Field({ nullable: true })
|
|
71853
|
+
FieldChangesJSON?: string | null;
|
|
71854
|
+
|
|
71855
|
+
@Field(() => [KeyValuePairInput], { nullable: true })
|
|
71856
|
+
OldValues___?: KeyValuePairInput[];
|
|
71857
|
+
|
|
71858
|
+
@Field(() => RestoreContextInput, { nullable: true })
|
|
71859
|
+
RestoreContext___?: RestoreContextInput;
|
|
71860
|
+
}
|
|
71861
|
+
|
|
71862
|
+
//****************************************************************************
|
|
71863
|
+
// RESOLVER for MJ: Record Clone Log Items
|
|
71864
|
+
//****************************************************************************
|
|
71865
|
+
@ObjectType()
|
|
71866
|
+
export class RunMJRecordCloneLogItemViewResult {
|
|
71867
|
+
@Field(() => [MJRecordCloneLogItem_])
|
|
71868
|
+
Results: MJRecordCloneLogItem_[];
|
|
71869
|
+
|
|
71870
|
+
@Field(() => String, {nullable: true})
|
|
71871
|
+
UserViewRunID?: string;
|
|
71872
|
+
|
|
71873
|
+
@Field(() => Int, {nullable: true})
|
|
71874
|
+
RowCount: number;
|
|
71875
|
+
|
|
71876
|
+
@Field(() => Int, {nullable: true})
|
|
71877
|
+
TotalRowCount: number;
|
|
71878
|
+
|
|
71879
|
+
@Field(() => Int, {nullable: true})
|
|
71880
|
+
ExecutionTime: number;
|
|
71881
|
+
|
|
71882
|
+
@Field({nullable: true})
|
|
71883
|
+
ErrorMessage?: string;
|
|
71884
|
+
|
|
71885
|
+
@Field(() => Boolean, {nullable: false})
|
|
71886
|
+
Success: boolean;
|
|
71887
|
+
}
|
|
71888
|
+
|
|
71889
|
+
@Resolver(MJRecordCloneLogItem_)
|
|
71890
|
+
export class MJRecordCloneLogItemResolver extends ResolverBase {
|
|
71891
|
+
@Query(() => RunMJRecordCloneLogItemViewResult)
|
|
71892
|
+
async RunMJRecordCloneLogItemViewByID(@Arg('input', () => RunViewByIDInput) input: RunViewByIDInput, @Ctx() { providers, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
71893
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
71894
|
+
return super.RunViewByIDGeneric(input, provider, userPayload, pubSub);
|
|
71895
|
+
}
|
|
71896
|
+
|
|
71897
|
+
@Query(() => RunMJRecordCloneLogItemViewResult)
|
|
71898
|
+
async RunMJRecordCloneLogItemViewByName(@Arg('input', () => RunViewByNameInput) input: RunViewByNameInput, @Ctx() { providers, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
71899
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
71900
|
+
return super.RunViewByNameGeneric(input, provider, userPayload, pubSub);
|
|
71901
|
+
}
|
|
71902
|
+
|
|
71903
|
+
@Query(() => RunMJRecordCloneLogItemViewResult)
|
|
71904
|
+
async RunMJRecordCloneLogItemDynamicView(@Arg('input', () => RunDynamicViewInput) input: RunDynamicViewInput, @Ctx() { providers, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
71905
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
71906
|
+
input.EntityName = 'MJ: Record Clone Log Items';
|
|
71907
|
+
return super.RunDynamicViewGeneric(input, provider, userPayload, pubSub);
|
|
71908
|
+
}
|
|
71909
|
+
@Query(() => MJRecordCloneLogItem_, { nullable: true })
|
|
71910
|
+
async MJRecordCloneLogItem(@Arg('ID', () => String) ID: string, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine): Promise<MJRecordCloneLogItem_ | null> {
|
|
71911
|
+
this.CheckUserReadPermissions('MJ: Record Clone Log Items', userPayload);
|
|
71912
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
71913
|
+
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwRecordCloneLogItems')} WHERE ${provider.QuoteIdentifier('ID')}=${provider.BuildParameterPlaceholder(0)} ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: Record Clone Log Items', userPayload, EntityPermissionType.Read, 'AND');
|
|
71914
|
+
const rows = await provider.ExecuteSQL(sSQL, [ID], undefined, this.GetUserFromPayload(userPayload));
|
|
71915
|
+
const result = await this.MapFieldNamesToCodeNames('MJ: Record Clone Log Items', rows && rows.length > 0 ? rows[0] : null, this.GetUserFromPayload(userPayload));
|
|
71916
|
+
return result;
|
|
71917
|
+
}
|
|
71918
|
+
|
|
71919
|
+
@Mutation(() => MJRecordCloneLogItem_)
|
|
71920
|
+
async CreateMJRecordCloneLogItem(
|
|
71921
|
+
@Arg('input', () => CreateMJRecordCloneLogItemInput) input: CreateMJRecordCloneLogItemInput,
|
|
71922
|
+
@Ctx() { providers, userPayload }: AppContext,
|
|
71923
|
+
@PubSub() pubSub: PubSubEngine
|
|
71924
|
+
) {
|
|
71925
|
+
const provider = GetReadWriteProvider(providers);
|
|
71926
|
+
return this.CreateRecord('MJ: Record Clone Log Items', input, provider, userPayload, pubSub)
|
|
71927
|
+
}
|
|
71928
|
+
|
|
71929
|
+
@Mutation(() => MJRecordCloneLogItem_)
|
|
71930
|
+
async UpdateMJRecordCloneLogItem(
|
|
71931
|
+
@Arg('input', () => UpdateMJRecordCloneLogItemInput) input: UpdateMJRecordCloneLogItemInput,
|
|
71932
|
+
@Ctx() { providers, userPayload }: AppContext,
|
|
71933
|
+
@PubSub() pubSub: PubSubEngine
|
|
71934
|
+
) {
|
|
71935
|
+
const provider = GetReadWriteProvider(providers);
|
|
71936
|
+
return this.UpdateRecord('MJ: Record Clone Log Items', input, provider, userPayload, pubSub);
|
|
71937
|
+
}
|
|
71938
|
+
|
|
71939
|
+
@Mutation(() => MJRecordCloneLogItem_)
|
|
71940
|
+
async DeleteMJRecordCloneLogItem(@Arg('ID', () => String) ID: string, @Arg('options___', () => DeleteOptionsInput) options: DeleteOptionsInput, @Ctx() { providers, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
71941
|
+
const provider = GetReadWriteProvider(providers);
|
|
71942
|
+
const key = new CompositeKey([{FieldName: 'ID', Value: ID}]);
|
|
71943
|
+
return this.DeleteRecord('MJ: Record Clone Log Items', key, options, provider, userPayload, pubSub);
|
|
71944
|
+
}
|
|
71945
|
+
|
|
71946
|
+
}
|
|
71947
|
+
|
|
71948
|
+
//****************************************************************************
|
|
71949
|
+
// ENTITY CLASS for MJ: Record Clone Logs
|
|
71950
|
+
//****************************************************************************
|
|
71951
|
+
@ObjectType({ description: `Audit and coordination header entity for record cloning operations. Captures plan, execution status, counts, and outcome.` })
|
|
71952
|
+
export class MJRecordCloneLog_ {
|
|
71953
|
+
@Field({description: `Unique identifier for the record clone log header record.`})
|
|
71954
|
+
@MaxLength(36)
|
|
71955
|
+
ID: string;
|
|
71956
|
+
|
|
71957
|
+
@Field({nullable: true, description: `Foreign key to the Entity being cloned as the root of the clone record graph.`})
|
|
71958
|
+
@MaxLength(36)
|
|
71959
|
+
RootEntityID?: string;
|
|
71960
|
+
|
|
71961
|
+
@Field({nullable: true, description: `Source root record identifier, encoded as a compact URL segment.`})
|
|
71962
|
+
@MaxLength(750)
|
|
71963
|
+
RootSourceRecordID?: string;
|
|
71964
|
+
|
|
71965
|
+
@Field({nullable: true, description: `Target root record identifier resulting from the clone, encoded as a compact URL segment. Null while in progress or if failed.`})
|
|
71966
|
+
@MaxLength(750)
|
|
71967
|
+
RootTargetRecordID?: string;
|
|
71968
|
+
|
|
71969
|
+
@Field({nullable: true, description: `Foreign key to the User who initiated this clone operation.`})
|
|
71970
|
+
@MaxLength(36)
|
|
71971
|
+
InitiatedByUserID?: string;
|
|
71972
|
+
|
|
71973
|
+
@Field({nullable: true, description: `Current operational status of the clone execution (Planned, Running, Complete, Error, Cancelled).`})
|
|
71974
|
+
@MaxLength(20)
|
|
71975
|
+
Status?: string;
|
|
71976
|
+
|
|
71977
|
+
@Field({nullable: true, description: `Timestamp (UTC with offset) when the clone operation started.`})
|
|
71978
|
+
StartedAt?: Date;
|
|
71979
|
+
|
|
71980
|
+
@Field({nullable: true, description: `Timestamp (UTC with offset) when the clone operation concluded.`})
|
|
71981
|
+
EndedAt?: Date;
|
|
71982
|
+
|
|
71983
|
+
@Field({nullable: true, description: `SHA-256 hash of the execution plan used for concurrency validation and provenance.`})
|
|
71984
|
+
@MaxLength(64)
|
|
71985
|
+
PlanHash?: string;
|
|
71986
|
+
|
|
71987
|
+
@Field({nullable: true, description: `Serialized JSON execution plan detailing all graph nodes, edges, actions, and options.`})
|
|
71988
|
+
PlanJSON?: string;
|
|
71989
|
+
|
|
71990
|
+
@Field({nullable: true, description: `JSON request options supplied by the user or client for this clone execution.`})
|
|
71991
|
+
OptionsJSON?: string;
|
|
71992
|
+
|
|
71993
|
+
@Field({nullable: true, description: `Summary result JSON payload containing counts, timings, and created record mappings.`})
|
|
71994
|
+
ResultJSON?: string;
|
|
71995
|
+
|
|
71996
|
+
@Field({nullable: true, description: `Optional business justification or user-provided explanation for this clone operation.`})
|
|
71997
|
+
Reason?: string;
|
|
71998
|
+
|
|
71999
|
+
@Field({nullable: true, description: `Error message and diagnostic details if the clone operation failed.`})
|
|
72000
|
+
ErrorMessage?: string;
|
|
72001
|
+
|
|
72002
|
+
@Field({nullable: true, description: `Foreign key to the parent ProcessRun when this clone was executed via a batch RecordProcess.`})
|
|
72003
|
+
@MaxLength(36)
|
|
72004
|
+
ProcessRunID?: string;
|
|
72005
|
+
|
|
72006
|
+
@Field(() => Int, {nullable: true, description: `Total count of new records successfully created during this clone operation.`})
|
|
72007
|
+
CreatedCount?: number;
|
|
72008
|
+
|
|
72009
|
+
@Field(() => Int, {nullable: true, description: `Total count of existing records linked or referenced by foreign key rather than copied.`})
|
|
72010
|
+
ReferencedCount?: number;
|
|
72011
|
+
|
|
72012
|
+
@Field(() => Int, {nullable: true, description: `Total count of records intentionally skipped based on relationship or entity clone policies.`})
|
|
72013
|
+
SkippedCount?: number;
|
|
72014
|
+
|
|
72015
|
+
@Field()
|
|
72016
|
+
_mj__CreatedAt: Date;
|
|
72017
|
+
|
|
72018
|
+
@Field()
|
|
72019
|
+
_mj__UpdatedAt: Date;
|
|
72020
|
+
|
|
72021
|
+
@Field({nullable: true})
|
|
72022
|
+
@MaxLength(255)
|
|
72023
|
+
RootEntity?: string;
|
|
72024
|
+
|
|
72025
|
+
@Field({nullable: true})
|
|
72026
|
+
@MaxLength(100)
|
|
72027
|
+
InitiatedByUser?: string;
|
|
72028
|
+
|
|
72029
|
+
@Field(() => [String], { nullable: true, description: `Field-level security: when non-null, the fields on this entity the calling user may read. Any other field arriving as null was withheld by the server rather than genuinely empty. Null for callers with no field restrictions.` })
|
|
72030
|
+
ReadableFields___?: string[];
|
|
72031
|
+
|
|
72032
|
+
}
|
|
72033
|
+
|
|
72034
|
+
//****************************************************************************
|
|
72035
|
+
// INPUT TYPE for MJ: Record Clone Logs
|
|
72036
|
+
//****************************************************************************
|
|
72037
|
+
@InputType()
|
|
72038
|
+
export class CreateMJRecordCloneLogInput {
|
|
72039
|
+
@Field({ nullable: true })
|
|
72040
|
+
ID?: string;
|
|
72041
|
+
|
|
72042
|
+
@Field({ nullable: true })
|
|
72043
|
+
RootEntityID?: string;
|
|
72044
|
+
|
|
72045
|
+
@Field({ nullable: true })
|
|
72046
|
+
RootSourceRecordID?: string;
|
|
72047
|
+
|
|
72048
|
+
@Field({ nullable: true })
|
|
72049
|
+
RootTargetRecordID: string | null;
|
|
72050
|
+
|
|
72051
|
+
@Field({ nullable: true })
|
|
72052
|
+
InitiatedByUserID?: string;
|
|
72053
|
+
|
|
72054
|
+
@Field({ nullable: true })
|
|
72055
|
+
Status?: string;
|
|
72056
|
+
|
|
72057
|
+
@Field({ nullable: true })
|
|
72058
|
+
StartedAt?: Date;
|
|
72059
|
+
|
|
72060
|
+
@Field({ nullable: true })
|
|
72061
|
+
EndedAt: Date | null;
|
|
72062
|
+
|
|
72063
|
+
@Field({ nullable: true })
|
|
72064
|
+
PlanHash?: string;
|
|
72065
|
+
|
|
72066
|
+
@Field({ nullable: true })
|
|
72067
|
+
PlanJSON?: string;
|
|
72068
|
+
|
|
72069
|
+
@Field({ nullable: true })
|
|
72070
|
+
OptionsJSON: string | null;
|
|
72071
|
+
|
|
72072
|
+
@Field({ nullable: true })
|
|
72073
|
+
ResultJSON: string | null;
|
|
72074
|
+
|
|
72075
|
+
@Field({ nullable: true })
|
|
72076
|
+
Reason: string | null;
|
|
72077
|
+
|
|
72078
|
+
@Field({ nullable: true })
|
|
72079
|
+
ErrorMessage: string | null;
|
|
72080
|
+
|
|
72081
|
+
@Field({ nullable: true })
|
|
72082
|
+
ProcessRunID: string | null;
|
|
72083
|
+
|
|
72084
|
+
@Field(() => Int, { nullable: true })
|
|
72085
|
+
CreatedCount?: number;
|
|
72086
|
+
|
|
72087
|
+
@Field(() => Int, { nullable: true })
|
|
72088
|
+
ReferencedCount?: number;
|
|
72089
|
+
|
|
72090
|
+
@Field(() => Int, { nullable: true })
|
|
72091
|
+
SkippedCount?: number;
|
|
72092
|
+
|
|
72093
|
+
@Field(() => RestoreContextInput, { nullable: true })
|
|
72094
|
+
RestoreContext___?: RestoreContextInput;
|
|
72095
|
+
}
|
|
72096
|
+
|
|
72097
|
+
|
|
72098
|
+
//****************************************************************************
|
|
72099
|
+
// INPUT TYPE for MJ: Record Clone Logs
|
|
72100
|
+
//****************************************************************************
|
|
72101
|
+
@InputType()
|
|
72102
|
+
export class UpdateMJRecordCloneLogInput {
|
|
72103
|
+
@Field()
|
|
72104
|
+
ID: string;
|
|
72105
|
+
|
|
72106
|
+
@Field({ nullable: true })
|
|
72107
|
+
RootEntityID?: string;
|
|
72108
|
+
|
|
72109
|
+
@Field({ nullable: true })
|
|
72110
|
+
RootSourceRecordID?: string;
|
|
72111
|
+
|
|
72112
|
+
@Field({ nullable: true })
|
|
72113
|
+
RootTargetRecordID?: string | null;
|
|
72114
|
+
|
|
72115
|
+
@Field({ nullable: true })
|
|
72116
|
+
InitiatedByUserID?: string;
|
|
72117
|
+
|
|
72118
|
+
@Field({ nullable: true })
|
|
72119
|
+
Status?: string;
|
|
72120
|
+
|
|
72121
|
+
@Field({ nullable: true })
|
|
72122
|
+
StartedAt?: Date;
|
|
72123
|
+
|
|
72124
|
+
@Field({ nullable: true })
|
|
72125
|
+
EndedAt?: Date | null;
|
|
72126
|
+
|
|
72127
|
+
@Field({ nullable: true })
|
|
72128
|
+
PlanHash?: string;
|
|
72129
|
+
|
|
72130
|
+
@Field({ nullable: true })
|
|
72131
|
+
PlanJSON?: string;
|
|
72132
|
+
|
|
72133
|
+
@Field({ nullable: true })
|
|
72134
|
+
OptionsJSON?: string | null;
|
|
72135
|
+
|
|
72136
|
+
@Field({ nullable: true })
|
|
72137
|
+
ResultJSON?: string | null;
|
|
72138
|
+
|
|
72139
|
+
@Field({ nullable: true })
|
|
72140
|
+
Reason?: string | null;
|
|
72141
|
+
|
|
72142
|
+
@Field({ nullable: true })
|
|
72143
|
+
ErrorMessage?: string | null;
|
|
72144
|
+
|
|
72145
|
+
@Field({ nullable: true })
|
|
72146
|
+
ProcessRunID?: string | null;
|
|
72147
|
+
|
|
72148
|
+
@Field(() => Int, { nullable: true })
|
|
72149
|
+
CreatedCount?: number;
|
|
72150
|
+
|
|
72151
|
+
@Field(() => Int, { nullable: true })
|
|
72152
|
+
ReferencedCount?: number;
|
|
72153
|
+
|
|
72154
|
+
@Field(() => Int, { nullable: true })
|
|
72155
|
+
SkippedCount?: number;
|
|
72156
|
+
|
|
72157
|
+
@Field(() => [KeyValuePairInput], { nullable: true })
|
|
72158
|
+
OldValues___?: KeyValuePairInput[];
|
|
72159
|
+
|
|
72160
|
+
@Field(() => RestoreContextInput, { nullable: true })
|
|
72161
|
+
RestoreContext___?: RestoreContextInput;
|
|
72162
|
+
}
|
|
72163
|
+
|
|
72164
|
+
//****************************************************************************
|
|
72165
|
+
// RESOLVER for MJ: Record Clone Logs
|
|
72166
|
+
//****************************************************************************
|
|
72167
|
+
@ObjectType()
|
|
72168
|
+
export class RunMJRecordCloneLogViewResult {
|
|
72169
|
+
@Field(() => [MJRecordCloneLog_])
|
|
72170
|
+
Results: MJRecordCloneLog_[];
|
|
72171
|
+
|
|
72172
|
+
@Field(() => String, {nullable: true})
|
|
72173
|
+
UserViewRunID?: string;
|
|
72174
|
+
|
|
72175
|
+
@Field(() => Int, {nullable: true})
|
|
72176
|
+
RowCount: number;
|
|
72177
|
+
|
|
72178
|
+
@Field(() => Int, {nullable: true})
|
|
72179
|
+
TotalRowCount: number;
|
|
72180
|
+
|
|
72181
|
+
@Field(() => Int, {nullable: true})
|
|
72182
|
+
ExecutionTime: number;
|
|
72183
|
+
|
|
72184
|
+
@Field({nullable: true})
|
|
72185
|
+
ErrorMessage?: string;
|
|
72186
|
+
|
|
72187
|
+
@Field(() => Boolean, {nullable: false})
|
|
72188
|
+
Success: boolean;
|
|
72189
|
+
}
|
|
72190
|
+
|
|
72191
|
+
@Resolver(MJRecordCloneLog_)
|
|
72192
|
+
export class MJRecordCloneLogResolver extends ResolverBase {
|
|
72193
|
+
@Query(() => RunMJRecordCloneLogViewResult)
|
|
72194
|
+
async RunMJRecordCloneLogViewByID(@Arg('input', () => RunViewByIDInput) input: RunViewByIDInput, @Ctx() { providers, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
72195
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
72196
|
+
return super.RunViewByIDGeneric(input, provider, userPayload, pubSub);
|
|
72197
|
+
}
|
|
72198
|
+
|
|
72199
|
+
@Query(() => RunMJRecordCloneLogViewResult)
|
|
72200
|
+
async RunMJRecordCloneLogViewByName(@Arg('input', () => RunViewByNameInput) input: RunViewByNameInput, @Ctx() { providers, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
72201
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
72202
|
+
return super.RunViewByNameGeneric(input, provider, userPayload, pubSub);
|
|
72203
|
+
}
|
|
72204
|
+
|
|
72205
|
+
@Query(() => RunMJRecordCloneLogViewResult)
|
|
72206
|
+
async RunMJRecordCloneLogDynamicView(@Arg('input', () => RunDynamicViewInput) input: RunDynamicViewInput, @Ctx() { providers, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
72207
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
72208
|
+
input.EntityName = 'MJ: Record Clone Logs';
|
|
72209
|
+
return super.RunDynamicViewGeneric(input, provider, userPayload, pubSub);
|
|
72210
|
+
}
|
|
72211
|
+
@Query(() => MJRecordCloneLog_, { nullable: true })
|
|
72212
|
+
async MJRecordCloneLog(@Arg('ID', () => String) ID: string, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine): Promise<MJRecordCloneLog_ | null> {
|
|
72213
|
+
this.CheckUserReadPermissions('MJ: Record Clone Logs', userPayload);
|
|
72214
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
72215
|
+
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwRecordCloneLogs')} WHERE ${provider.QuoteIdentifier('ID')}=${provider.BuildParameterPlaceholder(0)} ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: Record Clone Logs', userPayload, EntityPermissionType.Read, 'AND');
|
|
72216
|
+
const rows = await provider.ExecuteSQL(sSQL, [ID], undefined, this.GetUserFromPayload(userPayload));
|
|
72217
|
+
const result = await this.MapFieldNamesToCodeNames('MJ: Record Clone Logs', rows && rows.length > 0 ? rows[0] : null, this.GetUserFromPayload(userPayload));
|
|
72218
|
+
return result;
|
|
72219
|
+
}
|
|
72220
|
+
|
|
72221
|
+
@Mutation(() => MJRecordCloneLog_)
|
|
72222
|
+
async CreateMJRecordCloneLog(
|
|
72223
|
+
@Arg('input', () => CreateMJRecordCloneLogInput) input: CreateMJRecordCloneLogInput,
|
|
72224
|
+
@Ctx() { providers, userPayload }: AppContext,
|
|
72225
|
+
@PubSub() pubSub: PubSubEngine
|
|
72226
|
+
) {
|
|
72227
|
+
const provider = GetReadWriteProvider(providers);
|
|
72228
|
+
return this.CreateRecord('MJ: Record Clone Logs', input, provider, userPayload, pubSub)
|
|
72229
|
+
}
|
|
72230
|
+
|
|
72231
|
+
@Mutation(() => MJRecordCloneLog_)
|
|
72232
|
+
async UpdateMJRecordCloneLog(
|
|
72233
|
+
@Arg('input', () => UpdateMJRecordCloneLogInput) input: UpdateMJRecordCloneLogInput,
|
|
72234
|
+
@Ctx() { providers, userPayload }: AppContext,
|
|
72235
|
+
@PubSub() pubSub: PubSubEngine
|
|
72236
|
+
) {
|
|
72237
|
+
const provider = GetReadWriteProvider(providers);
|
|
72238
|
+
return this.UpdateRecord('MJ: Record Clone Logs', input, provider, userPayload, pubSub);
|
|
72239
|
+
}
|
|
72240
|
+
|
|
72241
|
+
@Mutation(() => MJRecordCloneLog_)
|
|
72242
|
+
async DeleteMJRecordCloneLog(@Arg('ID', () => String) ID: string, @Arg('options___', () => DeleteOptionsInput) options: DeleteOptionsInput, @Ctx() { providers, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
72243
|
+
const provider = GetReadWriteProvider(providers);
|
|
72244
|
+
const key = new CompositeKey([{FieldName: 'ID', Value: ID}]);
|
|
72245
|
+
return this.DeleteRecord('MJ: Record Clone Logs', key, options, provider, userPayload, pubSub);
|
|
72246
|
+
}
|
|
72247
|
+
|
|
72248
|
+
}
|
|
72249
|
+
|
|
71259
72250
|
//****************************************************************************
|
|
71260
72251
|
// ENTITY CLASS for MJ: Record Geo Codes
|
|
71261
72252
|
//****************************************************************************
|
|
@@ -74527,6 +75518,2648 @@ export class MJRowLevelSecurityFilterResolver extends ResolverBase {
|
|
|
74527
75518
|
|
|
74528
75519
|
}
|
|
74529
75520
|
|
|
75521
|
+
//****************************************************************************
|
|
75522
|
+
// ENTITY CLASS for MJ: Rubric Bands
|
|
75523
|
+
//****************************************************************************
|
|
75524
|
+
@ObjectType({ description: `A labeled range of the normalized score, e.g. Exemplary / Proficient / Developing. Display and reporting ONLY: bands never decide pass or fail, which is always PassThreshold plus gates.` })
|
|
75525
|
+
export class MJRubricBand_ {
|
|
75526
|
+
@Field()
|
|
75527
|
+
@MaxLength(36)
|
|
75528
|
+
ID: string;
|
|
75529
|
+
|
|
75530
|
+
@Field({nullable: true})
|
|
75531
|
+
@MaxLength(36)
|
|
75532
|
+
RubricVersionID?: string;
|
|
75533
|
+
|
|
75534
|
+
@Field({nullable: true, description: `Display label of the band.`})
|
|
75535
|
+
@MaxLength(100)
|
|
75536
|
+
Label?: string;
|
|
75537
|
+
|
|
75538
|
+
@Field({nullable: true, description: `What a result in this band means.`})
|
|
75539
|
+
Description?: string;
|
|
75540
|
+
|
|
75541
|
+
@Field(() => Float, {nullable: true, description: `Inclusive lower bound of the band on the 0..1 normalized scale.`})
|
|
75542
|
+
MinScore?: number;
|
|
75543
|
+
|
|
75544
|
+
@Field(() => Float, {nullable: true, description: `Exclusive upper bound of the band on the 0..1 normalized scale; the highest band also includes 1.`})
|
|
75545
|
+
MaxScore?: number;
|
|
75546
|
+
|
|
75547
|
+
@Field({nullable: true, description: `Semantic tone the UI maps to design tokens (never a raw color).`})
|
|
75548
|
+
@MaxLength(20)
|
|
75549
|
+
DisplayTone?: string;
|
|
75550
|
+
|
|
75551
|
+
@Field(() => Int, {nullable: true, description: `Display order of the band.`})
|
|
75552
|
+
Sequence?: number;
|
|
75553
|
+
|
|
75554
|
+
@Field()
|
|
75555
|
+
_mj__CreatedAt: Date;
|
|
75556
|
+
|
|
75557
|
+
@Field()
|
|
75558
|
+
_mj__UpdatedAt: Date;
|
|
75559
|
+
|
|
75560
|
+
@Field(() => [String], { nullable: true, description: `Field-level security: when non-null, the fields on this entity the calling user may read. Any other field arriving as null was withheld by the server rather than genuinely empty. Null for callers with no field restrictions.` })
|
|
75561
|
+
ReadableFields___?: string[];
|
|
75562
|
+
|
|
75563
|
+
}
|
|
75564
|
+
|
|
75565
|
+
//****************************************************************************
|
|
75566
|
+
// INPUT TYPE for MJ: Rubric Bands
|
|
75567
|
+
//****************************************************************************
|
|
75568
|
+
@InputType()
|
|
75569
|
+
export class CreateMJRubricBandInput {
|
|
75570
|
+
@Field({ nullable: true })
|
|
75571
|
+
ID?: string;
|
|
75572
|
+
|
|
75573
|
+
@Field({ nullable: true })
|
|
75574
|
+
RubricVersionID?: string;
|
|
75575
|
+
|
|
75576
|
+
@Field({ nullable: true })
|
|
75577
|
+
Label?: string;
|
|
75578
|
+
|
|
75579
|
+
@Field({ nullable: true })
|
|
75580
|
+
Description: string | null;
|
|
75581
|
+
|
|
75582
|
+
@Field(() => Float, { nullable: true })
|
|
75583
|
+
MinScore?: number;
|
|
75584
|
+
|
|
75585
|
+
@Field(() => Float, { nullable: true })
|
|
75586
|
+
MaxScore?: number;
|
|
75587
|
+
|
|
75588
|
+
@Field({ nullable: true })
|
|
75589
|
+
DisplayTone?: string;
|
|
75590
|
+
|
|
75591
|
+
@Field(() => Int, { nullable: true })
|
|
75592
|
+
Sequence?: number;
|
|
75593
|
+
|
|
75594
|
+
@Field(() => RestoreContextInput, { nullable: true })
|
|
75595
|
+
RestoreContext___?: RestoreContextInput;
|
|
75596
|
+
}
|
|
75597
|
+
|
|
75598
|
+
|
|
75599
|
+
//****************************************************************************
|
|
75600
|
+
// INPUT TYPE for MJ: Rubric Bands
|
|
75601
|
+
//****************************************************************************
|
|
75602
|
+
@InputType()
|
|
75603
|
+
export class UpdateMJRubricBandInput {
|
|
75604
|
+
@Field()
|
|
75605
|
+
ID: string;
|
|
75606
|
+
|
|
75607
|
+
@Field({ nullable: true })
|
|
75608
|
+
RubricVersionID?: string;
|
|
75609
|
+
|
|
75610
|
+
@Field({ nullable: true })
|
|
75611
|
+
Label?: string;
|
|
75612
|
+
|
|
75613
|
+
@Field({ nullable: true })
|
|
75614
|
+
Description?: string | null;
|
|
75615
|
+
|
|
75616
|
+
@Field(() => Float, { nullable: true })
|
|
75617
|
+
MinScore?: number;
|
|
75618
|
+
|
|
75619
|
+
@Field(() => Float, { nullable: true })
|
|
75620
|
+
MaxScore?: number;
|
|
75621
|
+
|
|
75622
|
+
@Field({ nullable: true })
|
|
75623
|
+
DisplayTone?: string;
|
|
75624
|
+
|
|
75625
|
+
@Field(() => Int, { nullable: true })
|
|
75626
|
+
Sequence?: number;
|
|
75627
|
+
|
|
75628
|
+
@Field(() => [KeyValuePairInput], { nullable: true })
|
|
75629
|
+
OldValues___?: KeyValuePairInput[];
|
|
75630
|
+
|
|
75631
|
+
@Field(() => RestoreContextInput, { nullable: true })
|
|
75632
|
+
RestoreContext___?: RestoreContextInput;
|
|
75633
|
+
}
|
|
75634
|
+
|
|
75635
|
+
//****************************************************************************
|
|
75636
|
+
// RESOLVER for MJ: Rubric Bands
|
|
75637
|
+
//****************************************************************************
|
|
75638
|
+
@ObjectType()
|
|
75639
|
+
export class RunMJRubricBandViewResult {
|
|
75640
|
+
@Field(() => [MJRubricBand_])
|
|
75641
|
+
Results: MJRubricBand_[];
|
|
75642
|
+
|
|
75643
|
+
@Field(() => String, {nullable: true})
|
|
75644
|
+
UserViewRunID?: string;
|
|
75645
|
+
|
|
75646
|
+
@Field(() => Int, {nullable: true})
|
|
75647
|
+
RowCount: number;
|
|
75648
|
+
|
|
75649
|
+
@Field(() => Int, {nullable: true})
|
|
75650
|
+
TotalRowCount: number;
|
|
75651
|
+
|
|
75652
|
+
@Field(() => Int, {nullable: true})
|
|
75653
|
+
ExecutionTime: number;
|
|
75654
|
+
|
|
75655
|
+
@Field({nullable: true})
|
|
75656
|
+
ErrorMessage?: string;
|
|
75657
|
+
|
|
75658
|
+
@Field(() => Boolean, {nullable: false})
|
|
75659
|
+
Success: boolean;
|
|
75660
|
+
}
|
|
75661
|
+
|
|
75662
|
+
@Resolver(MJRubricBand_)
|
|
75663
|
+
export class MJRubricBandResolver extends ResolverBase {
|
|
75664
|
+
@Query(() => RunMJRubricBandViewResult)
|
|
75665
|
+
async RunMJRubricBandViewByID(@Arg('input', () => RunViewByIDInput) input: RunViewByIDInput, @Ctx() { providers, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
75666
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
75667
|
+
return super.RunViewByIDGeneric(input, provider, userPayload, pubSub);
|
|
75668
|
+
}
|
|
75669
|
+
|
|
75670
|
+
@Query(() => RunMJRubricBandViewResult)
|
|
75671
|
+
async RunMJRubricBandViewByName(@Arg('input', () => RunViewByNameInput) input: RunViewByNameInput, @Ctx() { providers, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
75672
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
75673
|
+
return super.RunViewByNameGeneric(input, provider, userPayload, pubSub);
|
|
75674
|
+
}
|
|
75675
|
+
|
|
75676
|
+
@Query(() => RunMJRubricBandViewResult)
|
|
75677
|
+
async RunMJRubricBandDynamicView(@Arg('input', () => RunDynamicViewInput) input: RunDynamicViewInput, @Ctx() { providers, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
75678
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
75679
|
+
input.EntityName = 'MJ: Rubric Bands';
|
|
75680
|
+
return super.RunDynamicViewGeneric(input, provider, userPayload, pubSub);
|
|
75681
|
+
}
|
|
75682
|
+
@Query(() => MJRubricBand_, { nullable: true })
|
|
75683
|
+
async MJRubricBand(@Arg('ID', () => String) ID: string, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine): Promise<MJRubricBand_ | null> {
|
|
75684
|
+
this.CheckUserReadPermissions('MJ: Rubric Bands', userPayload);
|
|
75685
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
75686
|
+
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwRubricBands')} WHERE ${provider.QuoteIdentifier('ID')}=${provider.BuildParameterPlaceholder(0)} ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: Rubric Bands', userPayload, EntityPermissionType.Read, 'AND');
|
|
75687
|
+
const rows = await provider.ExecuteSQL(sSQL, [ID], undefined, this.GetUserFromPayload(userPayload));
|
|
75688
|
+
const result = await this.MapFieldNamesToCodeNames('MJ: Rubric Bands', rows && rows.length > 0 ? rows[0] : null, this.GetUserFromPayload(userPayload));
|
|
75689
|
+
return result;
|
|
75690
|
+
}
|
|
75691
|
+
|
|
75692
|
+
@Mutation(() => MJRubricBand_)
|
|
75693
|
+
async CreateMJRubricBand(
|
|
75694
|
+
@Arg('input', () => CreateMJRubricBandInput) input: CreateMJRubricBandInput,
|
|
75695
|
+
@Ctx() { providers, userPayload }: AppContext,
|
|
75696
|
+
@PubSub() pubSub: PubSubEngine
|
|
75697
|
+
) {
|
|
75698
|
+
const provider = GetReadWriteProvider(providers);
|
|
75699
|
+
return this.CreateRecord('MJ: Rubric Bands', input, provider, userPayload, pubSub)
|
|
75700
|
+
}
|
|
75701
|
+
|
|
75702
|
+
@Mutation(() => MJRubricBand_)
|
|
75703
|
+
async UpdateMJRubricBand(
|
|
75704
|
+
@Arg('input', () => UpdateMJRubricBandInput) input: UpdateMJRubricBandInput,
|
|
75705
|
+
@Ctx() { providers, userPayload }: AppContext,
|
|
75706
|
+
@PubSub() pubSub: PubSubEngine
|
|
75707
|
+
) {
|
|
75708
|
+
const provider = GetReadWriteProvider(providers);
|
|
75709
|
+
return this.UpdateRecord('MJ: Rubric Bands', input, provider, userPayload, pubSub);
|
|
75710
|
+
}
|
|
75711
|
+
|
|
75712
|
+
@Mutation(() => MJRubricBand_)
|
|
75713
|
+
async DeleteMJRubricBand(@Arg('ID', () => String) ID: string, @Arg('options___', () => DeleteOptionsInput) options: DeleteOptionsInput, @Ctx() { providers, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
75714
|
+
const provider = GetReadWriteProvider(providers);
|
|
75715
|
+
const key = new CompositeKey([{FieldName: 'ID', Value: ID}]);
|
|
75716
|
+
return this.DeleteRecord('MJ: Rubric Bands', key, options, provider, userPayload, pubSub);
|
|
75717
|
+
}
|
|
75718
|
+
|
|
75719
|
+
}
|
|
75720
|
+
|
|
75721
|
+
//****************************************************************************
|
|
75722
|
+
// ENTITY CLASS for MJ: Rubric Categories
|
|
75723
|
+
//****************************************************************************
|
|
75724
|
+
@ObjectType({ description: `Hierarchical folders for organizing rubrics.` })
|
|
75725
|
+
export class MJRubricCategory_ {
|
|
75726
|
+
@Field()
|
|
75727
|
+
@MaxLength(36)
|
|
75728
|
+
ID: string;
|
|
75729
|
+
|
|
75730
|
+
@Field({nullable: true, description: `Display name of the category.`})
|
|
75731
|
+
@MaxLength(255)
|
|
75732
|
+
Name?: string;
|
|
75733
|
+
|
|
75734
|
+
@Field({nullable: true, description: `What rubrics in this category are for.`})
|
|
75735
|
+
Description?: string;
|
|
75736
|
+
|
|
75737
|
+
@Field({nullable: true})
|
|
75738
|
+
@MaxLength(36)
|
|
75739
|
+
ParentID?: string;
|
|
75740
|
+
|
|
75741
|
+
@Field()
|
|
75742
|
+
_mj__CreatedAt: Date;
|
|
75743
|
+
|
|
75744
|
+
@Field()
|
|
75745
|
+
_mj__UpdatedAt: Date;
|
|
75746
|
+
|
|
75747
|
+
@Field({nullable: true})
|
|
75748
|
+
@MaxLength(255)
|
|
75749
|
+
Parent?: string;
|
|
75750
|
+
|
|
75751
|
+
@Field({nullable: true})
|
|
75752
|
+
@MaxLength(36)
|
|
75753
|
+
RootParentID?: string;
|
|
75754
|
+
|
|
75755
|
+
@Field(() => Int, {nullable: true})
|
|
75756
|
+
ParentIDDepth?: number;
|
|
75757
|
+
|
|
75758
|
+
@Field({nullable: true})
|
|
75759
|
+
ParentIDPath?: string;
|
|
75760
|
+
|
|
75761
|
+
@Field(() => Boolean, {nullable: true})
|
|
75762
|
+
ParentIDIsLeaf?: boolean;
|
|
75763
|
+
|
|
75764
|
+
@Field(() => Int, {nullable: true})
|
|
75765
|
+
ParentIDChildCount?: number;
|
|
75766
|
+
|
|
75767
|
+
@Field(() => [String], { nullable: true, description: `Field-level security: when non-null, the fields on this entity the calling user may read. Any other field arriving as null was withheld by the server rather than genuinely empty. Null for callers with no field restrictions.` })
|
|
75768
|
+
ReadableFields___?: string[];
|
|
75769
|
+
|
|
75770
|
+
}
|
|
75771
|
+
|
|
75772
|
+
//****************************************************************************
|
|
75773
|
+
// INPUT TYPE for MJ: Rubric Categories
|
|
75774
|
+
//****************************************************************************
|
|
75775
|
+
@InputType()
|
|
75776
|
+
export class CreateMJRubricCategoryInput {
|
|
75777
|
+
@Field({ nullable: true })
|
|
75778
|
+
ID?: string;
|
|
75779
|
+
|
|
75780
|
+
@Field({ nullable: true })
|
|
75781
|
+
Name?: string;
|
|
75782
|
+
|
|
75783
|
+
@Field({ nullable: true })
|
|
75784
|
+
Description: string | null;
|
|
75785
|
+
|
|
75786
|
+
@Field({ nullable: true })
|
|
75787
|
+
ParentID: string | null;
|
|
75788
|
+
|
|
75789
|
+
@Field(() => RestoreContextInput, { nullable: true })
|
|
75790
|
+
RestoreContext___?: RestoreContextInput;
|
|
75791
|
+
}
|
|
75792
|
+
|
|
75793
|
+
|
|
75794
|
+
//****************************************************************************
|
|
75795
|
+
// INPUT TYPE for MJ: Rubric Categories
|
|
75796
|
+
//****************************************************************************
|
|
75797
|
+
@InputType()
|
|
75798
|
+
export class UpdateMJRubricCategoryInput {
|
|
75799
|
+
@Field()
|
|
75800
|
+
ID: string;
|
|
75801
|
+
|
|
75802
|
+
@Field({ nullable: true })
|
|
75803
|
+
Name?: string;
|
|
75804
|
+
|
|
75805
|
+
@Field({ nullable: true })
|
|
75806
|
+
Description?: string | null;
|
|
75807
|
+
|
|
75808
|
+
@Field({ nullable: true })
|
|
75809
|
+
ParentID?: string | null;
|
|
75810
|
+
|
|
75811
|
+
@Field(() => [KeyValuePairInput], { nullable: true })
|
|
75812
|
+
OldValues___?: KeyValuePairInput[];
|
|
75813
|
+
|
|
75814
|
+
@Field(() => RestoreContextInput, { nullable: true })
|
|
75815
|
+
RestoreContext___?: RestoreContextInput;
|
|
75816
|
+
}
|
|
75817
|
+
|
|
75818
|
+
//****************************************************************************
|
|
75819
|
+
// RESOLVER for MJ: Rubric Categories
|
|
75820
|
+
//****************************************************************************
|
|
75821
|
+
@ObjectType()
|
|
75822
|
+
export class RunMJRubricCategoryViewResult {
|
|
75823
|
+
@Field(() => [MJRubricCategory_])
|
|
75824
|
+
Results: MJRubricCategory_[];
|
|
75825
|
+
|
|
75826
|
+
@Field(() => String, {nullable: true})
|
|
75827
|
+
UserViewRunID?: string;
|
|
75828
|
+
|
|
75829
|
+
@Field(() => Int, {nullable: true})
|
|
75830
|
+
RowCount: number;
|
|
75831
|
+
|
|
75832
|
+
@Field(() => Int, {nullable: true})
|
|
75833
|
+
TotalRowCount: number;
|
|
75834
|
+
|
|
75835
|
+
@Field(() => Int, {nullable: true})
|
|
75836
|
+
ExecutionTime: number;
|
|
75837
|
+
|
|
75838
|
+
@Field({nullable: true})
|
|
75839
|
+
ErrorMessage?: string;
|
|
75840
|
+
|
|
75841
|
+
@Field(() => Boolean, {nullable: false})
|
|
75842
|
+
Success: boolean;
|
|
75843
|
+
}
|
|
75844
|
+
|
|
75845
|
+
@Resolver(MJRubricCategory_)
|
|
75846
|
+
export class MJRubricCategoryResolver extends ResolverBase {
|
|
75847
|
+
@Query(() => RunMJRubricCategoryViewResult)
|
|
75848
|
+
async RunMJRubricCategoryViewByID(@Arg('input', () => RunViewByIDInput) input: RunViewByIDInput, @Ctx() { providers, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
75849
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
75850
|
+
return super.RunViewByIDGeneric(input, provider, userPayload, pubSub);
|
|
75851
|
+
}
|
|
75852
|
+
|
|
75853
|
+
@Query(() => RunMJRubricCategoryViewResult)
|
|
75854
|
+
async RunMJRubricCategoryViewByName(@Arg('input', () => RunViewByNameInput) input: RunViewByNameInput, @Ctx() { providers, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
75855
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
75856
|
+
return super.RunViewByNameGeneric(input, provider, userPayload, pubSub);
|
|
75857
|
+
}
|
|
75858
|
+
|
|
75859
|
+
@Query(() => RunMJRubricCategoryViewResult)
|
|
75860
|
+
async RunMJRubricCategoryDynamicView(@Arg('input', () => RunDynamicViewInput) input: RunDynamicViewInput, @Ctx() { providers, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
75861
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
75862
|
+
input.EntityName = 'MJ: Rubric Categories';
|
|
75863
|
+
return super.RunDynamicViewGeneric(input, provider, userPayload, pubSub);
|
|
75864
|
+
}
|
|
75865
|
+
@Query(() => MJRubricCategory_, { nullable: true })
|
|
75866
|
+
async MJRubricCategory(@Arg('ID', () => String) ID: string, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine): Promise<MJRubricCategory_ | null> {
|
|
75867
|
+
this.CheckUserReadPermissions('MJ: Rubric Categories', userPayload);
|
|
75868
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
75869
|
+
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwRubricCategories')} WHERE ${provider.QuoteIdentifier('ID')}=${provider.BuildParameterPlaceholder(0)} ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: Rubric Categories', userPayload, EntityPermissionType.Read, 'AND');
|
|
75870
|
+
const rows = await provider.ExecuteSQL(sSQL, [ID], undefined, this.GetUserFromPayload(userPayload));
|
|
75871
|
+
const result = await this.MapFieldNamesToCodeNames('MJ: Rubric Categories', rows && rows.length > 0 ? rows[0] : null, this.GetUserFromPayload(userPayload));
|
|
75872
|
+
return result;
|
|
75873
|
+
}
|
|
75874
|
+
|
|
75875
|
+
@Mutation(() => MJRubricCategory_)
|
|
75876
|
+
async CreateMJRubricCategory(
|
|
75877
|
+
@Arg('input', () => CreateMJRubricCategoryInput) input: CreateMJRubricCategoryInput,
|
|
75878
|
+
@Ctx() { providers, userPayload }: AppContext,
|
|
75879
|
+
@PubSub() pubSub: PubSubEngine
|
|
75880
|
+
) {
|
|
75881
|
+
const provider = GetReadWriteProvider(providers);
|
|
75882
|
+
return this.CreateRecord('MJ: Rubric Categories', input, provider, userPayload, pubSub)
|
|
75883
|
+
}
|
|
75884
|
+
|
|
75885
|
+
@Mutation(() => MJRubricCategory_)
|
|
75886
|
+
async UpdateMJRubricCategory(
|
|
75887
|
+
@Arg('input', () => UpdateMJRubricCategoryInput) input: UpdateMJRubricCategoryInput,
|
|
75888
|
+
@Ctx() { providers, userPayload }: AppContext,
|
|
75889
|
+
@PubSub() pubSub: PubSubEngine
|
|
75890
|
+
) {
|
|
75891
|
+
const provider = GetReadWriteProvider(providers);
|
|
75892
|
+
return this.UpdateRecord('MJ: Rubric Categories', input, provider, userPayload, pubSub);
|
|
75893
|
+
}
|
|
75894
|
+
|
|
75895
|
+
@Mutation(() => MJRubricCategory_)
|
|
75896
|
+
async DeleteMJRubricCategory(@Arg('ID', () => String) ID: string, @Arg('options___', () => DeleteOptionsInput) options: DeleteOptionsInput, @Ctx() { providers, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
75897
|
+
const provider = GetReadWriteProvider(providers);
|
|
75898
|
+
const key = new CompositeKey([{FieldName: 'ID', Value: ID}]);
|
|
75899
|
+
return this.DeleteRecord('MJ: Rubric Categories', key, options, provider, userPayload, pubSub);
|
|
75900
|
+
}
|
|
75901
|
+
|
|
75902
|
+
}
|
|
75903
|
+
|
|
75904
|
+
//****************************************************************************
|
|
75905
|
+
// ENTITY CLASS for MJ: Rubric Criteria
|
|
75906
|
+
//****************************************************************************
|
|
75907
|
+
@ObjectType({ description: `A node in a rubric version\'s weighted tree. Groups roll up their children; criteria (leaves) are answered on a scale. Weights are relative among siblings, so a node\'s share of the total is the product of its and its ancestors\' normalized weights.` })
|
|
75908
|
+
export class MJRubricCriterion_ {
|
|
75909
|
+
@Field()
|
|
75910
|
+
@MaxLength(36)
|
|
75911
|
+
ID: string;
|
|
75912
|
+
|
|
75913
|
+
@Field({nullable: true})
|
|
75914
|
+
@MaxLength(36)
|
|
75915
|
+
RubricVersionID?: string;
|
|
75916
|
+
|
|
75917
|
+
@Field({nullable: true, description: `Parent group node. NULL = a top-level node of the rubric.`})
|
|
75918
|
+
@MaxLength(36)
|
|
75919
|
+
ParentID?: string;
|
|
75920
|
+
|
|
75921
|
+
@Field({nullable: true, description: `Stable machine key, unique within the version and carried unchanged across versions. It is the criterion's identity for comparing and aggregating results over time; renaming it is a removal plus an addition (a major bump).`})
|
|
75922
|
+
@MaxLength(100)
|
|
75923
|
+
Key?: string;
|
|
75924
|
+
|
|
75925
|
+
@Field({nullable: true, description: `Display name of the group or criterion.`})
|
|
75926
|
+
@MaxLength(255)
|
|
75927
|
+
Name?: string;
|
|
75928
|
+
|
|
75929
|
+
@Field({nullable: true, description: `What the node covers.`})
|
|
75930
|
+
Description?: string;
|
|
75931
|
+
|
|
75932
|
+
@Field({nullable: true, description: `Instructions to evaluators (human and AI) on how to judge this criterion and what evidence counts.`})
|
|
75933
|
+
Guidance?: string;
|
|
75934
|
+
|
|
75935
|
+
@Field({nullable: true, description: `Group: has children, no scale, and a computed score. Criterion: a leaf answered on ScaleID.`})
|
|
75936
|
+
@MaxLength(20)
|
|
75937
|
+
NodeType?: string;
|
|
75938
|
+
|
|
75939
|
+
@Field({nullable: true})
|
|
75940
|
+
@MaxLength(36)
|
|
75941
|
+
ScaleID?: string;
|
|
75942
|
+
|
|
75943
|
+
@Field(() => Float, {nullable: true, description: `Relative weight among siblings (normalized within the parent at scoring time). Must be >= 0.`})
|
|
75944
|
+
Weight?: number;
|
|
75945
|
+
|
|
75946
|
+
@Field(() => Boolean, {nullable: true, description: `1 = recorded and displayed but excluded from every score, gate and pass decision.`})
|
|
75947
|
+
IsAdvisory?: boolean;
|
|
75948
|
+
|
|
75949
|
+
@Field(() => Boolean, {nullable: true, description: `1 = knockout: if this node's normalized score is below GateMinimumScore the whole evaluation fails, whatever its overall score. Also applies to groups.`})
|
|
75950
|
+
IsGate?: boolean;
|
|
75951
|
+
|
|
75952
|
+
@Field(() => Float, {nullable: true, description: `Normalized score (0..1) a gate node must reach. Required when IsGate = 1.`})
|
|
75953
|
+
GateMinimumScore?: number;
|
|
75954
|
+
|
|
75955
|
+
@Field({nullable: true, description: `Overrides the version's NotApplicablePolicy for this node. NULL = inherit.`})
|
|
75956
|
+
@MaxLength(30)
|
|
75957
|
+
NotApplicablePolicy?: string;
|
|
75958
|
+
|
|
75959
|
+
@Field({nullable: true, description: `How a group combines its children's scores: WeightedMean (default when NULL), Minimum (weakest child), or Maximum (strongest child). Groups only.`})
|
|
75960
|
+
@MaxLength(20)
|
|
75961
|
+
RollupMethod?: string;
|
|
75962
|
+
|
|
75963
|
+
@Field(() => Boolean, {nullable: true, description: `1 = an evaluation cannot be submitted without evidence for this criterion.`})
|
|
75964
|
+
EvidenceRequired?: boolean;
|
|
75965
|
+
|
|
75966
|
+
@Field(() => Boolean, {nullable: true, description: `1 = an evaluation cannot be submitted without a written rationale for this criterion.`})
|
|
75967
|
+
RationaleRequired?: boolean;
|
|
75968
|
+
|
|
75969
|
+
@Field(() => Int, {nullable: true, description: `Display order among siblings.`})
|
|
75970
|
+
Sequence?: number;
|
|
75971
|
+
|
|
75972
|
+
@Field({nullable: true, description: `JSON (IRubricCriterionEvaluatorConfig) of evaluator-specific settings, keyed by evaluator: e.g. a deterministic rule, or hints for AI judges. Changes are treated as scoring changes (major bump) because a deterministic rule decides the score.`})
|
|
75973
|
+
EvaluatorConfig?: string;
|
|
75974
|
+
|
|
75975
|
+
@Field()
|
|
75976
|
+
_mj__CreatedAt: Date;
|
|
75977
|
+
|
|
75978
|
+
@Field()
|
|
75979
|
+
_mj__UpdatedAt: Date;
|
|
75980
|
+
|
|
75981
|
+
@Field({nullable: true})
|
|
75982
|
+
@MaxLength(255)
|
|
75983
|
+
Parent?: string;
|
|
75984
|
+
|
|
75985
|
+
@Field({nullable: true})
|
|
75986
|
+
@MaxLength(255)
|
|
75987
|
+
Scale?: string;
|
|
75988
|
+
|
|
75989
|
+
@Field({nullable: true})
|
|
75990
|
+
@MaxLength(36)
|
|
75991
|
+
RootParentID?: string;
|
|
75992
|
+
|
|
75993
|
+
@Field(() => Int, {nullable: true})
|
|
75994
|
+
ParentIDDepth?: number;
|
|
75995
|
+
|
|
75996
|
+
@Field({nullable: true})
|
|
75997
|
+
ParentIDPath?: string;
|
|
75998
|
+
|
|
75999
|
+
@Field(() => Boolean, {nullable: true})
|
|
76000
|
+
ParentIDIsLeaf?: boolean;
|
|
76001
|
+
|
|
76002
|
+
@Field(() => Int, {nullable: true})
|
|
76003
|
+
ParentIDChildCount?: number;
|
|
76004
|
+
|
|
76005
|
+
@Field(() => [String], { nullable: true, description: `Field-level security: when non-null, the fields on this entity the calling user may read. Any other field arriving as null was withheld by the server rather than genuinely empty. Null for callers with no field restrictions.` })
|
|
76006
|
+
ReadableFields___?: string[];
|
|
76007
|
+
|
|
76008
|
+
}
|
|
76009
|
+
|
|
76010
|
+
//****************************************************************************
|
|
76011
|
+
// INPUT TYPE for MJ: Rubric Criteria
|
|
76012
|
+
//****************************************************************************
|
|
76013
|
+
@InputType()
|
|
76014
|
+
export class CreateMJRubricCriterionInput {
|
|
76015
|
+
@Field({ nullable: true })
|
|
76016
|
+
ID?: string;
|
|
76017
|
+
|
|
76018
|
+
@Field({ nullable: true })
|
|
76019
|
+
RubricVersionID?: string;
|
|
76020
|
+
|
|
76021
|
+
@Field({ nullable: true })
|
|
76022
|
+
ParentID: string | null;
|
|
76023
|
+
|
|
76024
|
+
@Field({ nullable: true })
|
|
76025
|
+
Key?: string;
|
|
76026
|
+
|
|
76027
|
+
@Field({ nullable: true })
|
|
76028
|
+
Name?: string;
|
|
76029
|
+
|
|
76030
|
+
@Field({ nullable: true })
|
|
76031
|
+
Description: string | null;
|
|
76032
|
+
|
|
76033
|
+
@Field({ nullable: true })
|
|
76034
|
+
Guidance: string | null;
|
|
76035
|
+
|
|
76036
|
+
@Field({ nullable: true })
|
|
76037
|
+
NodeType?: string;
|
|
76038
|
+
|
|
76039
|
+
@Field({ nullable: true })
|
|
76040
|
+
ScaleID: string | null;
|
|
76041
|
+
|
|
76042
|
+
@Field(() => Float, { nullable: true })
|
|
76043
|
+
Weight?: number;
|
|
76044
|
+
|
|
76045
|
+
@Field(() => Boolean, { nullable: true })
|
|
76046
|
+
IsAdvisory?: boolean;
|
|
76047
|
+
|
|
76048
|
+
@Field(() => Boolean, { nullable: true })
|
|
76049
|
+
IsGate?: boolean;
|
|
76050
|
+
|
|
76051
|
+
@Field(() => Float, { nullable: true })
|
|
76052
|
+
GateMinimumScore: number | null;
|
|
76053
|
+
|
|
76054
|
+
@Field({ nullable: true })
|
|
76055
|
+
NotApplicablePolicy: string | null;
|
|
76056
|
+
|
|
76057
|
+
@Field({ nullable: true })
|
|
76058
|
+
RollupMethod: string | null;
|
|
76059
|
+
|
|
76060
|
+
@Field(() => Boolean, { nullable: true })
|
|
76061
|
+
EvidenceRequired?: boolean;
|
|
76062
|
+
|
|
76063
|
+
@Field(() => Boolean, { nullable: true })
|
|
76064
|
+
RationaleRequired?: boolean;
|
|
76065
|
+
|
|
76066
|
+
@Field(() => Int, { nullable: true })
|
|
76067
|
+
Sequence?: number;
|
|
76068
|
+
|
|
76069
|
+
@Field({ nullable: true })
|
|
76070
|
+
EvaluatorConfig: string | null;
|
|
76071
|
+
|
|
76072
|
+
@Field(() => RestoreContextInput, { nullable: true })
|
|
76073
|
+
RestoreContext___?: RestoreContextInput;
|
|
76074
|
+
}
|
|
76075
|
+
|
|
76076
|
+
|
|
76077
|
+
//****************************************************************************
|
|
76078
|
+
// INPUT TYPE for MJ: Rubric Criteria
|
|
76079
|
+
//****************************************************************************
|
|
76080
|
+
@InputType()
|
|
76081
|
+
export class UpdateMJRubricCriterionInput {
|
|
76082
|
+
@Field()
|
|
76083
|
+
ID: string;
|
|
76084
|
+
|
|
76085
|
+
@Field({ nullable: true })
|
|
76086
|
+
RubricVersionID?: string;
|
|
76087
|
+
|
|
76088
|
+
@Field({ nullable: true })
|
|
76089
|
+
ParentID?: string | null;
|
|
76090
|
+
|
|
76091
|
+
@Field({ nullable: true })
|
|
76092
|
+
Key?: string;
|
|
76093
|
+
|
|
76094
|
+
@Field({ nullable: true })
|
|
76095
|
+
Name?: string;
|
|
76096
|
+
|
|
76097
|
+
@Field({ nullable: true })
|
|
76098
|
+
Description?: string | null;
|
|
76099
|
+
|
|
76100
|
+
@Field({ nullable: true })
|
|
76101
|
+
Guidance?: string | null;
|
|
76102
|
+
|
|
76103
|
+
@Field({ nullable: true })
|
|
76104
|
+
NodeType?: string;
|
|
76105
|
+
|
|
76106
|
+
@Field({ nullable: true })
|
|
76107
|
+
ScaleID?: string | null;
|
|
76108
|
+
|
|
76109
|
+
@Field(() => Float, { nullable: true })
|
|
76110
|
+
Weight?: number;
|
|
76111
|
+
|
|
76112
|
+
@Field(() => Boolean, { nullable: true })
|
|
76113
|
+
IsAdvisory?: boolean;
|
|
76114
|
+
|
|
76115
|
+
@Field(() => Boolean, { nullable: true })
|
|
76116
|
+
IsGate?: boolean;
|
|
76117
|
+
|
|
76118
|
+
@Field(() => Float, { nullable: true })
|
|
76119
|
+
GateMinimumScore?: number | null;
|
|
76120
|
+
|
|
76121
|
+
@Field({ nullable: true })
|
|
76122
|
+
NotApplicablePolicy?: string | null;
|
|
76123
|
+
|
|
76124
|
+
@Field({ nullable: true })
|
|
76125
|
+
RollupMethod?: string | null;
|
|
76126
|
+
|
|
76127
|
+
@Field(() => Boolean, { nullable: true })
|
|
76128
|
+
EvidenceRequired?: boolean;
|
|
76129
|
+
|
|
76130
|
+
@Field(() => Boolean, { nullable: true })
|
|
76131
|
+
RationaleRequired?: boolean;
|
|
76132
|
+
|
|
76133
|
+
@Field(() => Int, { nullable: true })
|
|
76134
|
+
Sequence?: number;
|
|
76135
|
+
|
|
76136
|
+
@Field({ nullable: true })
|
|
76137
|
+
EvaluatorConfig?: string | null;
|
|
76138
|
+
|
|
76139
|
+
@Field(() => [KeyValuePairInput], { nullable: true })
|
|
76140
|
+
OldValues___?: KeyValuePairInput[];
|
|
76141
|
+
|
|
76142
|
+
@Field(() => RestoreContextInput, { nullable: true })
|
|
76143
|
+
RestoreContext___?: RestoreContextInput;
|
|
76144
|
+
}
|
|
76145
|
+
|
|
76146
|
+
//****************************************************************************
|
|
76147
|
+
// RESOLVER for MJ: Rubric Criteria
|
|
76148
|
+
//****************************************************************************
|
|
76149
|
+
@ObjectType()
|
|
76150
|
+
export class RunMJRubricCriterionViewResult {
|
|
76151
|
+
@Field(() => [MJRubricCriterion_])
|
|
76152
|
+
Results: MJRubricCriterion_[];
|
|
76153
|
+
|
|
76154
|
+
@Field(() => String, {nullable: true})
|
|
76155
|
+
UserViewRunID?: string;
|
|
76156
|
+
|
|
76157
|
+
@Field(() => Int, {nullable: true})
|
|
76158
|
+
RowCount: number;
|
|
76159
|
+
|
|
76160
|
+
@Field(() => Int, {nullable: true})
|
|
76161
|
+
TotalRowCount: number;
|
|
76162
|
+
|
|
76163
|
+
@Field(() => Int, {nullable: true})
|
|
76164
|
+
ExecutionTime: number;
|
|
76165
|
+
|
|
76166
|
+
@Field({nullable: true})
|
|
76167
|
+
ErrorMessage?: string;
|
|
76168
|
+
|
|
76169
|
+
@Field(() => Boolean, {nullable: false})
|
|
76170
|
+
Success: boolean;
|
|
76171
|
+
}
|
|
76172
|
+
|
|
76173
|
+
@Resolver(MJRubricCriterion_)
|
|
76174
|
+
export class MJRubricCriterionResolver extends ResolverBase {
|
|
76175
|
+
@Query(() => RunMJRubricCriterionViewResult)
|
|
76176
|
+
async RunMJRubricCriterionViewByID(@Arg('input', () => RunViewByIDInput) input: RunViewByIDInput, @Ctx() { providers, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
76177
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
76178
|
+
return super.RunViewByIDGeneric(input, provider, userPayload, pubSub);
|
|
76179
|
+
}
|
|
76180
|
+
|
|
76181
|
+
@Query(() => RunMJRubricCriterionViewResult)
|
|
76182
|
+
async RunMJRubricCriterionViewByName(@Arg('input', () => RunViewByNameInput) input: RunViewByNameInput, @Ctx() { providers, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
76183
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
76184
|
+
return super.RunViewByNameGeneric(input, provider, userPayload, pubSub);
|
|
76185
|
+
}
|
|
76186
|
+
|
|
76187
|
+
@Query(() => RunMJRubricCriterionViewResult)
|
|
76188
|
+
async RunMJRubricCriterionDynamicView(@Arg('input', () => RunDynamicViewInput) input: RunDynamicViewInput, @Ctx() { providers, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
76189
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
76190
|
+
input.EntityName = 'MJ: Rubric Criteria';
|
|
76191
|
+
return super.RunDynamicViewGeneric(input, provider, userPayload, pubSub);
|
|
76192
|
+
}
|
|
76193
|
+
@Query(() => MJRubricCriterion_, { nullable: true })
|
|
76194
|
+
async MJRubricCriterion(@Arg('ID', () => String) ID: string, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine): Promise<MJRubricCriterion_ | null> {
|
|
76195
|
+
this.CheckUserReadPermissions('MJ: Rubric Criteria', userPayload);
|
|
76196
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
76197
|
+
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwRubricCriteria')} WHERE ${provider.QuoteIdentifier('ID')}=${provider.BuildParameterPlaceholder(0)} ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: Rubric Criteria', userPayload, EntityPermissionType.Read, 'AND');
|
|
76198
|
+
const rows = await provider.ExecuteSQL(sSQL, [ID], undefined, this.GetUserFromPayload(userPayload));
|
|
76199
|
+
const result = await this.MapFieldNamesToCodeNames('MJ: Rubric Criteria', rows && rows.length > 0 ? rows[0] : null, this.GetUserFromPayload(userPayload));
|
|
76200
|
+
return result;
|
|
76201
|
+
}
|
|
76202
|
+
|
|
76203
|
+
@Mutation(() => MJRubricCriterion_)
|
|
76204
|
+
async CreateMJRubricCriterion(
|
|
76205
|
+
@Arg('input', () => CreateMJRubricCriterionInput) input: CreateMJRubricCriterionInput,
|
|
76206
|
+
@Ctx() { providers, userPayload }: AppContext,
|
|
76207
|
+
@PubSub() pubSub: PubSubEngine
|
|
76208
|
+
) {
|
|
76209
|
+
const provider = GetReadWriteProvider(providers);
|
|
76210
|
+
return this.CreateRecord('MJ: Rubric Criteria', input, provider, userPayload, pubSub)
|
|
76211
|
+
}
|
|
76212
|
+
|
|
76213
|
+
@Mutation(() => MJRubricCriterion_)
|
|
76214
|
+
async UpdateMJRubricCriterion(
|
|
76215
|
+
@Arg('input', () => UpdateMJRubricCriterionInput) input: UpdateMJRubricCriterionInput,
|
|
76216
|
+
@Ctx() { providers, userPayload }: AppContext,
|
|
76217
|
+
@PubSub() pubSub: PubSubEngine
|
|
76218
|
+
) {
|
|
76219
|
+
const provider = GetReadWriteProvider(providers);
|
|
76220
|
+
return this.UpdateRecord('MJ: Rubric Criteria', input, provider, userPayload, pubSub);
|
|
76221
|
+
}
|
|
76222
|
+
|
|
76223
|
+
@Mutation(() => MJRubricCriterion_)
|
|
76224
|
+
async DeleteMJRubricCriterion(@Arg('ID', () => String) ID: string, @Arg('options___', () => DeleteOptionsInput) options: DeleteOptionsInput, @Ctx() { providers, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
76225
|
+
const provider = GetReadWriteProvider(providers);
|
|
76226
|
+
const key = new CompositeKey([{FieldName: 'ID', Value: ID}]);
|
|
76227
|
+
return this.DeleteRecord('MJ: Rubric Criteria', key, options, provider, userPayload, pubSub);
|
|
76228
|
+
}
|
|
76229
|
+
|
|
76230
|
+
}
|
|
76231
|
+
|
|
76232
|
+
//****************************************************************************
|
|
76233
|
+
// ENTITY CLASS for MJ: Rubric Criterion Levels
|
|
76234
|
+
//****************************************************************************
|
|
76235
|
+
@ObjectType({ description: `Criterion-specific anchor text: what a given level (or numeric value) looks like for THIS criterion, e.g. what "4 - Strong" means for Methodology.` })
|
|
76236
|
+
export class MJRubricCriterionLevel_ {
|
|
76237
|
+
@Field()
|
|
76238
|
+
@MaxLength(36)
|
|
76239
|
+
ID: string;
|
|
76240
|
+
|
|
76241
|
+
@Field({nullable: true})
|
|
76242
|
+
@MaxLength(36)
|
|
76243
|
+
CriterionID?: string;
|
|
76244
|
+
|
|
76245
|
+
@Field({nullable: true, description: `The Levels-scale level this anchor describes. Exactly one of ScaleLevelID and AnchorValue is set.`})
|
|
76246
|
+
@MaxLength(36)
|
|
76247
|
+
ScaleLevelID?: string;
|
|
76248
|
+
|
|
76249
|
+
@Field(() => Float, {nullable: true, description: `For a Numeric scale: the value this anchor describes (e.g. 0, 50, 100).`})
|
|
76250
|
+
AnchorValue?: number;
|
|
76251
|
+
|
|
76252
|
+
@Field({nullable: true, description: `The anchor text shown to evaluators and given to AI judges.`})
|
|
76253
|
+
Descriptor?: string;
|
|
76254
|
+
|
|
76255
|
+
@Field()
|
|
76256
|
+
_mj__CreatedAt: Date;
|
|
76257
|
+
|
|
76258
|
+
@Field()
|
|
76259
|
+
_mj__UpdatedAt: Date;
|
|
76260
|
+
|
|
76261
|
+
@Field({nullable: true})
|
|
76262
|
+
@MaxLength(255)
|
|
76263
|
+
Criterion?: string;
|
|
76264
|
+
|
|
76265
|
+
@Field({nullable: true})
|
|
76266
|
+
@MaxLength(100)
|
|
76267
|
+
ScaleLevel?: string;
|
|
76268
|
+
|
|
76269
|
+
@Field(() => [String], { nullable: true, description: `Field-level security: when non-null, the fields on this entity the calling user may read. Any other field arriving as null was withheld by the server rather than genuinely empty. Null for callers with no field restrictions.` })
|
|
76270
|
+
ReadableFields___?: string[];
|
|
76271
|
+
|
|
76272
|
+
}
|
|
76273
|
+
|
|
76274
|
+
//****************************************************************************
|
|
76275
|
+
// INPUT TYPE for MJ: Rubric Criterion Levels
|
|
76276
|
+
//****************************************************************************
|
|
76277
|
+
@InputType()
|
|
76278
|
+
export class CreateMJRubricCriterionLevelInput {
|
|
76279
|
+
@Field({ nullable: true })
|
|
76280
|
+
ID?: string;
|
|
76281
|
+
|
|
76282
|
+
@Field({ nullable: true })
|
|
76283
|
+
CriterionID?: string;
|
|
76284
|
+
|
|
76285
|
+
@Field({ nullable: true })
|
|
76286
|
+
ScaleLevelID: string | null;
|
|
76287
|
+
|
|
76288
|
+
@Field(() => Float, { nullable: true })
|
|
76289
|
+
AnchorValue: number | null;
|
|
76290
|
+
|
|
76291
|
+
@Field({ nullable: true })
|
|
76292
|
+
Descriptor?: string;
|
|
76293
|
+
|
|
76294
|
+
@Field(() => RestoreContextInput, { nullable: true })
|
|
76295
|
+
RestoreContext___?: RestoreContextInput;
|
|
76296
|
+
}
|
|
76297
|
+
|
|
76298
|
+
|
|
76299
|
+
//****************************************************************************
|
|
76300
|
+
// INPUT TYPE for MJ: Rubric Criterion Levels
|
|
76301
|
+
//****************************************************************************
|
|
76302
|
+
@InputType()
|
|
76303
|
+
export class UpdateMJRubricCriterionLevelInput {
|
|
76304
|
+
@Field()
|
|
76305
|
+
ID: string;
|
|
76306
|
+
|
|
76307
|
+
@Field({ nullable: true })
|
|
76308
|
+
CriterionID?: string;
|
|
76309
|
+
|
|
76310
|
+
@Field({ nullable: true })
|
|
76311
|
+
ScaleLevelID?: string | null;
|
|
76312
|
+
|
|
76313
|
+
@Field(() => Float, { nullable: true })
|
|
76314
|
+
AnchorValue?: number | null;
|
|
76315
|
+
|
|
76316
|
+
@Field({ nullable: true })
|
|
76317
|
+
Descriptor?: string;
|
|
76318
|
+
|
|
76319
|
+
@Field(() => [KeyValuePairInput], { nullable: true })
|
|
76320
|
+
OldValues___?: KeyValuePairInput[];
|
|
76321
|
+
|
|
76322
|
+
@Field(() => RestoreContextInput, { nullable: true })
|
|
76323
|
+
RestoreContext___?: RestoreContextInput;
|
|
76324
|
+
}
|
|
76325
|
+
|
|
76326
|
+
//****************************************************************************
|
|
76327
|
+
// RESOLVER for MJ: Rubric Criterion Levels
|
|
76328
|
+
//****************************************************************************
|
|
76329
|
+
@ObjectType()
|
|
76330
|
+
export class RunMJRubricCriterionLevelViewResult {
|
|
76331
|
+
@Field(() => [MJRubricCriterionLevel_])
|
|
76332
|
+
Results: MJRubricCriterionLevel_[];
|
|
76333
|
+
|
|
76334
|
+
@Field(() => String, {nullable: true})
|
|
76335
|
+
UserViewRunID?: string;
|
|
76336
|
+
|
|
76337
|
+
@Field(() => Int, {nullable: true})
|
|
76338
|
+
RowCount: number;
|
|
76339
|
+
|
|
76340
|
+
@Field(() => Int, {nullable: true})
|
|
76341
|
+
TotalRowCount: number;
|
|
76342
|
+
|
|
76343
|
+
@Field(() => Int, {nullable: true})
|
|
76344
|
+
ExecutionTime: number;
|
|
76345
|
+
|
|
76346
|
+
@Field({nullable: true})
|
|
76347
|
+
ErrorMessage?: string;
|
|
76348
|
+
|
|
76349
|
+
@Field(() => Boolean, {nullable: false})
|
|
76350
|
+
Success: boolean;
|
|
76351
|
+
}
|
|
76352
|
+
|
|
76353
|
+
@Resolver(MJRubricCriterionLevel_)
|
|
76354
|
+
export class MJRubricCriterionLevelResolver extends ResolverBase {
|
|
76355
|
+
@Query(() => RunMJRubricCriterionLevelViewResult)
|
|
76356
|
+
async RunMJRubricCriterionLevelViewByID(@Arg('input', () => RunViewByIDInput) input: RunViewByIDInput, @Ctx() { providers, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
76357
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
76358
|
+
return super.RunViewByIDGeneric(input, provider, userPayload, pubSub);
|
|
76359
|
+
}
|
|
76360
|
+
|
|
76361
|
+
@Query(() => RunMJRubricCriterionLevelViewResult)
|
|
76362
|
+
async RunMJRubricCriterionLevelViewByName(@Arg('input', () => RunViewByNameInput) input: RunViewByNameInput, @Ctx() { providers, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
76363
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
76364
|
+
return super.RunViewByNameGeneric(input, provider, userPayload, pubSub);
|
|
76365
|
+
}
|
|
76366
|
+
|
|
76367
|
+
@Query(() => RunMJRubricCriterionLevelViewResult)
|
|
76368
|
+
async RunMJRubricCriterionLevelDynamicView(@Arg('input', () => RunDynamicViewInput) input: RunDynamicViewInput, @Ctx() { providers, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
76369
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
76370
|
+
input.EntityName = 'MJ: Rubric Criterion Levels';
|
|
76371
|
+
return super.RunDynamicViewGeneric(input, provider, userPayload, pubSub);
|
|
76372
|
+
}
|
|
76373
|
+
@Query(() => MJRubricCriterionLevel_, { nullable: true })
|
|
76374
|
+
async MJRubricCriterionLevel(@Arg('ID', () => String) ID: string, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine): Promise<MJRubricCriterionLevel_ | null> {
|
|
76375
|
+
this.CheckUserReadPermissions('MJ: Rubric Criterion Levels', userPayload);
|
|
76376
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
76377
|
+
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwRubricCriterionLevels')} WHERE ${provider.QuoteIdentifier('ID')}=${provider.BuildParameterPlaceholder(0)} ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: Rubric Criterion Levels', userPayload, EntityPermissionType.Read, 'AND');
|
|
76378
|
+
const rows = await provider.ExecuteSQL(sSQL, [ID], undefined, this.GetUserFromPayload(userPayload));
|
|
76379
|
+
const result = await this.MapFieldNamesToCodeNames('MJ: Rubric Criterion Levels', rows && rows.length > 0 ? rows[0] : null, this.GetUserFromPayload(userPayload));
|
|
76380
|
+
return result;
|
|
76381
|
+
}
|
|
76382
|
+
|
|
76383
|
+
@Mutation(() => MJRubricCriterionLevel_)
|
|
76384
|
+
async CreateMJRubricCriterionLevel(
|
|
76385
|
+
@Arg('input', () => CreateMJRubricCriterionLevelInput) input: CreateMJRubricCriterionLevelInput,
|
|
76386
|
+
@Ctx() { providers, userPayload }: AppContext,
|
|
76387
|
+
@PubSub() pubSub: PubSubEngine
|
|
76388
|
+
) {
|
|
76389
|
+
const provider = GetReadWriteProvider(providers);
|
|
76390
|
+
return this.CreateRecord('MJ: Rubric Criterion Levels', input, provider, userPayload, pubSub)
|
|
76391
|
+
}
|
|
76392
|
+
|
|
76393
|
+
@Mutation(() => MJRubricCriterionLevel_)
|
|
76394
|
+
async UpdateMJRubricCriterionLevel(
|
|
76395
|
+
@Arg('input', () => UpdateMJRubricCriterionLevelInput) input: UpdateMJRubricCriterionLevelInput,
|
|
76396
|
+
@Ctx() { providers, userPayload }: AppContext,
|
|
76397
|
+
@PubSub() pubSub: PubSubEngine
|
|
76398
|
+
) {
|
|
76399
|
+
const provider = GetReadWriteProvider(providers);
|
|
76400
|
+
return this.UpdateRecord('MJ: Rubric Criterion Levels', input, provider, userPayload, pubSub);
|
|
76401
|
+
}
|
|
76402
|
+
|
|
76403
|
+
@Mutation(() => MJRubricCriterionLevel_)
|
|
76404
|
+
async DeleteMJRubricCriterionLevel(@Arg('ID', () => String) ID: string, @Arg('options___', () => DeleteOptionsInput) options: DeleteOptionsInput, @Ctx() { providers, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
76405
|
+
const provider = GetReadWriteProvider(providers);
|
|
76406
|
+
const key = new CompositeKey([{FieldName: 'ID', Value: ID}]);
|
|
76407
|
+
return this.DeleteRecord('MJ: Rubric Criterion Levels', key, options, provider, userPayload, pubSub);
|
|
76408
|
+
}
|
|
76409
|
+
|
|
76410
|
+
}
|
|
76411
|
+
|
|
76412
|
+
//****************************************************************************
|
|
76413
|
+
// ENTITY CLASS for MJ: Rubric Evaluation Scores
|
|
76414
|
+
//****************************************************************************
|
|
76415
|
+
@ObjectType({ description: `One node of one evaluation: an evaluator\'s answer to a criterion, or (IsComputed = 1) a group\'s computed rollup. Writable only while the evaluation is a Draft.` })
|
|
76416
|
+
export class MJRubricEvaluationScore_ {
|
|
76417
|
+
@Field()
|
|
76418
|
+
@MaxLength(36)
|
|
76419
|
+
ID: string;
|
|
76420
|
+
|
|
76421
|
+
@Field({nullable: true})
|
|
76422
|
+
@MaxLength(36)
|
|
76423
|
+
EvaluationID?: string;
|
|
76424
|
+
|
|
76425
|
+
@Field({nullable: true})
|
|
76426
|
+
@MaxLength(36)
|
|
76427
|
+
CriterionID?: string;
|
|
76428
|
+
|
|
76429
|
+
@Field({nullable: true, description: `The level chosen, for a criterion on a Levels scale.`})
|
|
76430
|
+
@MaxLength(36)
|
|
76431
|
+
ScaleLevelID?: string;
|
|
76432
|
+
|
|
76433
|
+
@Field(() => Float, {nullable: true, description: `The number entered, for a criterion on a Numeric scale.`})
|
|
76434
|
+
RawValue?: number;
|
|
76435
|
+
|
|
76436
|
+
@Field(() => Boolean, {nullable: true, description: `1 = the evaluator judged this criterion not applicable to the subject; handled per the effective NotApplicablePolicy.`})
|
|
76437
|
+
IsNotApplicable?: boolean;
|
|
76438
|
+
|
|
76439
|
+
@Field(() => Boolean, {nullable: true, description: `1 = a group rollup written by the server at submit, not an evaluator's answer.`})
|
|
76440
|
+
IsComputed?: boolean;
|
|
76441
|
+
|
|
76442
|
+
@Field(() => Float, {nullable: true, description: `The node's score on the 0..1 scale: the answer normalized through its scale, or the group rollup.`})
|
|
76443
|
+
NormalizedScore?: number;
|
|
76444
|
+
|
|
76445
|
+
@Field(() => Float, {nullable: true, description: `The node's share of its parent (0..1) after Not Applicable redistribution.`})
|
|
76446
|
+
EffectiveWeight?: number;
|
|
76447
|
+
|
|
76448
|
+
@Field(() => Float, {nullable: true, description: `Points this node contributed to the evaluation's overall NormalizedScore (its score times the product of effective weights to the root). Leaves' contributions sum to the overall score under weighted-mean rollups.`})
|
|
76449
|
+
OverallContribution?: number;
|
|
76450
|
+
|
|
76451
|
+
@Field(() => Boolean, {nullable: true, description: `1 = this node is a gate and scored below its GateMinimumScore.`})
|
|
76452
|
+
GateFailed?: boolean;
|
|
76453
|
+
|
|
76454
|
+
@Field(() => Float, {nullable: true, description: `For group rows: share (0..1) of applicable descendant criteria that were scored.`})
|
|
76455
|
+
Completeness?: number;
|
|
76456
|
+
|
|
76457
|
+
@Field(() => Float, {nullable: true, description: `Evaluator's confidence in this answer (0..1), e.g. from an AI judge's level probabilities. Low confidence can route the criterion to a human.`})
|
|
76458
|
+
Confidence?: number;
|
|
76459
|
+
|
|
76460
|
+
@Field({nullable: true, description: `The evaluator's reasoning for this answer.`})
|
|
76461
|
+
Rationale?: string;
|
|
76462
|
+
|
|
76463
|
+
@Field({nullable: true, description: `JSON array (IRubricEvidence[]) of evidence items: quotes with spans, conversation turns, file references, URLs, record references.`})
|
|
76464
|
+
Evidence?: string;
|
|
76465
|
+
|
|
76466
|
+
@Field()
|
|
76467
|
+
_mj__CreatedAt: Date;
|
|
76468
|
+
|
|
76469
|
+
@Field()
|
|
76470
|
+
_mj__UpdatedAt: Date;
|
|
76471
|
+
|
|
76472
|
+
@Field({nullable: true})
|
|
76473
|
+
@MaxLength(255)
|
|
76474
|
+
Criterion?: string;
|
|
76475
|
+
|
|
76476
|
+
@Field({nullable: true})
|
|
76477
|
+
@MaxLength(100)
|
|
76478
|
+
ScaleLevel?: string;
|
|
76479
|
+
|
|
76480
|
+
@Field({nullable: true})
|
|
76481
|
+
@MaxLength(100)
|
|
76482
|
+
CriterionKey?: string;
|
|
76483
|
+
|
|
76484
|
+
@Field({nullable: true})
|
|
76485
|
+
@MaxLength(20)
|
|
76486
|
+
CriterionNodeType?: string;
|
|
76487
|
+
|
|
76488
|
+
@Field({nullable: true})
|
|
76489
|
+
@MaxLength(36)
|
|
76490
|
+
CriterionParentID?: string;
|
|
76491
|
+
|
|
76492
|
+
@Field({nullable: true})
|
|
76493
|
+
@MaxLength(20)
|
|
76494
|
+
EvaluationStatus?: string;
|
|
76495
|
+
|
|
76496
|
+
@Field({nullable: true})
|
|
76497
|
+
@MaxLength(20)
|
|
76498
|
+
EvaluatorType?: string;
|
|
76499
|
+
|
|
76500
|
+
@Field({nullable: true})
|
|
76501
|
+
@MaxLength(36)
|
|
76502
|
+
EvaluatorUserID?: string;
|
|
76503
|
+
|
|
76504
|
+
@Field({nullable: true})
|
|
76505
|
+
@MaxLength(36)
|
|
76506
|
+
SubjectEntityID?: string;
|
|
76507
|
+
|
|
76508
|
+
@Field({nullable: true})
|
|
76509
|
+
@MaxLength(450)
|
|
76510
|
+
SubjectRecordID?: string;
|
|
76511
|
+
|
|
76512
|
+
@Field({nullable: true})
|
|
76513
|
+
@MaxLength(36)
|
|
76514
|
+
ContextEntityID?: string;
|
|
76515
|
+
|
|
76516
|
+
@Field({nullable: true})
|
|
76517
|
+
@MaxLength(450)
|
|
76518
|
+
ContextRecordID?: string;
|
|
76519
|
+
|
|
76520
|
+
@Field({nullable: true})
|
|
76521
|
+
@MaxLength(36)
|
|
76522
|
+
RubricID?: string;
|
|
76523
|
+
|
|
76524
|
+
@Field(() => Int, {nullable: true})
|
|
76525
|
+
RubricMajorVersion?: number;
|
|
76526
|
+
|
|
76527
|
+
@Field(() => Int, {nullable: true})
|
|
76528
|
+
CriterionCohortCount?: number;
|
|
76529
|
+
|
|
76530
|
+
@Field(() => Float, {nullable: true})
|
|
76531
|
+
CriterionCohortMeanScore?: number;
|
|
76532
|
+
|
|
76533
|
+
@Field(() => Float, {nullable: true})
|
|
76534
|
+
CriterionCohortMinScore?: number;
|
|
76535
|
+
|
|
76536
|
+
@Field(() => Float, {nullable: true})
|
|
76537
|
+
CriterionCohortMaxScore?: number;
|
|
76538
|
+
|
|
76539
|
+
@Field(() => Float, {nullable: true})
|
|
76540
|
+
CriterionCohortScoreStdDev?: number;
|
|
76541
|
+
|
|
76542
|
+
@Field(() => Float, {nullable: true})
|
|
76543
|
+
CriterionCohortHumanMeanScore?: number;
|
|
76544
|
+
|
|
76545
|
+
@Field(() => Float, {nullable: true})
|
|
76546
|
+
CriterionCohortAIMeanScore?: number;
|
|
76547
|
+
|
|
76548
|
+
@Field(() => [String], { nullable: true, description: `Field-level security: when non-null, the fields on this entity the calling user may read. Any other field arriving as null was withheld by the server rather than genuinely empty. Null for callers with no field restrictions.` })
|
|
76549
|
+
ReadableFields___?: string[];
|
|
76550
|
+
|
|
76551
|
+
}
|
|
76552
|
+
|
|
76553
|
+
//****************************************************************************
|
|
76554
|
+
// INPUT TYPE for MJ: Rubric Evaluation Scores
|
|
76555
|
+
//****************************************************************************
|
|
76556
|
+
@InputType()
|
|
76557
|
+
export class CreateMJRubricEvaluationScoreInput {
|
|
76558
|
+
@Field({ nullable: true })
|
|
76559
|
+
ID?: string;
|
|
76560
|
+
|
|
76561
|
+
@Field({ nullable: true })
|
|
76562
|
+
EvaluationID?: string;
|
|
76563
|
+
|
|
76564
|
+
@Field({ nullable: true })
|
|
76565
|
+
CriterionID?: string;
|
|
76566
|
+
|
|
76567
|
+
@Field({ nullable: true })
|
|
76568
|
+
ScaleLevelID: string | null;
|
|
76569
|
+
|
|
76570
|
+
@Field(() => Float, { nullable: true })
|
|
76571
|
+
RawValue: number | null;
|
|
76572
|
+
|
|
76573
|
+
@Field(() => Boolean, { nullable: true })
|
|
76574
|
+
IsNotApplicable?: boolean;
|
|
76575
|
+
|
|
76576
|
+
@Field(() => Boolean, { nullable: true })
|
|
76577
|
+
IsComputed?: boolean;
|
|
76578
|
+
|
|
76579
|
+
@Field(() => Float, { nullable: true })
|
|
76580
|
+
NormalizedScore: number | null;
|
|
76581
|
+
|
|
76582
|
+
@Field(() => Float, { nullable: true })
|
|
76583
|
+
EffectiveWeight: number | null;
|
|
76584
|
+
|
|
76585
|
+
@Field(() => Float, { nullable: true })
|
|
76586
|
+
OverallContribution: number | null;
|
|
76587
|
+
|
|
76588
|
+
@Field(() => Boolean, { nullable: true })
|
|
76589
|
+
GateFailed?: boolean;
|
|
76590
|
+
|
|
76591
|
+
@Field(() => Float, { nullable: true })
|
|
76592
|
+
Completeness: number | null;
|
|
76593
|
+
|
|
76594
|
+
@Field(() => Float, { nullable: true })
|
|
76595
|
+
Confidence: number | null;
|
|
76596
|
+
|
|
76597
|
+
@Field({ nullable: true })
|
|
76598
|
+
Rationale: string | null;
|
|
76599
|
+
|
|
76600
|
+
@Field({ nullable: true })
|
|
76601
|
+
Evidence: string | null;
|
|
76602
|
+
|
|
76603
|
+
@Field(() => RestoreContextInput, { nullable: true })
|
|
76604
|
+
RestoreContext___?: RestoreContextInput;
|
|
76605
|
+
}
|
|
76606
|
+
|
|
76607
|
+
|
|
76608
|
+
//****************************************************************************
|
|
76609
|
+
// INPUT TYPE for MJ: Rubric Evaluation Scores
|
|
76610
|
+
//****************************************************************************
|
|
76611
|
+
@InputType()
|
|
76612
|
+
export class UpdateMJRubricEvaluationScoreInput {
|
|
76613
|
+
@Field()
|
|
76614
|
+
ID: string;
|
|
76615
|
+
|
|
76616
|
+
@Field({ nullable: true })
|
|
76617
|
+
EvaluationID?: string;
|
|
76618
|
+
|
|
76619
|
+
@Field({ nullable: true })
|
|
76620
|
+
CriterionID?: string;
|
|
76621
|
+
|
|
76622
|
+
@Field({ nullable: true })
|
|
76623
|
+
ScaleLevelID?: string | null;
|
|
76624
|
+
|
|
76625
|
+
@Field(() => Float, { nullable: true })
|
|
76626
|
+
RawValue?: number | null;
|
|
76627
|
+
|
|
76628
|
+
@Field(() => Boolean, { nullable: true })
|
|
76629
|
+
IsNotApplicable?: boolean;
|
|
76630
|
+
|
|
76631
|
+
@Field(() => Boolean, { nullable: true })
|
|
76632
|
+
IsComputed?: boolean;
|
|
76633
|
+
|
|
76634
|
+
@Field(() => Float, { nullable: true })
|
|
76635
|
+
NormalizedScore?: number | null;
|
|
76636
|
+
|
|
76637
|
+
@Field(() => Float, { nullable: true })
|
|
76638
|
+
EffectiveWeight?: number | null;
|
|
76639
|
+
|
|
76640
|
+
@Field(() => Float, { nullable: true })
|
|
76641
|
+
OverallContribution?: number | null;
|
|
76642
|
+
|
|
76643
|
+
@Field(() => Boolean, { nullable: true })
|
|
76644
|
+
GateFailed?: boolean;
|
|
76645
|
+
|
|
76646
|
+
@Field(() => Float, { nullable: true })
|
|
76647
|
+
Completeness?: number | null;
|
|
76648
|
+
|
|
76649
|
+
@Field(() => Float, { nullable: true })
|
|
76650
|
+
Confidence?: number | null;
|
|
76651
|
+
|
|
76652
|
+
@Field({ nullable: true })
|
|
76653
|
+
Rationale?: string | null;
|
|
76654
|
+
|
|
76655
|
+
@Field({ nullable: true })
|
|
76656
|
+
Evidence?: string | null;
|
|
76657
|
+
|
|
76658
|
+
@Field(() => [KeyValuePairInput], { nullable: true })
|
|
76659
|
+
OldValues___?: KeyValuePairInput[];
|
|
76660
|
+
|
|
76661
|
+
@Field(() => RestoreContextInput, { nullable: true })
|
|
76662
|
+
RestoreContext___?: RestoreContextInput;
|
|
76663
|
+
}
|
|
76664
|
+
|
|
76665
|
+
//****************************************************************************
|
|
76666
|
+
// RESOLVER for MJ: Rubric Evaluation Scores
|
|
76667
|
+
//****************************************************************************
|
|
76668
|
+
@ObjectType()
|
|
76669
|
+
export class RunMJRubricEvaluationScoreViewResult {
|
|
76670
|
+
@Field(() => [MJRubricEvaluationScore_])
|
|
76671
|
+
Results: MJRubricEvaluationScore_[];
|
|
76672
|
+
|
|
76673
|
+
@Field(() => String, {nullable: true})
|
|
76674
|
+
UserViewRunID?: string;
|
|
76675
|
+
|
|
76676
|
+
@Field(() => Int, {nullable: true})
|
|
76677
|
+
RowCount: number;
|
|
76678
|
+
|
|
76679
|
+
@Field(() => Int, {nullable: true})
|
|
76680
|
+
TotalRowCount: number;
|
|
76681
|
+
|
|
76682
|
+
@Field(() => Int, {nullable: true})
|
|
76683
|
+
ExecutionTime: number;
|
|
76684
|
+
|
|
76685
|
+
@Field({nullable: true})
|
|
76686
|
+
ErrorMessage?: string;
|
|
76687
|
+
|
|
76688
|
+
@Field(() => Boolean, {nullable: false})
|
|
76689
|
+
Success: boolean;
|
|
76690
|
+
}
|
|
76691
|
+
|
|
76692
|
+
@Resolver(MJRubricEvaluationScore_)
|
|
76693
|
+
export class MJRubricEvaluationScoreResolver extends ResolverBase {
|
|
76694
|
+
@Query(() => RunMJRubricEvaluationScoreViewResult)
|
|
76695
|
+
async RunMJRubricEvaluationScoreViewByID(@Arg('input', () => RunViewByIDInput) input: RunViewByIDInput, @Ctx() { providers, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
76696
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
76697
|
+
return super.RunViewByIDGeneric(input, provider, userPayload, pubSub);
|
|
76698
|
+
}
|
|
76699
|
+
|
|
76700
|
+
@Query(() => RunMJRubricEvaluationScoreViewResult)
|
|
76701
|
+
async RunMJRubricEvaluationScoreViewByName(@Arg('input', () => RunViewByNameInput) input: RunViewByNameInput, @Ctx() { providers, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
76702
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
76703
|
+
return super.RunViewByNameGeneric(input, provider, userPayload, pubSub);
|
|
76704
|
+
}
|
|
76705
|
+
|
|
76706
|
+
@Query(() => RunMJRubricEvaluationScoreViewResult)
|
|
76707
|
+
async RunMJRubricEvaluationScoreDynamicView(@Arg('input', () => RunDynamicViewInput) input: RunDynamicViewInput, @Ctx() { providers, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
76708
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
76709
|
+
input.EntityName = 'MJ: Rubric Evaluation Scores';
|
|
76710
|
+
return super.RunDynamicViewGeneric(input, provider, userPayload, pubSub);
|
|
76711
|
+
}
|
|
76712
|
+
@Query(() => MJRubricEvaluationScore_, { nullable: true })
|
|
76713
|
+
async MJRubricEvaluationScore(@Arg('ID', () => String) ID: string, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine): Promise<MJRubricEvaluationScore_ | null> {
|
|
76714
|
+
this.CheckUserReadPermissions('MJ: Rubric Evaluation Scores', userPayload);
|
|
76715
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
76716
|
+
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwRubricEvaluationScores')} WHERE ${provider.QuoteIdentifier('ID')}=${provider.BuildParameterPlaceholder(0)} ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: Rubric Evaluation Scores', userPayload, EntityPermissionType.Read, 'AND');
|
|
76717
|
+
const rows = await provider.ExecuteSQL(sSQL, [ID], undefined, this.GetUserFromPayload(userPayload));
|
|
76718
|
+
const result = await this.MapFieldNamesToCodeNames('MJ: Rubric Evaluation Scores', rows && rows.length > 0 ? rows[0] : null, this.GetUserFromPayload(userPayload));
|
|
76719
|
+
return result;
|
|
76720
|
+
}
|
|
76721
|
+
|
|
76722
|
+
@Mutation(() => MJRubricEvaluationScore_)
|
|
76723
|
+
async CreateMJRubricEvaluationScore(
|
|
76724
|
+
@Arg('input', () => CreateMJRubricEvaluationScoreInput) input: CreateMJRubricEvaluationScoreInput,
|
|
76725
|
+
@Ctx() { providers, userPayload }: AppContext,
|
|
76726
|
+
@PubSub() pubSub: PubSubEngine
|
|
76727
|
+
) {
|
|
76728
|
+
const provider = GetReadWriteProvider(providers);
|
|
76729
|
+
return this.CreateRecord('MJ: Rubric Evaluation Scores', input, provider, userPayload, pubSub)
|
|
76730
|
+
}
|
|
76731
|
+
|
|
76732
|
+
@Mutation(() => MJRubricEvaluationScore_)
|
|
76733
|
+
async UpdateMJRubricEvaluationScore(
|
|
76734
|
+
@Arg('input', () => UpdateMJRubricEvaluationScoreInput) input: UpdateMJRubricEvaluationScoreInput,
|
|
76735
|
+
@Ctx() { providers, userPayload }: AppContext,
|
|
76736
|
+
@PubSub() pubSub: PubSubEngine
|
|
76737
|
+
) {
|
|
76738
|
+
const provider = GetReadWriteProvider(providers);
|
|
76739
|
+
return this.UpdateRecord('MJ: Rubric Evaluation Scores', input, provider, userPayload, pubSub);
|
|
76740
|
+
}
|
|
76741
|
+
|
|
76742
|
+
@Mutation(() => MJRubricEvaluationScore_)
|
|
76743
|
+
async DeleteMJRubricEvaluationScore(@Arg('ID', () => String) ID: string, @Arg('options___', () => DeleteOptionsInput) options: DeleteOptionsInput, @Ctx() { providers, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
76744
|
+
const provider = GetReadWriteProvider(providers);
|
|
76745
|
+
const key = new CompositeKey([{FieldName: 'ID', Value: ID}]);
|
|
76746
|
+
return this.DeleteRecord('MJ: Rubric Evaluation Scores', key, options, provider, userPayload, pubSub);
|
|
76747
|
+
}
|
|
76748
|
+
|
|
76749
|
+
}
|
|
76750
|
+
|
|
76751
|
+
//****************************************************************************
|
|
76752
|
+
// ENTITY CLASS for MJ: Rubric Evaluations
|
|
76753
|
+
//****************************************************************************
|
|
76754
|
+
@ObjectType({ description: `One evaluator\'s judgment of one record (the subject) against one pinned rubric version. Editable while Draft; on submit the server computes and stores the result once, after which the row is immutable. Several evaluations of the same subject in the same context form a cohort whose consensus is exposed by the base view.` })
|
|
76755
|
+
export class MJRubricEvaluation_ {
|
|
76756
|
+
@Field()
|
|
76757
|
+
@MaxLength(36)
|
|
76758
|
+
ID: string;
|
|
76759
|
+
|
|
76760
|
+
@Field({nullable: true})
|
|
76761
|
+
@MaxLength(36)
|
|
76762
|
+
RubricVersionID?: string;
|
|
76763
|
+
|
|
76764
|
+
@Field({nullable: true, description: `The entity of the record being evaluated (a test run, an agent run, a submission, a vendor response, ...).`})
|
|
76765
|
+
@MaxLength(36)
|
|
76766
|
+
SubjectEntityID?: string;
|
|
76767
|
+
|
|
76768
|
+
@Field({nullable: true, description: `Primary key of the record being evaluated, in MemberJunction's composite-key string form.`})
|
|
76769
|
+
@MaxLength(450)
|
|
76770
|
+
SubjectRecordID?: string;
|
|
76771
|
+
|
|
76772
|
+
@Field({nullable: true, description: `Optional entity of the record that asked for this evaluation (a test, a review round, a workflow step). Evaluations share a consensus cohort only when their context matches.`})
|
|
76773
|
+
@MaxLength(36)
|
|
76774
|
+
ContextEntityID?: string;
|
|
76775
|
+
|
|
76776
|
+
@Field({nullable: true, description: `Primary key of the context record. Set together with ContextEntityID or not at all.`})
|
|
76777
|
+
@MaxLength(450)
|
|
76778
|
+
ContextRecordID?: string;
|
|
76779
|
+
|
|
76780
|
+
@Field({nullable: true, description: `Who judged: Human (a user), AIPrompt (an LLM judge), Agent (an agent that may use tools), Deterministic (rules), Self (the subject's own party, e.g. a vendor asserting compliance; excluded from reviewer consensus), External (imported from another system).`})
|
|
76781
|
+
@MaxLength(20)
|
|
76782
|
+
EvaluatorType?: string;
|
|
76783
|
+
|
|
76784
|
+
@Field({nullable: true, description: `The user who evaluated. Required for Human; the responding user for Self.`})
|
|
76785
|
+
@MaxLength(36)
|
|
76786
|
+
EvaluatorUserID?: string;
|
|
76787
|
+
|
|
76788
|
+
@Field({nullable: true, description: `The prompt run that produced an AIPrompt evaluation (model, cost, raw output).`})
|
|
76789
|
+
@MaxLength(36)
|
|
76790
|
+
AIPromptRunID?: string;
|
|
76791
|
+
|
|
76792
|
+
@Field({nullable: true, description: `The agent run that produced an Agent evaluation.`})
|
|
76793
|
+
@MaxLength(36)
|
|
76794
|
+
AIAgentRunID?: string;
|
|
76795
|
+
|
|
76796
|
+
@Field({nullable: true, description: `Name of the evaluator implementation or external source (e.g. the evaluator driver class) for provenance.`})
|
|
76797
|
+
@MaxLength(255)
|
|
76798
|
+
EvaluatorName?: string;
|
|
76799
|
+
|
|
76800
|
+
@Field({nullable: true, description: `Draft (being filled in), Submitted (final, counted in consensus), Superseded (replaced by a newer evaluation), Withdrawn (retracted, e.g. a conflict of interest), Failed (the evaluator errored; see ErrorMessage).`})
|
|
76801
|
+
@MaxLength(20)
|
|
76802
|
+
Status?: string;
|
|
76803
|
+
|
|
76804
|
+
@Field({nullable: true, description: `The earlier evaluation this one corrects. Submitting this one moves that one to Superseded.`})
|
|
76805
|
+
@MaxLength(36)
|
|
76806
|
+
SupersedesEvaluationID?: string;
|
|
76807
|
+
|
|
76808
|
+
@Field({nullable: true, description: `When the evaluation was submitted and its result computed.`})
|
|
76809
|
+
SubmittedAt?: Date;
|
|
76810
|
+
|
|
76811
|
+
@Field(() => Float, {nullable: true, description: `The pass threshold used to compute Passed (the version default or a consumer override). Stored so a later change to either never rewrites history.`})
|
|
76812
|
+
PassThresholdApplied?: number;
|
|
76813
|
+
|
|
76814
|
+
@Field(() => Float, {nullable: true, description: `Overall score, 0..1, computed once at submit from the score rows. NULL if nothing applicable was scored.`})
|
|
76815
|
+
NormalizedScore?: number;
|
|
76816
|
+
|
|
76817
|
+
@Field(() => Boolean, {nullable: true, description: `Computed verdict: 1 = passed, 0 = failed, NULL = no threshold applied and no gate or N/A failure (Outcome = Scored).`})
|
|
76818
|
+
Passed?: boolean;
|
|
76819
|
+
|
|
76820
|
+
@Field({nullable: true, description: `Why the evaluation ended as it did: Passed, BelowThreshold, GateFailed, NotApplicableFailure, Incomplete (below MinimumCompleteness or nothing scored), or Scored (no threshold to judge against).`})
|
|
76821
|
+
@MaxLength(30)
|
|
76822
|
+
Outcome?: string;
|
|
76823
|
+
|
|
76824
|
+
@Field({nullable: true, description: `The band NormalizedScore falls in, for display. Interpretation only.`})
|
|
76825
|
+
@MaxLength(36)
|
|
76826
|
+
BandID?: string;
|
|
76827
|
+
|
|
76828
|
+
@Field(() => Boolean, {nullable: true, description: `1 = at least one gate node scored below its GateMinimumScore.`})
|
|
76829
|
+
GateFailed?: boolean;
|
|
76830
|
+
|
|
76831
|
+
@Field(() => Float, {nullable: true, description: `Share (0..1) of applicable, non-advisory criteria that were scored.`})
|
|
76832
|
+
Completeness?: number;
|
|
76833
|
+
|
|
76834
|
+
@Field(() => Int, {nullable: true, description: `Number of non-advisory criteria that received a score.`})
|
|
76835
|
+
ScoredCriteriaCount?: number;
|
|
76836
|
+
|
|
76837
|
+
@Field(() => Int, {nullable: true, description: `Number of non-advisory criteria not answered Not Applicable.`})
|
|
76838
|
+
ApplicableCriteriaCount?: number;
|
|
76839
|
+
|
|
76840
|
+
@Field(() => Int, {nullable: true, description: `Number of non-advisory criteria (leaves) in the version.`})
|
|
76841
|
+
TotalCriteriaCount?: number;
|
|
76842
|
+
|
|
76843
|
+
@Field(() => Float, {nullable: true, description: `Evaluator's overall confidence (0..1), typically the weighted mean of per-criterion confidences from an AI judge. NULL for evaluators that do not report one.`})
|
|
76844
|
+
Confidence?: number;
|
|
76845
|
+
|
|
76846
|
+
@Field({nullable: true, description: `The evaluator's overall written assessment.`})
|
|
76847
|
+
Narrative?: string;
|
|
76848
|
+
|
|
76849
|
+
@Field({nullable: true, description: `Why the evaluator failed, when Status = Failed.`})
|
|
76850
|
+
ErrorMessage?: string;
|
|
76851
|
+
|
|
76852
|
+
@Field({nullable: true, description: `Version of the scoring algorithm that computed the stored result, so a future algorithm change is visible rather than silent.`})
|
|
76853
|
+
@MaxLength(20)
|
|
76854
|
+
ScoringEngineVersion?: string;
|
|
76855
|
+
|
|
76856
|
+
@Field({nullable: true, description: `JSON (IRubricEvaluationMetadata) of evaluator provenance not covered by columns: model settings, timings, the consumer that requested it.`})
|
|
76857
|
+
Metadata?: string;
|
|
76858
|
+
|
|
76859
|
+
@Field()
|
|
76860
|
+
_mj__CreatedAt: Date;
|
|
76861
|
+
|
|
76862
|
+
@Field()
|
|
76863
|
+
_mj__UpdatedAt: Date;
|
|
76864
|
+
|
|
76865
|
+
@Field({nullable: true})
|
|
76866
|
+
@MaxLength(255)
|
|
76867
|
+
SubjectEntity?: string;
|
|
76868
|
+
|
|
76869
|
+
@Field({nullable: true})
|
|
76870
|
+
@MaxLength(255)
|
|
76871
|
+
ContextEntity?: string;
|
|
76872
|
+
|
|
76873
|
+
@Field({nullable: true})
|
|
76874
|
+
@MaxLength(100)
|
|
76875
|
+
EvaluatorUser?: string;
|
|
76876
|
+
|
|
76877
|
+
@Field({nullable: true})
|
|
76878
|
+
@MaxLength(255)
|
|
76879
|
+
AIPromptRun?: string;
|
|
76880
|
+
|
|
76881
|
+
@Field({nullable: true})
|
|
76882
|
+
@MaxLength(255)
|
|
76883
|
+
AIAgentRun?: string;
|
|
76884
|
+
|
|
76885
|
+
@Field({nullable: true})
|
|
76886
|
+
@MaxLength(100)
|
|
76887
|
+
Band?: string;
|
|
76888
|
+
|
|
76889
|
+
@Field({nullable: true})
|
|
76890
|
+
@MaxLength(36)
|
|
76891
|
+
RubricID?: string;
|
|
76892
|
+
|
|
76893
|
+
@Field({nullable: true})
|
|
76894
|
+
@MaxLength(255)
|
|
76895
|
+
Rubric?: string;
|
|
76896
|
+
|
|
76897
|
+
@Field(() => Int, {nullable: true})
|
|
76898
|
+
RubricMajorVersion?: number;
|
|
76899
|
+
|
|
76900
|
+
@Field({nullable: true})
|
|
76901
|
+
@MaxLength(122)
|
|
76902
|
+
RubricVersionLabel?: string;
|
|
76903
|
+
|
|
76904
|
+
@Field(() => Int, {nullable: true})
|
|
76905
|
+
CohortEvaluationCount?: number;
|
|
76906
|
+
|
|
76907
|
+
@Field(() => Int, {nullable: true})
|
|
76908
|
+
CohortScoredCount?: number;
|
|
76909
|
+
|
|
76910
|
+
@Field(() => Int, {nullable: true})
|
|
76911
|
+
CohortPassedCount?: number;
|
|
76912
|
+
|
|
76913
|
+
@Field(() => Float, {nullable: true})
|
|
76914
|
+
CohortMeanScore?: number;
|
|
76915
|
+
|
|
76916
|
+
@Field(() => Float, {nullable: true})
|
|
76917
|
+
CohortMinScore?: number;
|
|
76918
|
+
|
|
76919
|
+
@Field(() => Float, {nullable: true})
|
|
76920
|
+
CohortMaxScore?: number;
|
|
76921
|
+
|
|
76922
|
+
@Field(() => Float, {nullable: true})
|
|
76923
|
+
CohortScoreStdDev?: number;
|
|
76924
|
+
|
|
76925
|
+
@Field(() => Int, {nullable: true})
|
|
76926
|
+
CohortHumanCount?: number;
|
|
76927
|
+
|
|
76928
|
+
@Field(() => Float, {nullable: true})
|
|
76929
|
+
CohortHumanMeanScore?: number;
|
|
76930
|
+
|
|
76931
|
+
@Field(() => Int, {nullable: true})
|
|
76932
|
+
CohortAICount?: number;
|
|
76933
|
+
|
|
76934
|
+
@Field(() => Float, {nullable: true})
|
|
76935
|
+
CohortAIMeanScore?: number;
|
|
76936
|
+
|
|
76937
|
+
@Field(() => Float, {nullable: true})
|
|
76938
|
+
SelfAssessmentScore?: number;
|
|
76939
|
+
|
|
76940
|
+
@Field(() => Int, {nullable: true})
|
|
76941
|
+
SelfAssessmentCount?: number;
|
|
76942
|
+
|
|
76943
|
+
@Field(() => Float, {nullable: true})
|
|
76944
|
+
DeviationFromCohortMean?: number;
|
|
76945
|
+
|
|
76946
|
+
@Field(() => [String], { nullable: true, description: `Field-level security: when non-null, the fields on this entity the calling user may read. Any other field arriving as null was withheld by the server rather than genuinely empty. Null for callers with no field restrictions.` })
|
|
76947
|
+
ReadableFields___?: string[];
|
|
76948
|
+
|
|
76949
|
+
}
|
|
76950
|
+
|
|
76951
|
+
//****************************************************************************
|
|
76952
|
+
// INPUT TYPE for MJ: Rubric Evaluations
|
|
76953
|
+
//****************************************************************************
|
|
76954
|
+
@InputType()
|
|
76955
|
+
export class CreateMJRubricEvaluationInput {
|
|
76956
|
+
@Field({ nullable: true })
|
|
76957
|
+
ID?: string;
|
|
76958
|
+
|
|
76959
|
+
@Field({ nullable: true })
|
|
76960
|
+
RubricVersionID?: string;
|
|
76961
|
+
|
|
76962
|
+
@Field({ nullable: true })
|
|
76963
|
+
SubjectEntityID?: string;
|
|
76964
|
+
|
|
76965
|
+
@Field({ nullable: true })
|
|
76966
|
+
SubjectRecordID?: string;
|
|
76967
|
+
|
|
76968
|
+
@Field({ nullable: true })
|
|
76969
|
+
ContextEntityID: string | null;
|
|
76970
|
+
|
|
76971
|
+
@Field({ nullable: true })
|
|
76972
|
+
ContextRecordID: string | null;
|
|
76973
|
+
|
|
76974
|
+
@Field({ nullable: true })
|
|
76975
|
+
EvaluatorType?: string;
|
|
76976
|
+
|
|
76977
|
+
@Field({ nullable: true })
|
|
76978
|
+
EvaluatorUserID: string | null;
|
|
76979
|
+
|
|
76980
|
+
@Field({ nullable: true })
|
|
76981
|
+
AIPromptRunID: string | null;
|
|
76982
|
+
|
|
76983
|
+
@Field({ nullable: true })
|
|
76984
|
+
AIAgentRunID: string | null;
|
|
76985
|
+
|
|
76986
|
+
@Field({ nullable: true })
|
|
76987
|
+
EvaluatorName: string | null;
|
|
76988
|
+
|
|
76989
|
+
@Field({ nullable: true })
|
|
76990
|
+
Status?: string;
|
|
76991
|
+
|
|
76992
|
+
@Field({ nullable: true })
|
|
76993
|
+
SupersedesEvaluationID: string | null;
|
|
76994
|
+
|
|
76995
|
+
@Field({ nullable: true })
|
|
76996
|
+
SubmittedAt: Date | null;
|
|
76997
|
+
|
|
76998
|
+
@Field(() => Float, { nullable: true })
|
|
76999
|
+
PassThresholdApplied: number | null;
|
|
77000
|
+
|
|
77001
|
+
@Field(() => Float, { nullable: true })
|
|
77002
|
+
NormalizedScore: number | null;
|
|
77003
|
+
|
|
77004
|
+
@Field(() => Boolean, { nullable: true })
|
|
77005
|
+
Passed: boolean | null;
|
|
77006
|
+
|
|
77007
|
+
@Field({ nullable: true })
|
|
77008
|
+
Outcome: string | null;
|
|
77009
|
+
|
|
77010
|
+
@Field({ nullable: true })
|
|
77011
|
+
BandID: string | null;
|
|
77012
|
+
|
|
77013
|
+
@Field(() => Boolean, { nullable: true })
|
|
77014
|
+
GateFailed?: boolean;
|
|
77015
|
+
|
|
77016
|
+
@Field(() => Float, { nullable: true })
|
|
77017
|
+
Completeness: number | null;
|
|
77018
|
+
|
|
77019
|
+
@Field(() => Int, { nullable: true })
|
|
77020
|
+
ScoredCriteriaCount: number | null;
|
|
77021
|
+
|
|
77022
|
+
@Field(() => Int, { nullable: true })
|
|
77023
|
+
ApplicableCriteriaCount: number | null;
|
|
77024
|
+
|
|
77025
|
+
@Field(() => Int, { nullable: true })
|
|
77026
|
+
TotalCriteriaCount: number | null;
|
|
77027
|
+
|
|
77028
|
+
@Field(() => Float, { nullable: true })
|
|
77029
|
+
Confidence: number | null;
|
|
77030
|
+
|
|
77031
|
+
@Field({ nullable: true })
|
|
77032
|
+
Narrative: string | null;
|
|
77033
|
+
|
|
77034
|
+
@Field({ nullable: true })
|
|
77035
|
+
ErrorMessage: string | null;
|
|
77036
|
+
|
|
77037
|
+
@Field({ nullable: true })
|
|
77038
|
+
ScoringEngineVersion: string | null;
|
|
77039
|
+
|
|
77040
|
+
@Field({ nullable: true })
|
|
77041
|
+
Metadata: string | null;
|
|
77042
|
+
|
|
77043
|
+
@Field(() => RestoreContextInput, { nullable: true })
|
|
77044
|
+
RestoreContext___?: RestoreContextInput;
|
|
77045
|
+
}
|
|
77046
|
+
|
|
77047
|
+
|
|
77048
|
+
//****************************************************************************
|
|
77049
|
+
// INPUT TYPE for MJ: Rubric Evaluations
|
|
77050
|
+
//****************************************************************************
|
|
77051
|
+
@InputType()
|
|
77052
|
+
export class UpdateMJRubricEvaluationInput {
|
|
77053
|
+
@Field()
|
|
77054
|
+
ID: string;
|
|
77055
|
+
|
|
77056
|
+
@Field({ nullable: true })
|
|
77057
|
+
RubricVersionID?: string;
|
|
77058
|
+
|
|
77059
|
+
@Field({ nullable: true })
|
|
77060
|
+
SubjectEntityID?: string;
|
|
77061
|
+
|
|
77062
|
+
@Field({ nullable: true })
|
|
77063
|
+
SubjectRecordID?: string;
|
|
77064
|
+
|
|
77065
|
+
@Field({ nullable: true })
|
|
77066
|
+
ContextEntityID?: string | null;
|
|
77067
|
+
|
|
77068
|
+
@Field({ nullable: true })
|
|
77069
|
+
ContextRecordID?: string | null;
|
|
77070
|
+
|
|
77071
|
+
@Field({ nullable: true })
|
|
77072
|
+
EvaluatorType?: string;
|
|
77073
|
+
|
|
77074
|
+
@Field({ nullable: true })
|
|
77075
|
+
EvaluatorUserID?: string | null;
|
|
77076
|
+
|
|
77077
|
+
@Field({ nullable: true })
|
|
77078
|
+
AIPromptRunID?: string | null;
|
|
77079
|
+
|
|
77080
|
+
@Field({ nullable: true })
|
|
77081
|
+
AIAgentRunID?: string | null;
|
|
77082
|
+
|
|
77083
|
+
@Field({ nullable: true })
|
|
77084
|
+
EvaluatorName?: string | null;
|
|
77085
|
+
|
|
77086
|
+
@Field({ nullable: true })
|
|
77087
|
+
Status?: string;
|
|
77088
|
+
|
|
77089
|
+
@Field({ nullable: true })
|
|
77090
|
+
SupersedesEvaluationID?: string | null;
|
|
77091
|
+
|
|
77092
|
+
@Field({ nullable: true })
|
|
77093
|
+
SubmittedAt?: Date | null;
|
|
77094
|
+
|
|
77095
|
+
@Field(() => Float, { nullable: true })
|
|
77096
|
+
PassThresholdApplied?: number | null;
|
|
77097
|
+
|
|
77098
|
+
@Field(() => Float, { nullable: true })
|
|
77099
|
+
NormalizedScore?: number | null;
|
|
77100
|
+
|
|
77101
|
+
@Field(() => Boolean, { nullable: true })
|
|
77102
|
+
Passed?: boolean | null;
|
|
77103
|
+
|
|
77104
|
+
@Field({ nullable: true })
|
|
77105
|
+
Outcome?: string | null;
|
|
77106
|
+
|
|
77107
|
+
@Field({ nullable: true })
|
|
77108
|
+
BandID?: string | null;
|
|
77109
|
+
|
|
77110
|
+
@Field(() => Boolean, { nullable: true })
|
|
77111
|
+
GateFailed?: boolean;
|
|
77112
|
+
|
|
77113
|
+
@Field(() => Float, { nullable: true })
|
|
77114
|
+
Completeness?: number | null;
|
|
77115
|
+
|
|
77116
|
+
@Field(() => Int, { nullable: true })
|
|
77117
|
+
ScoredCriteriaCount?: number | null;
|
|
77118
|
+
|
|
77119
|
+
@Field(() => Int, { nullable: true })
|
|
77120
|
+
ApplicableCriteriaCount?: number | null;
|
|
77121
|
+
|
|
77122
|
+
@Field(() => Int, { nullable: true })
|
|
77123
|
+
TotalCriteriaCount?: number | null;
|
|
77124
|
+
|
|
77125
|
+
@Field(() => Float, { nullable: true })
|
|
77126
|
+
Confidence?: number | null;
|
|
77127
|
+
|
|
77128
|
+
@Field({ nullable: true })
|
|
77129
|
+
Narrative?: string | null;
|
|
77130
|
+
|
|
77131
|
+
@Field({ nullable: true })
|
|
77132
|
+
ErrorMessage?: string | null;
|
|
77133
|
+
|
|
77134
|
+
@Field({ nullable: true })
|
|
77135
|
+
ScoringEngineVersion?: string | null;
|
|
77136
|
+
|
|
77137
|
+
@Field({ nullable: true })
|
|
77138
|
+
Metadata?: string | null;
|
|
77139
|
+
|
|
77140
|
+
@Field(() => [KeyValuePairInput], { nullable: true })
|
|
77141
|
+
OldValues___?: KeyValuePairInput[];
|
|
77142
|
+
|
|
77143
|
+
@Field(() => RestoreContextInput, { nullable: true })
|
|
77144
|
+
RestoreContext___?: RestoreContextInput;
|
|
77145
|
+
}
|
|
77146
|
+
|
|
77147
|
+
//****************************************************************************
|
|
77148
|
+
// RESOLVER for MJ: Rubric Evaluations
|
|
77149
|
+
//****************************************************************************
|
|
77150
|
+
@ObjectType()
|
|
77151
|
+
export class RunMJRubricEvaluationViewResult {
|
|
77152
|
+
@Field(() => [MJRubricEvaluation_])
|
|
77153
|
+
Results: MJRubricEvaluation_[];
|
|
77154
|
+
|
|
77155
|
+
@Field(() => String, {nullable: true})
|
|
77156
|
+
UserViewRunID?: string;
|
|
77157
|
+
|
|
77158
|
+
@Field(() => Int, {nullable: true})
|
|
77159
|
+
RowCount: number;
|
|
77160
|
+
|
|
77161
|
+
@Field(() => Int, {nullable: true})
|
|
77162
|
+
TotalRowCount: number;
|
|
77163
|
+
|
|
77164
|
+
@Field(() => Int, {nullable: true})
|
|
77165
|
+
ExecutionTime: number;
|
|
77166
|
+
|
|
77167
|
+
@Field({nullable: true})
|
|
77168
|
+
ErrorMessage?: string;
|
|
77169
|
+
|
|
77170
|
+
@Field(() => Boolean, {nullable: false})
|
|
77171
|
+
Success: boolean;
|
|
77172
|
+
}
|
|
77173
|
+
|
|
77174
|
+
@Resolver(MJRubricEvaluation_)
|
|
77175
|
+
export class MJRubricEvaluationResolver extends ResolverBase {
|
|
77176
|
+
@Query(() => RunMJRubricEvaluationViewResult)
|
|
77177
|
+
async RunMJRubricEvaluationViewByID(@Arg('input', () => RunViewByIDInput) input: RunViewByIDInput, @Ctx() { providers, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
77178
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
77179
|
+
return super.RunViewByIDGeneric(input, provider, userPayload, pubSub);
|
|
77180
|
+
}
|
|
77181
|
+
|
|
77182
|
+
@Query(() => RunMJRubricEvaluationViewResult)
|
|
77183
|
+
async RunMJRubricEvaluationViewByName(@Arg('input', () => RunViewByNameInput) input: RunViewByNameInput, @Ctx() { providers, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
77184
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
77185
|
+
return super.RunViewByNameGeneric(input, provider, userPayload, pubSub);
|
|
77186
|
+
}
|
|
77187
|
+
|
|
77188
|
+
@Query(() => RunMJRubricEvaluationViewResult)
|
|
77189
|
+
async RunMJRubricEvaluationDynamicView(@Arg('input', () => RunDynamicViewInput) input: RunDynamicViewInput, @Ctx() { providers, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
77190
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
77191
|
+
input.EntityName = 'MJ: Rubric Evaluations';
|
|
77192
|
+
return super.RunDynamicViewGeneric(input, provider, userPayload, pubSub);
|
|
77193
|
+
}
|
|
77194
|
+
@Query(() => MJRubricEvaluation_, { nullable: true })
|
|
77195
|
+
async MJRubricEvaluation(@Arg('ID', () => String) ID: string, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine): Promise<MJRubricEvaluation_ | null> {
|
|
77196
|
+
this.CheckUserReadPermissions('MJ: Rubric Evaluations', userPayload);
|
|
77197
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
77198
|
+
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwRubricEvaluations')} WHERE ${provider.QuoteIdentifier('ID')}=${provider.BuildParameterPlaceholder(0)} ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: Rubric Evaluations', userPayload, EntityPermissionType.Read, 'AND');
|
|
77199
|
+
const rows = await provider.ExecuteSQL(sSQL, [ID], undefined, this.GetUserFromPayload(userPayload));
|
|
77200
|
+
const result = await this.MapFieldNamesToCodeNames('MJ: Rubric Evaluations', rows && rows.length > 0 ? rows[0] : null, this.GetUserFromPayload(userPayload));
|
|
77201
|
+
return result;
|
|
77202
|
+
}
|
|
77203
|
+
|
|
77204
|
+
@Mutation(() => MJRubricEvaluation_)
|
|
77205
|
+
async CreateMJRubricEvaluation(
|
|
77206
|
+
@Arg('input', () => CreateMJRubricEvaluationInput) input: CreateMJRubricEvaluationInput,
|
|
77207
|
+
@Ctx() { providers, userPayload }: AppContext,
|
|
77208
|
+
@PubSub() pubSub: PubSubEngine
|
|
77209
|
+
) {
|
|
77210
|
+
const provider = GetReadWriteProvider(providers);
|
|
77211
|
+
return this.CreateRecord('MJ: Rubric Evaluations', input, provider, userPayload, pubSub)
|
|
77212
|
+
}
|
|
77213
|
+
|
|
77214
|
+
@Mutation(() => MJRubricEvaluation_)
|
|
77215
|
+
async UpdateMJRubricEvaluation(
|
|
77216
|
+
@Arg('input', () => UpdateMJRubricEvaluationInput) input: UpdateMJRubricEvaluationInput,
|
|
77217
|
+
@Ctx() { providers, userPayload }: AppContext,
|
|
77218
|
+
@PubSub() pubSub: PubSubEngine
|
|
77219
|
+
) {
|
|
77220
|
+
const provider = GetReadWriteProvider(providers);
|
|
77221
|
+
return this.UpdateRecord('MJ: Rubric Evaluations', input, provider, userPayload, pubSub);
|
|
77222
|
+
}
|
|
77223
|
+
|
|
77224
|
+
@Mutation(() => MJRubricEvaluation_)
|
|
77225
|
+
async DeleteMJRubricEvaluation(@Arg('ID', () => String) ID: string, @Arg('options___', () => DeleteOptionsInput) options: DeleteOptionsInput, @Ctx() { providers, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
77226
|
+
const provider = GetReadWriteProvider(providers);
|
|
77227
|
+
const key = new CompositeKey([{FieldName: 'ID', Value: ID}]);
|
|
77228
|
+
return this.DeleteRecord('MJ: Rubric Evaluations', key, options, provider, userPayload, pubSub);
|
|
77229
|
+
}
|
|
77230
|
+
|
|
77231
|
+
}
|
|
77232
|
+
|
|
77233
|
+
//****************************************************************************
|
|
77234
|
+
// ENTITY CLASS for MJ: Rubric Scale Levels
|
|
77235
|
+
//****************************************************************************
|
|
77236
|
+
@ObjectType({ description: `One level of a Levels-type rubric scale.` })
|
|
77237
|
+
export class MJRubricScaleLevel_ {
|
|
77238
|
+
@Field()
|
|
77239
|
+
@MaxLength(36)
|
|
77240
|
+
ID: string;
|
|
77241
|
+
|
|
77242
|
+
@Field({nullable: true})
|
|
77243
|
+
@MaxLength(36)
|
|
77244
|
+
ScaleID?: string;
|
|
77245
|
+
|
|
77246
|
+
@Field({nullable: true, description: `What evaluators see and pick, e.g. "Exceeds", "Partially compliant", "4".`})
|
|
77247
|
+
@MaxLength(100)
|
|
77248
|
+
Label?: string;
|
|
77249
|
+
|
|
77250
|
+
@Field(() => Float, {nullable: true, description: `The level's raw value in the scale's own units, e.g. 4 on a 1-5 scale. Display and export only; scoring uses NormalizedValue.`})
|
|
77251
|
+
Value?: number;
|
|
77252
|
+
|
|
77253
|
+
@Field(() => Float, {nullable: true, description: `The score this level contributes, from 0 (worst) to 1 (best). Explicit rather than derived so non-linear scales (e.g. Partial = 0.4) are expressible.`})
|
|
77254
|
+
NormalizedValue?: number;
|
|
77255
|
+
|
|
77256
|
+
@Field({nullable: true, description: `Generic meaning of the level. Criteria can override it with their own anchor text (RubricCriterionLevel).`})
|
|
77257
|
+
Description?: string;
|
|
77258
|
+
|
|
77259
|
+
@Field(() => Int, {nullable: true, description: `Display order of the level within its scale, worst to best by convention.`})
|
|
77260
|
+
Sequence?: number;
|
|
77261
|
+
|
|
77262
|
+
@Field()
|
|
77263
|
+
_mj__CreatedAt: Date;
|
|
77264
|
+
|
|
77265
|
+
@Field()
|
|
77266
|
+
_mj__UpdatedAt: Date;
|
|
77267
|
+
|
|
77268
|
+
@Field({nullable: true})
|
|
77269
|
+
@MaxLength(255)
|
|
77270
|
+
Scale?: string;
|
|
77271
|
+
|
|
77272
|
+
@Field(() => [String], { nullable: true, description: `Field-level security: when non-null, the fields on this entity the calling user may read. Any other field arriving as null was withheld by the server rather than genuinely empty. Null for callers with no field restrictions.` })
|
|
77273
|
+
ReadableFields___?: string[];
|
|
77274
|
+
|
|
77275
|
+
}
|
|
77276
|
+
|
|
77277
|
+
//****************************************************************************
|
|
77278
|
+
// INPUT TYPE for MJ: Rubric Scale Levels
|
|
77279
|
+
//****************************************************************************
|
|
77280
|
+
@InputType()
|
|
77281
|
+
export class CreateMJRubricScaleLevelInput {
|
|
77282
|
+
@Field({ nullable: true })
|
|
77283
|
+
ID?: string;
|
|
77284
|
+
|
|
77285
|
+
@Field({ nullable: true })
|
|
77286
|
+
ScaleID?: string;
|
|
77287
|
+
|
|
77288
|
+
@Field({ nullable: true })
|
|
77289
|
+
Label?: string;
|
|
77290
|
+
|
|
77291
|
+
@Field(() => Float, { nullable: true })
|
|
77292
|
+
Value?: number;
|
|
77293
|
+
|
|
77294
|
+
@Field(() => Float, { nullable: true })
|
|
77295
|
+
NormalizedValue?: number;
|
|
77296
|
+
|
|
77297
|
+
@Field({ nullable: true })
|
|
77298
|
+
Description: string | null;
|
|
77299
|
+
|
|
77300
|
+
@Field(() => Int, { nullable: true })
|
|
77301
|
+
Sequence?: number;
|
|
77302
|
+
|
|
77303
|
+
@Field(() => RestoreContextInput, { nullable: true })
|
|
77304
|
+
RestoreContext___?: RestoreContextInput;
|
|
77305
|
+
}
|
|
77306
|
+
|
|
77307
|
+
|
|
77308
|
+
//****************************************************************************
|
|
77309
|
+
// INPUT TYPE for MJ: Rubric Scale Levels
|
|
77310
|
+
//****************************************************************************
|
|
77311
|
+
@InputType()
|
|
77312
|
+
export class UpdateMJRubricScaleLevelInput {
|
|
77313
|
+
@Field()
|
|
77314
|
+
ID: string;
|
|
77315
|
+
|
|
77316
|
+
@Field({ nullable: true })
|
|
77317
|
+
ScaleID?: string;
|
|
77318
|
+
|
|
77319
|
+
@Field({ nullable: true })
|
|
77320
|
+
Label?: string;
|
|
77321
|
+
|
|
77322
|
+
@Field(() => Float, { nullable: true })
|
|
77323
|
+
Value?: number;
|
|
77324
|
+
|
|
77325
|
+
@Field(() => Float, { nullable: true })
|
|
77326
|
+
NormalizedValue?: number;
|
|
77327
|
+
|
|
77328
|
+
@Field({ nullable: true })
|
|
77329
|
+
Description?: string | null;
|
|
77330
|
+
|
|
77331
|
+
@Field(() => Int, { nullable: true })
|
|
77332
|
+
Sequence?: number;
|
|
77333
|
+
|
|
77334
|
+
@Field(() => [KeyValuePairInput], { nullable: true })
|
|
77335
|
+
OldValues___?: KeyValuePairInput[];
|
|
77336
|
+
|
|
77337
|
+
@Field(() => RestoreContextInput, { nullable: true })
|
|
77338
|
+
RestoreContext___?: RestoreContextInput;
|
|
77339
|
+
}
|
|
77340
|
+
|
|
77341
|
+
//****************************************************************************
|
|
77342
|
+
// RESOLVER for MJ: Rubric Scale Levels
|
|
77343
|
+
//****************************************************************************
|
|
77344
|
+
@ObjectType()
|
|
77345
|
+
export class RunMJRubricScaleLevelViewResult {
|
|
77346
|
+
@Field(() => [MJRubricScaleLevel_])
|
|
77347
|
+
Results: MJRubricScaleLevel_[];
|
|
77348
|
+
|
|
77349
|
+
@Field(() => String, {nullable: true})
|
|
77350
|
+
UserViewRunID?: string;
|
|
77351
|
+
|
|
77352
|
+
@Field(() => Int, {nullable: true})
|
|
77353
|
+
RowCount: number;
|
|
77354
|
+
|
|
77355
|
+
@Field(() => Int, {nullable: true})
|
|
77356
|
+
TotalRowCount: number;
|
|
77357
|
+
|
|
77358
|
+
@Field(() => Int, {nullable: true})
|
|
77359
|
+
ExecutionTime: number;
|
|
77360
|
+
|
|
77361
|
+
@Field({nullable: true})
|
|
77362
|
+
ErrorMessage?: string;
|
|
77363
|
+
|
|
77364
|
+
@Field(() => Boolean, {nullable: false})
|
|
77365
|
+
Success: boolean;
|
|
77366
|
+
}
|
|
77367
|
+
|
|
77368
|
+
@Resolver(MJRubricScaleLevel_)
|
|
77369
|
+
export class MJRubricScaleLevelResolver extends ResolverBase {
|
|
77370
|
+
@Query(() => RunMJRubricScaleLevelViewResult)
|
|
77371
|
+
async RunMJRubricScaleLevelViewByID(@Arg('input', () => RunViewByIDInput) input: RunViewByIDInput, @Ctx() { providers, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
77372
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
77373
|
+
return super.RunViewByIDGeneric(input, provider, userPayload, pubSub);
|
|
77374
|
+
}
|
|
77375
|
+
|
|
77376
|
+
@Query(() => RunMJRubricScaleLevelViewResult)
|
|
77377
|
+
async RunMJRubricScaleLevelViewByName(@Arg('input', () => RunViewByNameInput) input: RunViewByNameInput, @Ctx() { providers, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
77378
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
77379
|
+
return super.RunViewByNameGeneric(input, provider, userPayload, pubSub);
|
|
77380
|
+
}
|
|
77381
|
+
|
|
77382
|
+
@Query(() => RunMJRubricScaleLevelViewResult)
|
|
77383
|
+
async RunMJRubricScaleLevelDynamicView(@Arg('input', () => RunDynamicViewInput) input: RunDynamicViewInput, @Ctx() { providers, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
77384
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
77385
|
+
input.EntityName = 'MJ: Rubric Scale Levels';
|
|
77386
|
+
return super.RunDynamicViewGeneric(input, provider, userPayload, pubSub);
|
|
77387
|
+
}
|
|
77388
|
+
@Query(() => MJRubricScaleLevel_, { nullable: true })
|
|
77389
|
+
async MJRubricScaleLevel(@Arg('ID', () => String) ID: string, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine): Promise<MJRubricScaleLevel_ | null> {
|
|
77390
|
+
this.CheckUserReadPermissions('MJ: Rubric Scale Levels', userPayload);
|
|
77391
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
77392
|
+
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwRubricScaleLevels')} WHERE ${provider.QuoteIdentifier('ID')}=${provider.BuildParameterPlaceholder(0)} ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: Rubric Scale Levels', userPayload, EntityPermissionType.Read, 'AND');
|
|
77393
|
+
const rows = await provider.ExecuteSQL(sSQL, [ID], undefined, this.GetUserFromPayload(userPayload));
|
|
77394
|
+
const result = await this.MapFieldNamesToCodeNames('MJ: Rubric Scale Levels', rows && rows.length > 0 ? rows[0] : null, this.GetUserFromPayload(userPayload));
|
|
77395
|
+
return result;
|
|
77396
|
+
}
|
|
77397
|
+
|
|
77398
|
+
@Mutation(() => MJRubricScaleLevel_)
|
|
77399
|
+
async CreateMJRubricScaleLevel(
|
|
77400
|
+
@Arg('input', () => CreateMJRubricScaleLevelInput) input: CreateMJRubricScaleLevelInput,
|
|
77401
|
+
@Ctx() { providers, userPayload }: AppContext,
|
|
77402
|
+
@PubSub() pubSub: PubSubEngine
|
|
77403
|
+
) {
|
|
77404
|
+
const provider = GetReadWriteProvider(providers);
|
|
77405
|
+
return this.CreateRecord('MJ: Rubric Scale Levels', input, provider, userPayload, pubSub)
|
|
77406
|
+
}
|
|
77407
|
+
|
|
77408
|
+
@Mutation(() => MJRubricScaleLevel_)
|
|
77409
|
+
async UpdateMJRubricScaleLevel(
|
|
77410
|
+
@Arg('input', () => UpdateMJRubricScaleLevelInput) input: UpdateMJRubricScaleLevelInput,
|
|
77411
|
+
@Ctx() { providers, userPayload }: AppContext,
|
|
77412
|
+
@PubSub() pubSub: PubSubEngine
|
|
77413
|
+
) {
|
|
77414
|
+
const provider = GetReadWriteProvider(providers);
|
|
77415
|
+
return this.UpdateRecord('MJ: Rubric Scale Levels', input, provider, userPayload, pubSub);
|
|
77416
|
+
}
|
|
77417
|
+
|
|
77418
|
+
@Mutation(() => MJRubricScaleLevel_)
|
|
77419
|
+
async DeleteMJRubricScaleLevel(@Arg('ID', () => String) ID: string, @Arg('options___', () => DeleteOptionsInput) options: DeleteOptionsInput, @Ctx() { providers, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
77420
|
+
const provider = GetReadWriteProvider(providers);
|
|
77421
|
+
const key = new CompositeKey([{FieldName: 'ID', Value: ID}]);
|
|
77422
|
+
return this.DeleteRecord('MJ: Rubric Scale Levels', key, options, provider, userPayload, pubSub);
|
|
77423
|
+
}
|
|
77424
|
+
|
|
77425
|
+
}
|
|
77426
|
+
|
|
77427
|
+
//****************************************************************************
|
|
77428
|
+
// ENTITY CLASS for MJ: Rubric Scales
|
|
77429
|
+
//****************************************************************************
|
|
77430
|
+
@ObjectType({ description: `A reusable response scale that criteria are answered on: either ordered Levels (e.g. 1-5, Pass/Fail, Compliant/Partial/Non-compliant) or a Numeric range. Every answer is converted to a normalized 0..1 score. A scale used by a published rubric version is frozen in everything that affects scoring.` })
|
|
77431
|
+
export class MJRubricScale_ {
|
|
77432
|
+
@Field()
|
|
77433
|
+
@MaxLength(36)
|
|
77434
|
+
ID: string;
|
|
77435
|
+
|
|
77436
|
+
@Field({nullable: true, description: `Unique display name of the scale, e.g. "Likert 1-5" or "Compliance".`})
|
|
77437
|
+
@MaxLength(255)
|
|
77438
|
+
Name?: string;
|
|
77439
|
+
|
|
77440
|
+
@Field({nullable: true, description: `What the scale measures and how evaluators should read it.`})
|
|
77441
|
+
Description?: string;
|
|
77442
|
+
|
|
77443
|
+
@Field({nullable: true, description: `Levels: answers pick one of the scale's RubricScaleLevel rows, each carrying its own normalized value. Numeric: answers are a number between MinValue and MaxValue, normalized linearly (inverted when HigherIsBetter = 0).`})
|
|
77444
|
+
@MaxLength(20)
|
|
77445
|
+
ScaleType?: string;
|
|
77446
|
+
|
|
77447
|
+
@Field(() => Float, {nullable: true, description: `Lowest allowed answer for a Numeric scale. Required when ScaleType = Numeric.`})
|
|
77448
|
+
MinValue?: number;
|
|
77449
|
+
|
|
77450
|
+
@Field(() => Float, {nullable: true, description: `Highest allowed answer for a Numeric scale. Required when ScaleType = Numeric and must exceed MinValue.`})
|
|
77451
|
+
MaxValue?: number;
|
|
77452
|
+
|
|
77453
|
+
@Field(() => Float, {nullable: true, description: `Optional input increment for a Numeric scale (e.g. 0.5). NULL = any value in range.`})
|
|
77454
|
+
Step?: number;
|
|
77455
|
+
|
|
77456
|
+
@Field(() => Boolean, {nullable: true, description: `For Numeric scales: 1 = a higher answer is better (normalizes to a higher score); 0 = lower is better (e.g. error counts), so normalization is inverted.`})
|
|
77457
|
+
HigherIsBetter?: boolean;
|
|
77458
|
+
|
|
77459
|
+
@Field({nullable: true, description: `Active scales can be chosen for new criteria; Disabled scales stay valid for versions that already use them.`})
|
|
77460
|
+
@MaxLength(20)
|
|
77461
|
+
Status?: string;
|
|
77462
|
+
|
|
77463
|
+
@Field()
|
|
77464
|
+
_mj__CreatedAt: Date;
|
|
77465
|
+
|
|
77466
|
+
@Field()
|
|
77467
|
+
_mj__UpdatedAt: Date;
|
|
77468
|
+
|
|
77469
|
+
@Field(() => [String], { nullable: true, description: `Field-level security: when non-null, the fields on this entity the calling user may read. Any other field arriving as null was withheld by the server rather than genuinely empty. Null for callers with no field restrictions.` })
|
|
77470
|
+
ReadableFields___?: string[];
|
|
77471
|
+
|
|
77472
|
+
}
|
|
77473
|
+
|
|
77474
|
+
//****************************************************************************
|
|
77475
|
+
// INPUT TYPE for MJ: Rubric Scales
|
|
77476
|
+
//****************************************************************************
|
|
77477
|
+
@InputType()
|
|
77478
|
+
export class CreateMJRubricScaleInput {
|
|
77479
|
+
@Field({ nullable: true })
|
|
77480
|
+
ID?: string;
|
|
77481
|
+
|
|
77482
|
+
@Field({ nullable: true })
|
|
77483
|
+
Name?: string;
|
|
77484
|
+
|
|
77485
|
+
@Field({ nullable: true })
|
|
77486
|
+
Description: string | null;
|
|
77487
|
+
|
|
77488
|
+
@Field({ nullable: true })
|
|
77489
|
+
ScaleType?: string;
|
|
77490
|
+
|
|
77491
|
+
@Field(() => Float, { nullable: true })
|
|
77492
|
+
MinValue: number | null;
|
|
77493
|
+
|
|
77494
|
+
@Field(() => Float, { nullable: true })
|
|
77495
|
+
MaxValue: number | null;
|
|
77496
|
+
|
|
77497
|
+
@Field(() => Float, { nullable: true })
|
|
77498
|
+
Step: number | null;
|
|
77499
|
+
|
|
77500
|
+
@Field(() => Boolean, { nullable: true })
|
|
77501
|
+
HigherIsBetter?: boolean;
|
|
77502
|
+
|
|
77503
|
+
@Field({ nullable: true })
|
|
77504
|
+
Status?: string;
|
|
77505
|
+
|
|
77506
|
+
@Field(() => RestoreContextInput, { nullable: true })
|
|
77507
|
+
RestoreContext___?: RestoreContextInput;
|
|
77508
|
+
}
|
|
77509
|
+
|
|
77510
|
+
|
|
77511
|
+
//****************************************************************************
|
|
77512
|
+
// INPUT TYPE for MJ: Rubric Scales
|
|
77513
|
+
//****************************************************************************
|
|
77514
|
+
@InputType()
|
|
77515
|
+
export class UpdateMJRubricScaleInput {
|
|
77516
|
+
@Field()
|
|
77517
|
+
ID: string;
|
|
77518
|
+
|
|
77519
|
+
@Field({ nullable: true })
|
|
77520
|
+
Name?: string;
|
|
77521
|
+
|
|
77522
|
+
@Field({ nullable: true })
|
|
77523
|
+
Description?: string | null;
|
|
77524
|
+
|
|
77525
|
+
@Field({ nullable: true })
|
|
77526
|
+
ScaleType?: string;
|
|
77527
|
+
|
|
77528
|
+
@Field(() => Float, { nullable: true })
|
|
77529
|
+
MinValue?: number | null;
|
|
77530
|
+
|
|
77531
|
+
@Field(() => Float, { nullable: true })
|
|
77532
|
+
MaxValue?: number | null;
|
|
77533
|
+
|
|
77534
|
+
@Field(() => Float, { nullable: true })
|
|
77535
|
+
Step?: number | null;
|
|
77536
|
+
|
|
77537
|
+
@Field(() => Boolean, { nullable: true })
|
|
77538
|
+
HigherIsBetter?: boolean;
|
|
77539
|
+
|
|
77540
|
+
@Field({ nullable: true })
|
|
77541
|
+
Status?: string;
|
|
77542
|
+
|
|
77543
|
+
@Field(() => [KeyValuePairInput], { nullable: true })
|
|
77544
|
+
OldValues___?: KeyValuePairInput[];
|
|
77545
|
+
|
|
77546
|
+
@Field(() => RestoreContextInput, { nullable: true })
|
|
77547
|
+
RestoreContext___?: RestoreContextInput;
|
|
77548
|
+
}
|
|
77549
|
+
|
|
77550
|
+
//****************************************************************************
|
|
77551
|
+
// RESOLVER for MJ: Rubric Scales
|
|
77552
|
+
//****************************************************************************
|
|
77553
|
+
@ObjectType()
|
|
77554
|
+
export class RunMJRubricScaleViewResult {
|
|
77555
|
+
@Field(() => [MJRubricScale_])
|
|
77556
|
+
Results: MJRubricScale_[];
|
|
77557
|
+
|
|
77558
|
+
@Field(() => String, {nullable: true})
|
|
77559
|
+
UserViewRunID?: string;
|
|
77560
|
+
|
|
77561
|
+
@Field(() => Int, {nullable: true})
|
|
77562
|
+
RowCount: number;
|
|
77563
|
+
|
|
77564
|
+
@Field(() => Int, {nullable: true})
|
|
77565
|
+
TotalRowCount: number;
|
|
77566
|
+
|
|
77567
|
+
@Field(() => Int, {nullable: true})
|
|
77568
|
+
ExecutionTime: number;
|
|
77569
|
+
|
|
77570
|
+
@Field({nullable: true})
|
|
77571
|
+
ErrorMessage?: string;
|
|
77572
|
+
|
|
77573
|
+
@Field(() => Boolean, {nullable: false})
|
|
77574
|
+
Success: boolean;
|
|
77575
|
+
}
|
|
77576
|
+
|
|
77577
|
+
@Resolver(MJRubricScale_)
|
|
77578
|
+
export class MJRubricScaleResolver extends ResolverBase {
|
|
77579
|
+
@Query(() => RunMJRubricScaleViewResult)
|
|
77580
|
+
async RunMJRubricScaleViewByID(@Arg('input', () => RunViewByIDInput) input: RunViewByIDInput, @Ctx() { providers, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
77581
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
77582
|
+
return super.RunViewByIDGeneric(input, provider, userPayload, pubSub);
|
|
77583
|
+
}
|
|
77584
|
+
|
|
77585
|
+
@Query(() => RunMJRubricScaleViewResult)
|
|
77586
|
+
async RunMJRubricScaleViewByName(@Arg('input', () => RunViewByNameInput) input: RunViewByNameInput, @Ctx() { providers, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
77587
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
77588
|
+
return super.RunViewByNameGeneric(input, provider, userPayload, pubSub);
|
|
77589
|
+
}
|
|
77590
|
+
|
|
77591
|
+
@Query(() => RunMJRubricScaleViewResult)
|
|
77592
|
+
async RunMJRubricScaleDynamicView(@Arg('input', () => RunDynamicViewInput) input: RunDynamicViewInput, @Ctx() { providers, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
77593
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
77594
|
+
input.EntityName = 'MJ: Rubric Scales';
|
|
77595
|
+
return super.RunDynamicViewGeneric(input, provider, userPayload, pubSub);
|
|
77596
|
+
}
|
|
77597
|
+
@Query(() => MJRubricScale_, { nullable: true })
|
|
77598
|
+
async MJRubricScale(@Arg('ID', () => String) ID: string, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine): Promise<MJRubricScale_ | null> {
|
|
77599
|
+
this.CheckUserReadPermissions('MJ: Rubric Scales', userPayload);
|
|
77600
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
77601
|
+
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwRubricScales')} WHERE ${provider.QuoteIdentifier('ID')}=${provider.BuildParameterPlaceholder(0)} ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: Rubric Scales', userPayload, EntityPermissionType.Read, 'AND');
|
|
77602
|
+
const rows = await provider.ExecuteSQL(sSQL, [ID], undefined, this.GetUserFromPayload(userPayload));
|
|
77603
|
+
const result = await this.MapFieldNamesToCodeNames('MJ: Rubric Scales', rows && rows.length > 0 ? rows[0] : null, this.GetUserFromPayload(userPayload));
|
|
77604
|
+
return result;
|
|
77605
|
+
}
|
|
77606
|
+
|
|
77607
|
+
@Mutation(() => MJRubricScale_)
|
|
77608
|
+
async CreateMJRubricScale(
|
|
77609
|
+
@Arg('input', () => CreateMJRubricScaleInput) input: CreateMJRubricScaleInput,
|
|
77610
|
+
@Ctx() { providers, userPayload }: AppContext,
|
|
77611
|
+
@PubSub() pubSub: PubSubEngine
|
|
77612
|
+
) {
|
|
77613
|
+
const provider = GetReadWriteProvider(providers);
|
|
77614
|
+
return this.CreateRecord('MJ: Rubric Scales', input, provider, userPayload, pubSub)
|
|
77615
|
+
}
|
|
77616
|
+
|
|
77617
|
+
@Mutation(() => MJRubricScale_)
|
|
77618
|
+
async UpdateMJRubricScale(
|
|
77619
|
+
@Arg('input', () => UpdateMJRubricScaleInput) input: UpdateMJRubricScaleInput,
|
|
77620
|
+
@Ctx() { providers, userPayload }: AppContext,
|
|
77621
|
+
@PubSub() pubSub: PubSubEngine
|
|
77622
|
+
) {
|
|
77623
|
+
const provider = GetReadWriteProvider(providers);
|
|
77624
|
+
return this.UpdateRecord('MJ: Rubric Scales', input, provider, userPayload, pubSub);
|
|
77625
|
+
}
|
|
77626
|
+
|
|
77627
|
+
@Mutation(() => MJRubricScale_)
|
|
77628
|
+
async DeleteMJRubricScale(@Arg('ID', () => String) ID: string, @Arg('options___', () => DeleteOptionsInput) options: DeleteOptionsInput, @Ctx() { providers, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
77629
|
+
const provider = GetReadWriteProvider(providers);
|
|
77630
|
+
const key = new CompositeKey([{FieldName: 'ID', Value: ID}]);
|
|
77631
|
+
return this.DeleteRecord('MJ: Rubric Scales', key, options, provider, userPayload, pubSub);
|
|
77632
|
+
}
|
|
77633
|
+
|
|
77634
|
+
}
|
|
77635
|
+
|
|
77636
|
+
//****************************************************************************
|
|
77637
|
+
// ENTITY CLASS for MJ: Rubric Versions
|
|
77638
|
+
//****************************************************************************
|
|
77639
|
+
@ObjectType({ description: `An immutable-once-published snapshot of a rubric\'s content. Edits happen on the single Draft; publishing freezes it and assigns a semantic version whose bump is computed by the server from a diff against the previous published version: Major = scores are not comparable (weights, scales, gates, tree shape, N/A policy, rollup, evaluator rules), Minor = scores comparable but verdicts or interpretation may differ (threshold, bands, advisory criteria, required evidence), Patch = wording only.` })
|
|
77640
|
+
export class MJRubricVersion_ {
|
|
77641
|
+
@Field()
|
|
77642
|
+
@MaxLength(36)
|
|
77643
|
+
ID: string;
|
|
77644
|
+
|
|
77645
|
+
@Field({nullable: true})
|
|
77646
|
+
@MaxLength(36)
|
|
77647
|
+
RubricID?: string;
|
|
77648
|
+
|
|
77649
|
+
@Field(() => Int, {nullable: true, description: `Semantic major version, assigned at publish. Evaluations sharing a rubric and major version are directly comparable. NULL while Draft.`})
|
|
77650
|
+
MajorVersion?: number;
|
|
77651
|
+
|
|
77652
|
+
@Field(() => Int, {nullable: true, description: `Semantic minor version, assigned at publish. NULL while Draft.`})
|
|
77653
|
+
MinorVersion?: number;
|
|
77654
|
+
|
|
77655
|
+
@Field(() => Int, {nullable: true, description: `Semantic patch version, assigned at publish. NULL while Draft.`})
|
|
77656
|
+
PatchVersion?: number;
|
|
77657
|
+
|
|
77658
|
+
@Field({nullable: true, description: `Draft (editable, at most one per rubric), Published (frozen, available for new evaluations), or Retired (frozen, kept for history and for evaluations already pinned to it).`})
|
|
77659
|
+
@MaxLength(20)
|
|
77660
|
+
Status?: string;
|
|
77661
|
+
|
|
77662
|
+
@Field({nullable: true, description: `The version this draft was cloned from; the publish-time diff and bump are computed against it.`})
|
|
77663
|
+
@MaxLength(36)
|
|
77664
|
+
BasedOnVersionID?: string;
|
|
77665
|
+
|
|
77666
|
+
@Field({nullable: true, description: `Overall guidance for evaluators (human and AI) applying this version. Wording only: changing it is a patch.`})
|
|
77667
|
+
Instructions?: string;
|
|
77668
|
+
|
|
77669
|
+
@Field(() => Float, {nullable: true, description: `Default minimum normalized score (0..1) for an evaluation to pass. Consumers (a test, a review round) may override it; the threshold actually used is stored on each evaluation. NULL = no threshold (evaluations report a score and gate results only).`})
|
|
77670
|
+
PassThreshold?: number;
|
|
77671
|
+
|
|
77672
|
+
@Field(() => Float, {nullable: true, description: `Minimum share (0..1) of applicable scored criteria required for a valid result. Below it the evaluation's Outcome is Incomplete and it does not pass. NULL = no minimum.`})
|
|
77673
|
+
MinimumCompleteness?: number;
|
|
77674
|
+
|
|
77675
|
+
@Field({nullable: true, description: `Default handling of a criterion answered Not Applicable (criteria may override): ExcludeAndRedistribute (drop it and share its weight among its siblings), CountAsZero (score it 0), FailEvaluation (allowed, but the evaluation fails), NotAllowed (the evaluation cannot be submitted).`})
|
|
77676
|
+
@MaxLength(30)
|
|
77677
|
+
NotApplicablePolicy?: string;
|
|
77678
|
+
|
|
77679
|
+
@Field(() => Float, {nullable: true, description: `Display-only lower bound: the value a normalized score of 0 is shown as (e.g. 0 or 1). Never used in scoring.`})
|
|
77680
|
+
ScoreDisplayMin?: number;
|
|
77681
|
+
|
|
77682
|
+
@Field(() => Float, {nullable: true, description: `Display-only upper bound: the value a normalized score of 1 is shown as (e.g. 100 or 5). Never used in scoring.`})
|
|
77683
|
+
ScoreDisplayMax?: number;
|
|
77684
|
+
|
|
77685
|
+
@Field({nullable: true, description: `Optional bump the author asks for on publish. The server applies the larger of this and the bump it computes; an author can never publish a smaller bump than the change requires.`})
|
|
77686
|
+
@MaxLength(10)
|
|
77687
|
+
RequestedBump?: string;
|
|
77688
|
+
|
|
77689
|
+
@Field({nullable: true, description: `The bump the server computed from the diff at publish (Initial for a rubric's first version).`})
|
|
77690
|
+
@MaxLength(10)
|
|
77691
|
+
ComputedBump?: string;
|
|
77692
|
+
|
|
77693
|
+
@Field({nullable: true, description: `The bump actually applied at publish: the larger of ComputedBump and RequestedBump.`})
|
|
77694
|
+
@MaxLength(10)
|
|
77695
|
+
AppliedBump?: string;
|
|
77696
|
+
|
|
77697
|
+
@Field({nullable: true, description: `Author's human-readable summary of what changed in this version.`})
|
|
77698
|
+
ChangeSummary?: string;
|
|
77699
|
+
|
|
77700
|
+
@Field({nullable: true, description: `JSON diff produced at publish: every added, removed and changed node and property, each with the bump it required. Explains ComputedBump.`})
|
|
77701
|
+
ChangeDetails?: string;
|
|
77702
|
+
|
|
77703
|
+
@Field({nullable: true, description: `SHA-256 of the version's full canonical content (scoring math plus all wording), computed at publish.`})
|
|
77704
|
+
@MaxLength(64)
|
|
77705
|
+
ContentHash?: string;
|
|
77706
|
+
|
|
77707
|
+
@Field({nullable: true, description: `SHA-256 of only the scoring-relevant content (tree shape, keys, weights, scales, gates, policies, rollups, evaluator rules). Two versions with equal ScoringHash compute identical scores from identical answers.`})
|
|
77708
|
+
@MaxLength(64)
|
|
77709
|
+
ScoringHash?: string;
|
|
77710
|
+
|
|
77711
|
+
@Field({nullable: true, description: `When the version was published.`})
|
|
77712
|
+
PublishedAt?: Date;
|
|
77713
|
+
|
|
77714
|
+
@Field({nullable: true})
|
|
77715
|
+
@MaxLength(36)
|
|
77716
|
+
PublishedByUserID?: string;
|
|
77717
|
+
|
|
77718
|
+
@Field({nullable: true, description: `When the version was retired. NULL while Draft or Published.`})
|
|
77719
|
+
RetiredAt?: Date;
|
|
77720
|
+
|
|
77721
|
+
@Field()
|
|
77722
|
+
_mj__CreatedAt: Date;
|
|
77723
|
+
|
|
77724
|
+
@Field()
|
|
77725
|
+
_mj__UpdatedAt: Date;
|
|
77726
|
+
|
|
77727
|
+
@Field({nullable: true})
|
|
77728
|
+
@MaxLength(255)
|
|
77729
|
+
Rubric?: string;
|
|
77730
|
+
|
|
77731
|
+
@Field({nullable: true})
|
|
77732
|
+
@MaxLength(100)
|
|
77733
|
+
PublishedByUser?: string;
|
|
77734
|
+
|
|
77735
|
+
@Field(() => [String], { nullable: true, description: `Field-level security: when non-null, the fields on this entity the calling user may read. Any other field arriving as null was withheld by the server rather than genuinely empty. Null for callers with no field restrictions.` })
|
|
77736
|
+
ReadableFields___?: string[];
|
|
77737
|
+
|
|
77738
|
+
}
|
|
77739
|
+
|
|
77740
|
+
//****************************************************************************
|
|
77741
|
+
// INPUT TYPE for MJ: Rubric Versions
|
|
77742
|
+
//****************************************************************************
|
|
77743
|
+
@InputType()
|
|
77744
|
+
export class CreateMJRubricVersionInput {
|
|
77745
|
+
@Field({ nullable: true })
|
|
77746
|
+
ID?: string;
|
|
77747
|
+
|
|
77748
|
+
@Field({ nullable: true })
|
|
77749
|
+
RubricID?: string;
|
|
77750
|
+
|
|
77751
|
+
@Field(() => Int, { nullable: true })
|
|
77752
|
+
MajorVersion: number | null;
|
|
77753
|
+
|
|
77754
|
+
@Field(() => Int, { nullable: true })
|
|
77755
|
+
MinorVersion: number | null;
|
|
77756
|
+
|
|
77757
|
+
@Field(() => Int, { nullable: true })
|
|
77758
|
+
PatchVersion: number | null;
|
|
77759
|
+
|
|
77760
|
+
@Field({ nullable: true })
|
|
77761
|
+
Status?: string;
|
|
77762
|
+
|
|
77763
|
+
@Field({ nullable: true })
|
|
77764
|
+
BasedOnVersionID: string | null;
|
|
77765
|
+
|
|
77766
|
+
@Field({ nullable: true })
|
|
77767
|
+
Instructions: string | null;
|
|
77768
|
+
|
|
77769
|
+
@Field(() => Float, { nullable: true })
|
|
77770
|
+
PassThreshold: number | null;
|
|
77771
|
+
|
|
77772
|
+
@Field(() => Float, { nullable: true })
|
|
77773
|
+
MinimumCompleteness: number | null;
|
|
77774
|
+
|
|
77775
|
+
@Field({ nullable: true })
|
|
77776
|
+
NotApplicablePolicy?: string;
|
|
77777
|
+
|
|
77778
|
+
@Field(() => Float, { nullable: true })
|
|
77779
|
+
ScoreDisplayMin?: number;
|
|
77780
|
+
|
|
77781
|
+
@Field(() => Float, { nullable: true })
|
|
77782
|
+
ScoreDisplayMax?: number;
|
|
77783
|
+
|
|
77784
|
+
@Field({ nullable: true })
|
|
77785
|
+
RequestedBump: string | null;
|
|
77786
|
+
|
|
77787
|
+
@Field({ nullable: true })
|
|
77788
|
+
ComputedBump: string | null;
|
|
77789
|
+
|
|
77790
|
+
@Field({ nullable: true })
|
|
77791
|
+
AppliedBump: string | null;
|
|
77792
|
+
|
|
77793
|
+
@Field({ nullable: true })
|
|
77794
|
+
ChangeSummary: string | null;
|
|
77795
|
+
|
|
77796
|
+
@Field({ nullable: true })
|
|
77797
|
+
ChangeDetails: string | null;
|
|
77798
|
+
|
|
77799
|
+
@Field({ nullable: true })
|
|
77800
|
+
ContentHash: string | null;
|
|
77801
|
+
|
|
77802
|
+
@Field({ nullable: true })
|
|
77803
|
+
ScoringHash: string | null;
|
|
77804
|
+
|
|
77805
|
+
@Field({ nullable: true })
|
|
77806
|
+
PublishedAt: Date | null;
|
|
77807
|
+
|
|
77808
|
+
@Field({ nullable: true })
|
|
77809
|
+
PublishedByUserID: string | null;
|
|
77810
|
+
|
|
77811
|
+
@Field({ nullable: true })
|
|
77812
|
+
RetiredAt: Date | null;
|
|
77813
|
+
|
|
77814
|
+
@Field(() => RestoreContextInput, { nullable: true })
|
|
77815
|
+
RestoreContext___?: RestoreContextInput;
|
|
77816
|
+
}
|
|
77817
|
+
|
|
77818
|
+
|
|
77819
|
+
//****************************************************************************
|
|
77820
|
+
// INPUT TYPE for MJ: Rubric Versions
|
|
77821
|
+
//****************************************************************************
|
|
77822
|
+
@InputType()
|
|
77823
|
+
export class UpdateMJRubricVersionInput {
|
|
77824
|
+
@Field()
|
|
77825
|
+
ID: string;
|
|
77826
|
+
|
|
77827
|
+
@Field({ nullable: true })
|
|
77828
|
+
RubricID?: string;
|
|
77829
|
+
|
|
77830
|
+
@Field(() => Int, { nullable: true })
|
|
77831
|
+
MajorVersion?: number | null;
|
|
77832
|
+
|
|
77833
|
+
@Field(() => Int, { nullable: true })
|
|
77834
|
+
MinorVersion?: number | null;
|
|
77835
|
+
|
|
77836
|
+
@Field(() => Int, { nullable: true })
|
|
77837
|
+
PatchVersion?: number | null;
|
|
77838
|
+
|
|
77839
|
+
@Field({ nullable: true })
|
|
77840
|
+
Status?: string;
|
|
77841
|
+
|
|
77842
|
+
@Field({ nullable: true })
|
|
77843
|
+
BasedOnVersionID?: string | null;
|
|
77844
|
+
|
|
77845
|
+
@Field({ nullable: true })
|
|
77846
|
+
Instructions?: string | null;
|
|
77847
|
+
|
|
77848
|
+
@Field(() => Float, { nullable: true })
|
|
77849
|
+
PassThreshold?: number | null;
|
|
77850
|
+
|
|
77851
|
+
@Field(() => Float, { nullable: true })
|
|
77852
|
+
MinimumCompleteness?: number | null;
|
|
77853
|
+
|
|
77854
|
+
@Field({ nullable: true })
|
|
77855
|
+
NotApplicablePolicy?: string;
|
|
77856
|
+
|
|
77857
|
+
@Field(() => Float, { nullable: true })
|
|
77858
|
+
ScoreDisplayMin?: number;
|
|
77859
|
+
|
|
77860
|
+
@Field(() => Float, { nullable: true })
|
|
77861
|
+
ScoreDisplayMax?: number;
|
|
77862
|
+
|
|
77863
|
+
@Field({ nullable: true })
|
|
77864
|
+
RequestedBump?: string | null;
|
|
77865
|
+
|
|
77866
|
+
@Field({ nullable: true })
|
|
77867
|
+
ComputedBump?: string | null;
|
|
77868
|
+
|
|
77869
|
+
@Field({ nullable: true })
|
|
77870
|
+
AppliedBump?: string | null;
|
|
77871
|
+
|
|
77872
|
+
@Field({ nullable: true })
|
|
77873
|
+
ChangeSummary?: string | null;
|
|
77874
|
+
|
|
77875
|
+
@Field({ nullable: true })
|
|
77876
|
+
ChangeDetails?: string | null;
|
|
77877
|
+
|
|
77878
|
+
@Field({ nullable: true })
|
|
77879
|
+
ContentHash?: string | null;
|
|
77880
|
+
|
|
77881
|
+
@Field({ nullable: true })
|
|
77882
|
+
ScoringHash?: string | null;
|
|
77883
|
+
|
|
77884
|
+
@Field({ nullable: true })
|
|
77885
|
+
PublishedAt?: Date | null;
|
|
77886
|
+
|
|
77887
|
+
@Field({ nullable: true })
|
|
77888
|
+
PublishedByUserID?: string | null;
|
|
77889
|
+
|
|
77890
|
+
@Field({ nullable: true })
|
|
77891
|
+
RetiredAt?: Date | null;
|
|
77892
|
+
|
|
77893
|
+
@Field(() => [KeyValuePairInput], { nullable: true })
|
|
77894
|
+
OldValues___?: KeyValuePairInput[];
|
|
77895
|
+
|
|
77896
|
+
@Field(() => RestoreContextInput, { nullable: true })
|
|
77897
|
+
RestoreContext___?: RestoreContextInput;
|
|
77898
|
+
}
|
|
77899
|
+
|
|
77900
|
+
//****************************************************************************
|
|
77901
|
+
// RESOLVER for MJ: Rubric Versions
|
|
77902
|
+
//****************************************************************************
|
|
77903
|
+
@ObjectType()
|
|
77904
|
+
export class RunMJRubricVersionViewResult {
|
|
77905
|
+
@Field(() => [MJRubricVersion_])
|
|
77906
|
+
Results: MJRubricVersion_[];
|
|
77907
|
+
|
|
77908
|
+
@Field(() => String, {nullable: true})
|
|
77909
|
+
UserViewRunID?: string;
|
|
77910
|
+
|
|
77911
|
+
@Field(() => Int, {nullable: true})
|
|
77912
|
+
RowCount: number;
|
|
77913
|
+
|
|
77914
|
+
@Field(() => Int, {nullable: true})
|
|
77915
|
+
TotalRowCount: number;
|
|
77916
|
+
|
|
77917
|
+
@Field(() => Int, {nullable: true})
|
|
77918
|
+
ExecutionTime: number;
|
|
77919
|
+
|
|
77920
|
+
@Field({nullable: true})
|
|
77921
|
+
ErrorMessage?: string;
|
|
77922
|
+
|
|
77923
|
+
@Field(() => Boolean, {nullable: false})
|
|
77924
|
+
Success: boolean;
|
|
77925
|
+
}
|
|
77926
|
+
|
|
77927
|
+
@Resolver(MJRubricVersion_)
|
|
77928
|
+
export class MJRubricVersionResolver extends ResolverBase {
|
|
77929
|
+
@Query(() => RunMJRubricVersionViewResult)
|
|
77930
|
+
async RunMJRubricVersionViewByID(@Arg('input', () => RunViewByIDInput) input: RunViewByIDInput, @Ctx() { providers, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
77931
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
77932
|
+
return super.RunViewByIDGeneric(input, provider, userPayload, pubSub);
|
|
77933
|
+
}
|
|
77934
|
+
|
|
77935
|
+
@Query(() => RunMJRubricVersionViewResult)
|
|
77936
|
+
async RunMJRubricVersionViewByName(@Arg('input', () => RunViewByNameInput) input: RunViewByNameInput, @Ctx() { providers, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
77937
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
77938
|
+
return super.RunViewByNameGeneric(input, provider, userPayload, pubSub);
|
|
77939
|
+
}
|
|
77940
|
+
|
|
77941
|
+
@Query(() => RunMJRubricVersionViewResult)
|
|
77942
|
+
async RunMJRubricVersionDynamicView(@Arg('input', () => RunDynamicViewInput) input: RunDynamicViewInput, @Ctx() { providers, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
77943
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
77944
|
+
input.EntityName = 'MJ: Rubric Versions';
|
|
77945
|
+
return super.RunDynamicViewGeneric(input, provider, userPayload, pubSub);
|
|
77946
|
+
}
|
|
77947
|
+
@Query(() => MJRubricVersion_, { nullable: true })
|
|
77948
|
+
async MJRubricVersion(@Arg('ID', () => String) ID: string, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine): Promise<MJRubricVersion_ | null> {
|
|
77949
|
+
this.CheckUserReadPermissions('MJ: Rubric Versions', userPayload);
|
|
77950
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
77951
|
+
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwRubricVersions')} WHERE ${provider.QuoteIdentifier('ID')}=${provider.BuildParameterPlaceholder(0)} ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: Rubric Versions', userPayload, EntityPermissionType.Read, 'AND');
|
|
77952
|
+
const rows = await provider.ExecuteSQL(sSQL, [ID], undefined, this.GetUserFromPayload(userPayload));
|
|
77953
|
+
const result = await this.MapFieldNamesToCodeNames('MJ: Rubric Versions', rows && rows.length > 0 ? rows[0] : null, this.GetUserFromPayload(userPayload));
|
|
77954
|
+
return result;
|
|
77955
|
+
}
|
|
77956
|
+
|
|
77957
|
+
@Mutation(() => MJRubricVersion_)
|
|
77958
|
+
async CreateMJRubricVersion(
|
|
77959
|
+
@Arg('input', () => CreateMJRubricVersionInput) input: CreateMJRubricVersionInput,
|
|
77960
|
+
@Ctx() { providers, userPayload }: AppContext,
|
|
77961
|
+
@PubSub() pubSub: PubSubEngine
|
|
77962
|
+
) {
|
|
77963
|
+
const provider = GetReadWriteProvider(providers);
|
|
77964
|
+
return this.CreateRecord('MJ: Rubric Versions', input, provider, userPayload, pubSub)
|
|
77965
|
+
}
|
|
77966
|
+
|
|
77967
|
+
@Mutation(() => MJRubricVersion_)
|
|
77968
|
+
async UpdateMJRubricVersion(
|
|
77969
|
+
@Arg('input', () => UpdateMJRubricVersionInput) input: UpdateMJRubricVersionInput,
|
|
77970
|
+
@Ctx() { providers, userPayload }: AppContext,
|
|
77971
|
+
@PubSub() pubSub: PubSubEngine
|
|
77972
|
+
) {
|
|
77973
|
+
const provider = GetReadWriteProvider(providers);
|
|
77974
|
+
return this.UpdateRecord('MJ: Rubric Versions', input, provider, userPayload, pubSub);
|
|
77975
|
+
}
|
|
77976
|
+
|
|
77977
|
+
@Mutation(() => MJRubricVersion_)
|
|
77978
|
+
async DeleteMJRubricVersion(@Arg('ID', () => String) ID: string, @Arg('options___', () => DeleteOptionsInput) options: DeleteOptionsInput, @Ctx() { providers, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
77979
|
+
const provider = GetReadWriteProvider(providers);
|
|
77980
|
+
const key = new CompositeKey([{FieldName: 'ID', Value: ID}]);
|
|
77981
|
+
return this.DeleteRecord('MJ: Rubric Versions', key, options, provider, userPayload, pubSub);
|
|
77982
|
+
}
|
|
77983
|
+
|
|
77984
|
+
}
|
|
77985
|
+
|
|
77986
|
+
//****************************************************************************
|
|
77987
|
+
// ENTITY CLASS for MJ: Rubrics
|
|
77988
|
+
//****************************************************************************
|
|
77989
|
+
@ObjectType({ description: `The stable identity of a rubric: weighted, nested criteria that records are evaluated against. The content lives in immutable, semantically versioned RubricVersion rows.` })
|
|
77990
|
+
export class MJRubric_ {
|
|
77991
|
+
@Field()
|
|
77992
|
+
@MaxLength(36)
|
|
77993
|
+
ID: string;
|
|
77994
|
+
|
|
77995
|
+
@Field({nullable: true, description: `Unique display name of the rubric.`})
|
|
77996
|
+
@MaxLength(255)
|
|
77997
|
+
Name?: string;
|
|
77998
|
+
|
|
77999
|
+
@Field({nullable: true, description: `What the rubric evaluates and when to use it.`})
|
|
78000
|
+
Description?: string;
|
|
78001
|
+
|
|
78002
|
+
@Field({nullable: true})
|
|
78003
|
+
@MaxLength(36)
|
|
78004
|
+
CategoryID?: string;
|
|
78005
|
+
|
|
78006
|
+
@Field({nullable: true, description: `Active rubrics can be assigned and evaluated against; Disabled rubrics keep their history but are not offered for new use.`})
|
|
78007
|
+
@MaxLength(20)
|
|
78008
|
+
Status?: string;
|
|
78009
|
+
|
|
78010
|
+
@Field()
|
|
78011
|
+
_mj__CreatedAt: Date;
|
|
78012
|
+
|
|
78013
|
+
@Field()
|
|
78014
|
+
_mj__UpdatedAt: Date;
|
|
78015
|
+
|
|
78016
|
+
@Field({nullable: true})
|
|
78017
|
+
@MaxLength(255)
|
|
78018
|
+
Category?: string;
|
|
78019
|
+
|
|
78020
|
+
@Field(() => [String], { nullable: true, description: `Field-level security: when non-null, the fields on this entity the calling user may read. Any other field arriving as null was withheld by the server rather than genuinely empty. Null for callers with no field restrictions.` })
|
|
78021
|
+
ReadableFields___?: string[];
|
|
78022
|
+
|
|
78023
|
+
}
|
|
78024
|
+
|
|
78025
|
+
//****************************************************************************
|
|
78026
|
+
// INPUT TYPE for MJ: Rubrics
|
|
78027
|
+
//****************************************************************************
|
|
78028
|
+
@InputType()
|
|
78029
|
+
export class CreateMJRubricInput {
|
|
78030
|
+
@Field({ nullable: true })
|
|
78031
|
+
ID?: string;
|
|
78032
|
+
|
|
78033
|
+
@Field({ nullable: true })
|
|
78034
|
+
Name?: string;
|
|
78035
|
+
|
|
78036
|
+
@Field({ nullable: true })
|
|
78037
|
+
Description: string | null;
|
|
78038
|
+
|
|
78039
|
+
@Field({ nullable: true })
|
|
78040
|
+
CategoryID: string | null;
|
|
78041
|
+
|
|
78042
|
+
@Field({ nullable: true })
|
|
78043
|
+
Status?: string;
|
|
78044
|
+
|
|
78045
|
+
@Field(() => RestoreContextInput, { nullable: true })
|
|
78046
|
+
RestoreContext___?: RestoreContextInput;
|
|
78047
|
+
}
|
|
78048
|
+
|
|
78049
|
+
|
|
78050
|
+
//****************************************************************************
|
|
78051
|
+
// INPUT TYPE for MJ: Rubrics
|
|
78052
|
+
//****************************************************************************
|
|
78053
|
+
@InputType()
|
|
78054
|
+
export class UpdateMJRubricInput {
|
|
78055
|
+
@Field()
|
|
78056
|
+
ID: string;
|
|
78057
|
+
|
|
78058
|
+
@Field({ nullable: true })
|
|
78059
|
+
Name?: string;
|
|
78060
|
+
|
|
78061
|
+
@Field({ nullable: true })
|
|
78062
|
+
Description?: string | null;
|
|
78063
|
+
|
|
78064
|
+
@Field({ nullable: true })
|
|
78065
|
+
CategoryID?: string | null;
|
|
78066
|
+
|
|
78067
|
+
@Field({ nullable: true })
|
|
78068
|
+
Status?: string;
|
|
78069
|
+
|
|
78070
|
+
@Field(() => [KeyValuePairInput], { nullable: true })
|
|
78071
|
+
OldValues___?: KeyValuePairInput[];
|
|
78072
|
+
|
|
78073
|
+
@Field(() => RestoreContextInput, { nullable: true })
|
|
78074
|
+
RestoreContext___?: RestoreContextInput;
|
|
78075
|
+
}
|
|
78076
|
+
|
|
78077
|
+
//****************************************************************************
|
|
78078
|
+
// RESOLVER for MJ: Rubrics
|
|
78079
|
+
//****************************************************************************
|
|
78080
|
+
@ObjectType()
|
|
78081
|
+
export class RunMJRubricViewResult {
|
|
78082
|
+
@Field(() => [MJRubric_])
|
|
78083
|
+
Results: MJRubric_[];
|
|
78084
|
+
|
|
78085
|
+
@Field(() => String, {nullable: true})
|
|
78086
|
+
UserViewRunID?: string;
|
|
78087
|
+
|
|
78088
|
+
@Field(() => Int, {nullable: true})
|
|
78089
|
+
RowCount: number;
|
|
78090
|
+
|
|
78091
|
+
@Field(() => Int, {nullable: true})
|
|
78092
|
+
TotalRowCount: number;
|
|
78093
|
+
|
|
78094
|
+
@Field(() => Int, {nullable: true})
|
|
78095
|
+
ExecutionTime: number;
|
|
78096
|
+
|
|
78097
|
+
@Field({nullable: true})
|
|
78098
|
+
ErrorMessage?: string;
|
|
78099
|
+
|
|
78100
|
+
@Field(() => Boolean, {nullable: false})
|
|
78101
|
+
Success: boolean;
|
|
78102
|
+
}
|
|
78103
|
+
|
|
78104
|
+
@Resolver(MJRubric_)
|
|
78105
|
+
export class MJRubricResolver extends ResolverBase {
|
|
78106
|
+
@Query(() => RunMJRubricViewResult)
|
|
78107
|
+
async RunMJRubricViewByID(@Arg('input', () => RunViewByIDInput) input: RunViewByIDInput, @Ctx() { providers, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
78108
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
78109
|
+
return super.RunViewByIDGeneric(input, provider, userPayload, pubSub);
|
|
78110
|
+
}
|
|
78111
|
+
|
|
78112
|
+
@Query(() => RunMJRubricViewResult)
|
|
78113
|
+
async RunMJRubricViewByName(@Arg('input', () => RunViewByNameInput) input: RunViewByNameInput, @Ctx() { providers, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
78114
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
78115
|
+
return super.RunViewByNameGeneric(input, provider, userPayload, pubSub);
|
|
78116
|
+
}
|
|
78117
|
+
|
|
78118
|
+
@Query(() => RunMJRubricViewResult)
|
|
78119
|
+
async RunMJRubricDynamicView(@Arg('input', () => RunDynamicViewInput) input: RunDynamicViewInput, @Ctx() { providers, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
78120
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
78121
|
+
input.EntityName = 'MJ: Rubrics';
|
|
78122
|
+
return super.RunDynamicViewGeneric(input, provider, userPayload, pubSub);
|
|
78123
|
+
}
|
|
78124
|
+
@Query(() => MJRubric_, { nullable: true })
|
|
78125
|
+
async MJRubric(@Arg('ID', () => String) ID: string, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine): Promise<MJRubric_ | null> {
|
|
78126
|
+
this.CheckUserReadPermissions('MJ: Rubrics', userPayload);
|
|
78127
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
78128
|
+
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwRubrics')} WHERE ${provider.QuoteIdentifier('ID')}=${provider.BuildParameterPlaceholder(0)} ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: Rubrics', userPayload, EntityPermissionType.Read, 'AND');
|
|
78129
|
+
const rows = await provider.ExecuteSQL(sSQL, [ID], undefined, this.GetUserFromPayload(userPayload));
|
|
78130
|
+
const result = await this.MapFieldNamesToCodeNames('MJ: Rubrics', rows && rows.length > 0 ? rows[0] : null, this.GetUserFromPayload(userPayload));
|
|
78131
|
+
return result;
|
|
78132
|
+
}
|
|
78133
|
+
|
|
78134
|
+
@Mutation(() => MJRubric_)
|
|
78135
|
+
async CreateMJRubric(
|
|
78136
|
+
@Arg('input', () => CreateMJRubricInput) input: CreateMJRubricInput,
|
|
78137
|
+
@Ctx() { providers, userPayload }: AppContext,
|
|
78138
|
+
@PubSub() pubSub: PubSubEngine
|
|
78139
|
+
) {
|
|
78140
|
+
const provider = GetReadWriteProvider(providers);
|
|
78141
|
+
return this.CreateRecord('MJ: Rubrics', input, provider, userPayload, pubSub)
|
|
78142
|
+
}
|
|
78143
|
+
|
|
78144
|
+
@Mutation(() => MJRubric_)
|
|
78145
|
+
async UpdateMJRubric(
|
|
78146
|
+
@Arg('input', () => UpdateMJRubricInput) input: UpdateMJRubricInput,
|
|
78147
|
+
@Ctx() { providers, userPayload }: AppContext,
|
|
78148
|
+
@PubSub() pubSub: PubSubEngine
|
|
78149
|
+
) {
|
|
78150
|
+
const provider = GetReadWriteProvider(providers);
|
|
78151
|
+
return this.UpdateRecord('MJ: Rubrics', input, provider, userPayload, pubSub);
|
|
78152
|
+
}
|
|
78153
|
+
|
|
78154
|
+
@Mutation(() => MJRubric_)
|
|
78155
|
+
async DeleteMJRubric(@Arg('ID', () => String) ID: string, @Arg('options___', () => DeleteOptionsInput) options: DeleteOptionsInput, @Ctx() { providers, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
78156
|
+
const provider = GetReadWriteProvider(providers);
|
|
78157
|
+
const key = new CompositeKey([{FieldName: 'ID', Value: ID}]);
|
|
78158
|
+
return this.DeleteRecord('MJ: Rubrics', key, options, provider, userPayload, pubSub);
|
|
78159
|
+
}
|
|
78160
|
+
|
|
78161
|
+
}
|
|
78162
|
+
|
|
74530
78163
|
//****************************************************************************
|
|
74531
78164
|
// ENTITY CLASS for MJ: SQL Dialects
|
|
74532
78165
|
//****************************************************************************
|
|
@@ -83356,7 +86989,7 @@ export class MJTemplateResolver extends ResolverBase {
|
|
|
83356
86989
|
//****************************************************************************
|
|
83357
86990
|
// ENTITY CLASS for MJ: Test Rubrics
|
|
83358
86991
|
//****************************************************************************
|
|
83359
|
-
@ObjectType({ description: `
|
|
86992
|
+
@ObjectType({ description: `DEPRECATED: superseded by MJ: Rubrics (Rubric, RubricVersion, RubricCriterion). This entity was never read by the test engine, links to nothing and has no seed rows; it is scheduled for removal in the next major version. Assign a rubric to a test with Test.RubricID or TestSuite.RubricID instead. See plans/rubrics/RUBRICS_PLAN.md.` })
|
|
83360
86993
|
export class MJTestRubric_ {
|
|
83361
86994
|
@Field()
|
|
83362
86995
|
@MaxLength(36)
|
|
@@ -84707,6 +88340,9 @@ export class MJTestSuiteRun_ {
|
|
|
84707
88340
|
@Field({nullable: true, description: `JSON object containing the variable values provided at suite run level. These values were applied to all tests in the suite run and can be seen on individual TestRun.ResolvedVariables with source="suite".`})
|
|
84708
88341
|
ResolvedVariables?: string;
|
|
84709
88342
|
|
|
88343
|
+
@Field(() => Float, {nullable: true, description: `Suite-level score (0..1): the mean score of the suite's executed (non-skipped) test runs.`})
|
|
88344
|
+
Score?: number;
|
|
88345
|
+
|
|
84710
88346
|
@Field({nullable: true})
|
|
84711
88347
|
@MaxLength(255)
|
|
84712
88348
|
Suite?: string;
|
|
@@ -84806,6 +88442,9 @@ export class CreateMJTestSuiteRunInput {
|
|
|
84806
88442
|
@Field({ nullable: true })
|
|
84807
88443
|
ResolvedVariables: string | null;
|
|
84808
88444
|
|
|
88445
|
+
@Field(() => Float, { nullable: true })
|
|
88446
|
+
Score: number | null;
|
|
88447
|
+
|
|
84809
88448
|
@Field(() => RestoreContextInput, { nullable: true })
|
|
84810
88449
|
RestoreContext___?: RestoreContextInput;
|
|
84811
88450
|
}
|
|
@@ -84897,6 +88536,9 @@ export class UpdateMJTestSuiteRunInput {
|
|
|
84897
88536
|
@Field({ nullable: true })
|
|
84898
88537
|
ResolvedVariables?: string | null;
|
|
84899
88538
|
|
|
88539
|
+
@Field(() => Float, { nullable: true })
|
|
88540
|
+
Score?: number | null;
|
|
88541
|
+
|
|
84900
88542
|
@Field(() => [KeyValuePairInput], { nullable: true })
|
|
84901
88543
|
OldValues___?: KeyValuePairInput[];
|
|
84902
88544
|
|
|
@@ -85222,10 +88864,18 @@ export class MJTestSuite_ {
|
|
|
85222
88864
|
@Field({nullable: true, description: `JSON object containing variable values to apply to all tests in this suite. These values override test-level defaults but can be overridden by run-level values.`})
|
|
85223
88865
|
Variables?: string;
|
|
85224
88866
|
|
|
88867
|
+
@Field({nullable: true, description: `Default rubric for tests in this suite and its child suites that do not name their own.`})
|
|
88868
|
+
@MaxLength(36)
|
|
88869
|
+
RubricID?: string;
|
|
88870
|
+
|
|
85225
88871
|
@Field({nullable: true})
|
|
85226
88872
|
@MaxLength(255)
|
|
85227
88873
|
Parent?: string;
|
|
85228
88874
|
|
|
88875
|
+
@Field({nullable: true})
|
|
88876
|
+
@MaxLength(255)
|
|
88877
|
+
Rubric?: string;
|
|
88878
|
+
|
|
85229
88879
|
@Field({nullable: true})
|
|
85230
88880
|
@MaxLength(36)
|
|
85231
88881
|
RootParentID?: string;
|
|
@@ -85279,6 +88929,9 @@ export class CreateMJTestSuiteInput {
|
|
|
85279
88929
|
@Field({ nullable: true })
|
|
85280
88930
|
Variables: string | null;
|
|
85281
88931
|
|
|
88932
|
+
@Field({ nullable: true })
|
|
88933
|
+
RubricID: string | null;
|
|
88934
|
+
|
|
85282
88935
|
@Field(() => RestoreContextInput, { nullable: true })
|
|
85283
88936
|
RestoreContext___?: RestoreContextInput;
|
|
85284
88937
|
}
|
|
@@ -85316,6 +88969,9 @@ export class UpdateMJTestSuiteInput {
|
|
|
85316
88969
|
@Field({ nullable: true })
|
|
85317
88970
|
Variables?: string | null;
|
|
85318
88971
|
|
|
88972
|
+
@Field({ nullable: true })
|
|
88973
|
+
RubricID?: string | null;
|
|
88974
|
+
|
|
85319
88975
|
@Field(() => [KeyValuePairInput], { nullable: true })
|
|
85320
88976
|
OldValues___?: KeyValuePairInput[];
|
|
85321
88977
|
|
|
@@ -85651,10 +89307,18 @@ export class MJTest_ {
|
|
|
85651
89307
|
@Field({nullable: true, description: `JSON configuration for which test type variables are exposed by this test, along with test-level defaults, locks, and value restrictions. References variables defined in the parent TestType.VariablesSchema.`})
|
|
85652
89308
|
Variables?: string;
|
|
85653
89309
|
|
|
89310
|
+
@Field({nullable: true, description: `The rubric this test's output is judged by. NULL = inherit from the suite (walking up ParentID). The latest published version is pinned when each run starts.`})
|
|
89311
|
+
@MaxLength(36)
|
|
89312
|
+
RubricID?: string;
|
|
89313
|
+
|
|
85654
89314
|
@Field({nullable: true})
|
|
85655
89315
|
@MaxLength(100)
|
|
85656
89316
|
Type?: string;
|
|
85657
89317
|
|
|
89318
|
+
@Field({nullable: true})
|
|
89319
|
+
@MaxLength(255)
|
|
89320
|
+
Rubric?: string;
|
|
89321
|
+
|
|
85658
89322
|
@Field(() => [String], { nullable: true, description: `Field-level security: when non-null, the fields on this entity the calling user may read. Any other field arriving as null was withheld by the server rather than genuinely empty. Null for callers with no field restrictions.` })
|
|
85659
89323
|
ReadableFields___?: string[];
|
|
85660
89324
|
|
|
@@ -85710,6 +89374,9 @@ export class CreateMJTestInput {
|
|
|
85710
89374
|
@Field({ nullable: true })
|
|
85711
89375
|
Variables: string | null;
|
|
85712
89376
|
|
|
89377
|
+
@Field({ nullable: true })
|
|
89378
|
+
RubricID: string | null;
|
|
89379
|
+
|
|
85713
89380
|
@Field(() => RestoreContextInput, { nullable: true })
|
|
85714
89381
|
RestoreContext___?: RestoreContextInput;
|
|
85715
89382
|
}
|
|
@@ -85765,6 +89432,9 @@ export class UpdateMJTestInput {
|
|
|
85765
89432
|
@Field({ nullable: true })
|
|
85766
89433
|
Variables?: string | null;
|
|
85767
89434
|
|
|
89435
|
+
@Field({ nullable: true })
|
|
89436
|
+
RubricID?: string | null;
|
|
89437
|
+
|
|
85768
89438
|
@Field(() => [KeyValuePairInput], { nullable: true })
|
|
85769
89439
|
OldValues___?: KeyValuePairInput[];
|
|
85770
89440
|
|