@memberjunction/server 5.41.0 → 5.43.0
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/agentSessions/SessionJanitor.d.ts.map +1 -1
- package/dist/agentSessions/SessionJanitor.js +5 -1
- package/dist/agentSessions/SessionJanitor.js.map +1 -1
- package/dist/agentSessions/SessionManager.d.ts +15 -2
- package/dist/agentSessions/SessionManager.d.ts.map +1 -1
- package/dist/agentSessions/SessionManager.js +50 -11
- package/dist/agentSessions/SessionManager.js.map +1 -1
- package/dist/agentSessions/index.d.ts +1 -0
- package/dist/agentSessions/index.d.ts.map +1 -1
- package/dist/agentSessions/index.js +5 -0
- package/dist/agentSessions/index.js.map +1 -1
- package/dist/agentSessions/remoteBrowserGoalEngine.d.ts +102 -0
- package/dist/agentSessions/remoteBrowserGoalEngine.d.ts.map +1 -0
- package/dist/agentSessions/remoteBrowserGoalEngine.js +164 -0
- package/dist/agentSessions/remoteBrowserGoalEngine.js.map +1 -0
- package/dist/agentSessions/remoteBrowserGoalRegistry.d.ts +66 -0
- package/dist/agentSessions/remoteBrowserGoalRegistry.d.ts.map +1 -0
- package/dist/agentSessions/remoteBrowserGoalRegistry.js +86 -0
- package/dist/agentSessions/remoteBrowserGoalRegistry.js.map +1 -0
- package/dist/auth/initializeProviders.d.ts.map +1 -1
- package/dist/auth/initializeProviders.js +4 -7
- package/dist/auth/initializeProviders.js.map +1 -1
- package/dist/config.d.ts +7 -0
- package/dist/config.d.ts.map +1 -1
- package/dist/config.js +12 -2
- package/dist/config.js.map +1 -1
- package/dist/generated/generated.d.ts +612 -0
- package/dist/generated/generated.d.ts.map +1 -1
- package/dist/generated/generated.js +6934 -3626
- package/dist/generated/generated.js.map +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +38 -17
- package/dist/index.js.map +1 -1
- package/dist/integration/CustomColumnPromoter.d.ts +108 -0
- package/dist/integration/CustomColumnPromoter.d.ts.map +1 -0
- package/dist/integration/CustomColumnPromoter.js +508 -0
- package/dist/integration/CustomColumnPromoter.js.map +1 -0
- package/dist/logging/StartupLogger.d.ts +57 -1
- package/dist/logging/StartupLogger.d.ts.map +1 -1
- package/dist/logging/StartupLogger.js +115 -6
- package/dist/logging/StartupLogger.js.map +1 -1
- package/dist/resolvers/ExecuteRemoteOperationResolver.d.ts +46 -0
- package/dist/resolvers/ExecuteRemoteOperationResolver.d.ts.map +1 -0
- package/dist/resolvers/ExecuteRemoteOperationResolver.js +192 -0
- package/dist/resolvers/ExecuteRemoteOperationResolver.js.map +1 -0
- package/dist/resolvers/IntegrationDiscoveryResolver.d.ts +101 -1
- package/dist/resolvers/IntegrationDiscoveryResolver.d.ts.map +1 -1
- package/dist/resolvers/IntegrationDiscoveryResolver.js +629 -58
- package/dist/resolvers/IntegrationDiscoveryResolver.js.map +1 -1
- package/dist/resolvers/RealtimeBridgeResolver.d.ts +130 -0
- package/dist/resolvers/RealtimeBridgeResolver.d.ts.map +1 -0
- package/dist/resolvers/RealtimeBridgeResolver.js +580 -0
- package/dist/resolvers/RealtimeBridgeResolver.js.map +1 -0
- package/dist/resolvers/RemoteBrowserActionResolver.d.ts +78 -5
- package/dist/resolvers/RemoteBrowserActionResolver.d.ts.map +1 -1
- package/dist/resolvers/RemoteBrowserActionResolver.js +227 -15
- package/dist/resolvers/RemoteBrowserActionResolver.js.map +1 -1
- package/dist/resolvers/RunAIAgentResolver.d.ts.map +1 -1
- package/dist/resolvers/RunAIAgentResolver.js +0 -7
- package/dist/resolvers/RunAIAgentResolver.js.map +1 -1
- package/dist/resolvers/RunTemplateResolver.d.ts +8 -0
- package/dist/resolvers/RunTemplateResolver.d.ts.map +1 -1
- package/dist/resolvers/RunTemplateResolver.js +8 -0
- package/dist/resolvers/RunTemplateResolver.js.map +1 -1
- package/dist/rest/setupRESTEndpoints.d.ts.map +1 -1
- package/dist/rest/setupRESTEndpoints.js +5 -3
- package/dist/rest/setupRESTEndpoints.js.map +1 -1
- package/package.json +83 -78
- package/src/__tests__/RealtimeBridgeResolver.test.ts +100 -0
- package/src/__tests__/RemoteBrowserAudioStream.test.ts +8 -1
- package/src/__tests__/RemoteBrowserGoalEngine.test.ts +144 -0
- package/src/__tests__/remoteBrowserGoalRegistry.test.ts +81 -0
- package/src/agentSessions/SessionJanitor.ts +15 -1
- package/src/agentSessions/SessionManager.ts +59 -10
- package/src/agentSessions/index.ts +5 -0
- package/src/agentSessions/remoteBrowserGoalEngine.ts +191 -0
- package/src/agentSessions/remoteBrowserGoalRegistry.ts +122 -0
- package/src/auth/initializeProviders.ts +4 -7
- package/src/config.ts +13 -2
- package/src/generated/generated.ts +2502 -198
- package/src/index.ts +38 -17
- package/src/integration/CustomColumnPromoter.ts +597 -0
- package/src/logging/StartupLogger.ts +130 -6
- package/src/resolvers/ExecuteRemoteOperationResolver.ts +164 -0
- package/src/resolvers/IntegrationDiscoveryResolver.ts +490 -53
- package/src/resolvers/RealtimeBridgeResolver.ts +493 -0
- package/src/resolvers/RemoteBrowserActionResolver.ts +232 -17
- package/src/resolvers/RunAIAgentResolver.ts +1 -9
- package/src/resolvers/RunTemplateResolver.ts +8 -0
- package/src/rest/setupRESTEndpoints.ts +5 -3
|
@@ -18,7 +18,7 @@ import { mj_core_schema } from '../config.js';
|
|
|
18
18
|
|
|
19
19
|
|
|
20
20
|
|
|
21
|
-
import { MJAccessControlRuleEntity, MJActionAuthorizationEntity, MJActionCategoryEntity, MJActionContextTypeEntity, MJActionContextEntity, MJActionExecutionLogEntity, MJActionFilterEntity, MJActionLibraryEntity, MJActionParamEntity, MJActionResultCodeEntity, MJActionEntity, MJAIActionEntity, MJAIAgentActionEntity, MJAIAgentArtifactTypeEntity, MJAIAgentCategoryEntity, MJAIAgentChannelEntity, MJAIAgentClientToolEntity, MJAIAgentCoAgentEntity, MJAIAgentConfigurationEntity, MJAIAgentDataSourceEntity, MJAIAgentExampleEntity, MJAIAgentLearningCycleEntity, MJAIAgentModalityEntity, MJAIAgentModelEntity, MJAIAgentNoteTypeEntity, MJAIAgentNoteEntity, MJAIAgentPermissionEntity, MJAIAgentPromptEntity, MJAIAgentRelationshipEntity, MJAIAgentRequestTypeEntity, MJAIAgentRequestEntity, MJAIAgentRunMediaEntity, MJAIAgentRunStepEntity, MJAIAgentRunEntity, MJAIAgentSearchScopeEntity, MJAIAgentSessionBridgeParticipantEntity, MJAIAgentSessionBridgeEntity, MJAIAgentSessionChannelEntity, MJAIAgentSessionEntity, MJAIAgentStepPathEntity, MJAIAgentStepEntity, MJAIAgentTypeEntity, MJAIAgentEntity, MJAIArchitectureEntity, MJAIBridgeAgentIdentityEntity, MJAIBridgeProviderChannelEntity, MJAIBridgeProviderEntity, MJAIClientToolDefinitionEntity, MJAIConfigurationParamEntity, MJAIConfigurationEntity, MJAICredentialBindingEntity, MJAIModalityEntity, MJAIModelActionEntity, MJAIModelArchitectureEntity, MJAIModelCostEntity, MJAIModelModalityEntity, MJAIModelPriceTypeEntity, MJAIModelPriceUnitTypeEntity, MJAIModelTypeEntity, MJAIModelVendorEntity, MJAIModelEntity, MJAIPromptCategoryEntity, MJAIPromptModelEntity, MJAIPromptRunMediaEntity, MJAIPromptRunEntity, MJAIPromptTypeEntity, MJAIPromptEntity, MJAIRemoteBrowserProviderEntity, MJAIResultCacheEntity, MJAIVendorTypeDefinitionEntity, MJAIVendorTypeEntity, MJAIVendorEntity, MJAPIApplicationScopeEntity, MJAPIApplicationEntity, MJAPIKeyApplicationEntity, MJAPIKeyScopeEntity, MJAPIKeyUsageLogEntity, MJAPIKeyEntity, MJAPIScopeEntity, MJApplicationEntityEntity, MJApplicationRoleEntity, MJApplicationSettingEntity, MJApplicationEntity, MJArchiveConfigurationEntityEntity, MJArchiveConfigurationEntity, MJArchiveRunDetailEntity, MJArchiveRunEntity, MJArtifactPermissionEntity, MJArtifactTypeEntity, MJArtifactUseEntity, MJArtifactVersionAttributeEntity, MJArtifactVersionEntity, MJArtifactEntity, MJAuditLogTypeEntity, MJAuditLogEntity, 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, MJContentItemDuplicateEntity, MJContentItemTagEntity, MJContentItemEntity, MJContentProcessRunDetailEntity, MJContentProcessRunPromptRunEntity, MJContentProcessRunEntity, MJContentSourceParamEntity, MJContentSourceTypeParamEntity, MJContentSourceTypeEntity, MJContentSourceEntity, MJContentTypeAttributeEntity, MJContentTypeEntity, MJConversationArtifactPermissionEntity, MJConversationArtifactVersionEntity, MJConversationArtifactEntity, MJConversationDetailArtifactEntity, MJConversationDetailAttachmentEntity, MJConversationDetailRatingEntity, MJConversationDetailEntity, 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, MJEntityActionFilterEntity, MJEntityActionInvocationTypeEntity, MJEntityActionInvocationEntity, MJEntityActionParamEntity, MJEntityActionEntity, MJEntityAIActionEntity, MJEntityCommunicationFieldEntity, MJEntityCommunicationMessageTypeEntity, MJEntityDocumentRunEntity, MJEntityDocumentSettingEntity, MJEntityDocumentTypeEntity, MJEntityDocumentEntity, MJEntityFieldValueEntity, MJEntityFieldEntity, MJEntityFormOverrideEntity, MJEntityOrganicKeyRelatedEntityEntity, MJEntityOrganicKeyEntity, MJEntityPermissionEntity, MJEntityRecordDocumentEntity, MJEntityRelationshipDisplayComponentEntity, MJEntityRelationshipEntity, MJEntitySettingEntity, MJEnvironmentEntity, MJErrorLogEntity, MJExplorerNavigationItemEntity, MJFileCategoryEntity, MJFileEntityRecordLinkEntity, MJFileStorageAccountPermissionEntity, MJFileStorageAccountEntity, MJFileStorageProviderEntity, MJFileEntity, MJGeneratedCodeCategoryEntity, MJGeneratedCodeEntity, MJInstanceConfigurationEntity, MJIntegrationObjectFieldEntity, MJIntegrationObjectEntity, MJIntegrationSourceTypeEntity, MJIntegrationURLFormatEntity, MJIntegrationEntity, MJKnowledgeHubSavedSearchEntity, MJLibraryEntity, MJLibraryItemEntity, MJListCategoryEntity, MJListDetailEntity, MJListInvitationEntity, MJListShareEntity, MJListEntity, MJMagicLinkInviteAllowedDomainEntity, MJMagicLinkInviteAllowedPathEntity, MJMagicLinkInviteApplicationEntity, MJMagicLinkInviteRoleEntity, MJMagicLinkInviteEntity, MJMagicLinkRedemptionEntity, MJMCPServerConnectionPermissionEntity, MJMCPServerConnectionToolEntity, MJMCPServerConnectionEntity, MJMCPServerToolEntity, MJMCPServerEntity, MJMCPToolExecutionLogEntity, MJMCPToolFavoriteEntity, MJOAuthAuthServerMetadataCacheEntity, MJOAuthAuthorizationStateEntity, MJOAuthClientRegistrationEntity, MJOAuthTokenEntity, MJOpenAppDependencyEntity, MJOpenAppInstallHistoryEntity, MJOpenAppEntity, MJOutputDeliveryTypeEntity, MJOutputFormatTypeEntity, MJOutputTriggerTypeEntity, MJPermissionDomainEntity, MJProjectEntity, MJPublicLinkEntity, MJQueryEntity, MJQueryCategoryEntity, MJQueryDependencyEntity, MJQueryEntityEntity, MJQueryFieldEntity, MJQueryParameterEntity, MJQueryPermissionEntity, MJQuerySQLEntity, MJQueueTaskEntity, MJQueueTypeEntity, MJQueueEntity, MJRecommendationItemEntity, MJRecommendationProviderEntity, MJRecommendationRunEntity, MJRecommendationEntity, MJRecordChangeReplayRunEntity, MJRecordChangeEntity, MJRecordGeoCodeEntity, MJRecordLinkEntity, MJRecordMergeDeletionLogEntity, MJRecordMergeLogEntity, MJReportCategoryEntity, MJReportSnapshotEntity, MJReportUserStateEntity, MJReportVersionEntity, MJReportEntity, MJResourceLinkEntity, MJResourcePermissionEntity, MJResourceTypeEntity, MJRoleEntity, MJRowLevelSecurityFilterEntity, MJScheduledActionParamEntity, MJScheduledActionEntity, MJScheduledJobRunEntity, MJScheduledJobTypeEntity, MJScheduledJobEntity, MJSchemaInfoEntity, MJSearchExecutionLogEntity, MJSearchProviderEntity, MJSearchScopeEntityEntity, MJSearchScopeExternalIndexEntity, MJSearchScopePermissionEntity, MJSearchScopeProviderEntity, MJSearchScopeStorageAccountEntity, MJSearchScopeTestQueryEntity, MJSearchScopeEntity, MJSignatureAccountEntity, MJSignatureProviderEntity, MJSignatureRequestDocumentEntity, MJSignatureRequestLogEntity, MJSignatureRequestRecipientEntity, MJSignatureRequestEntity, MJSkillEntity, MJSQLDialectEntity, 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, MJUserApplicationEntityEntity, MJUserApplicationEntity, MJUserFavoriteEntity, MJUserNotificationPreferenceEntity, MJUserNotificationTypeEntity, MJUserNotificationEntity, MJUserRecordLogEntity, MJUserRoleEntity, MJUserSettingEntity, MJUserViewCategoryEntity, MJUserViewRunDetailEntity, MJUserViewRunEntity, MJUserViewEntity, MJUserEntity, MJVectorDatabaseEntity, MJVectorIndexEntity, MJVersionInstallationEntity, MJVersionLabelItemEntity, MJVersionLabelRestoreEntity, MJVersionLabelEntity, MJViewTypeEntity, MJWorkflowEngineEntity, MJWorkflowRunEntity, MJWorkflowEntity, MJWorkspaceItemEntity, MJWorkspaceEntity } from '@memberjunction/core-entities';
|
|
21
|
+
import { MJAccessControlRuleEntity, MJActionAuthorizationEntity, MJActionCategoryEntity, MJActionContextTypeEntity, MJActionContextEntity, MJActionExecutionLogEntity, MJActionFilterEntity, MJActionLibraryEntity, MJActionParamEntity, MJActionResultCodeEntity, MJActionEntity, MJAIActionEntity, MJAIAgentActionEntity, MJAIAgentArtifactTypeEntity, MJAIAgentCategoryEntity, MJAIAgentChannelEntity, MJAIAgentClientToolEntity, MJAIAgentCoAgentEntity, MJAIAgentConfigurationEntity, MJAIAgentDataSourceEntity, MJAIAgentExampleEntity, MJAIAgentLearningCycleEntity, MJAIAgentModalityEntity, MJAIAgentModelEntity, MJAIAgentNoteTypeEntity, MJAIAgentNoteEntity, MJAIAgentPermissionEntity, MJAIAgentPromptEntity, MJAIAgentRelationshipEntity, MJAIAgentRequestTypeEntity, MJAIAgentRequestEntity, MJAIAgentRunMediaEntity, MJAIAgentRunStepEntity, MJAIAgentRunEntity, MJAIAgentSearchScopeEntity, MJAIAgentSessionBridgeParticipantEntity, MJAIAgentSessionBridgeEntity, MJAIAgentSessionChannelEntity, MJAIAgentSessionEntity, MJAIAgentStepPathEntity, MJAIAgentStepEntity, MJAIAgentTypeEntity, MJAIAgentEntity, MJAIArchitectureEntity, MJAIBridgeAgentIdentityEntity, MJAIBridgeProviderChannelEntity, MJAIBridgeProviderEntity, MJAIClientToolDefinitionEntity, MJAIConfigurationParamEntity, MJAIConfigurationEntity, MJAICredentialBindingEntity, MJAIModalityEntity, MJAIModelActionEntity, MJAIModelArchitectureEntity, MJAIModelCostEntity, MJAIModelModalityEntity, MJAIModelPriceTypeEntity, MJAIModelPriceUnitTypeEntity, MJAIModelTypeEntity, MJAIModelVendorEntity, MJAIModelEntity, MJAIPromptCategoryEntity, MJAIPromptModelEntity, MJAIPromptRunMediaEntity, MJAIPromptRunEntity, MJAIPromptTypeEntity, MJAIPromptEntity, MJAIRemoteBrowserProviderEntity, MJAIResultCacheEntity, MJAIVendorTypeDefinitionEntity, MJAIVendorTypeEntity, MJAIVendorEntity, MJAPIApplicationScopeEntity, MJAPIApplicationEntity, MJAPIKeyApplicationEntity, MJAPIKeyScopeEntity, MJAPIKeyUsageLogEntity, MJAPIKeyEntity, MJAPIScopeEntity, MJApplicationEntityEntity, MJApplicationRoleEntity, MJApplicationSettingEntity, MJApplicationEntity, MJArchiveConfigurationEntityEntity, MJArchiveConfigurationEntity, MJArchiveRunDetailEntity, MJArchiveRunEntity, MJArtifactPermissionEntity, MJArtifactTypeEntity, MJArtifactUseEntity, MJArtifactVersionAttributeEntity, MJArtifactVersionEntity, MJArtifactEntity, MJAuditLogTypeEntity, MJAuditLogEntity, 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, MJContentItemDuplicateEntity, MJContentItemTagEntity, MJContentItemEntity, MJContentProcessRunDetailEntity, MJContentProcessRunPromptRunEntity, MJContentProcessRunEntity, MJContentSourceParamEntity, MJContentSourceTypeParamEntity, MJContentSourceTypeEntity, MJContentSourceEntity, MJContentTypeAttributeEntity, MJContentTypeEntity, MJConversationArtifactPermissionEntity, MJConversationArtifactVersionEntity, MJConversationArtifactEntity, MJConversationDetailArtifactEntity, MJConversationDetailAttachmentEntity, MJConversationDetailRatingEntity, MJConversationDetailEntity, 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, MJEntityActionFilterEntity, MJEntityActionInvocationTypeEntity, MJEntityActionInvocationEntity, MJEntityActionParamEntity, MJEntityActionEntity, MJEntityAIActionEntity, MJEntityCommunicationFieldEntity, MJEntityCommunicationMessageTypeEntity, MJEntityDocumentRunEntity, MJEntityDocumentSettingEntity, MJEntityDocumentTypeEntity, MJEntityDocumentEntity, MJEntityFieldValueEntity, MJEntityFieldEntity, MJEntityFormOverrideEntity, MJEntityOrganicKeyRelatedEntityEntity, MJEntityOrganicKeyEntity, MJEntityPermissionEntity, MJEntityRecordDocumentEntity, MJEntityRelationshipDisplayComponentEntity, MJEntityRelationshipEntity, MJEntitySettingEntity, MJEnvironmentEntity, MJErrorLogEntity, MJExplorerNavigationItemEntity, MJFileCategoryEntity, MJFileEntityRecordLinkEntity, MJFileStorageAccountPermissionEntity, MJFileStorageAccountEntity, MJFileStorageProviderEntity, MJFileEntity, MJGeneratedCodeCategoryEntity, MJGeneratedCodeEntity, MJInstanceConfigurationEntity, MJIntegrationObjectFieldEntity, MJIntegrationObjectEntity, MJIntegrationSourceTypeEntity, MJIntegrationURLFormatEntity, MJIntegrationEntity, MJKnowledgeHubSavedSearchEntity, MJLibraryEntity, MJLibraryItemEntity, MJListCategoryEntity, MJListDetailEntity, MJListInvitationEntity, MJListShareEntity, MJListEntity, MJMagicLinkInviteAllowedDomainEntity, MJMagicLinkInviteAllowedPathEntity, MJMagicLinkInviteApplicationEntity, MJMagicLinkInviteRoleEntity, MJMagicLinkInviteEntity, MJMagicLinkRedemptionEntity, MJMCPServerConnectionPermissionEntity, MJMCPServerConnectionToolEntity, MJMCPServerConnectionEntity, MJMCPServerToolEntity, MJMCPServerEntity, MJMCPToolExecutionLogEntity, MJMCPToolFavoriteEntity, MJOAuthAuthServerMetadataCacheEntity, MJOAuthAuthorizationStateEntity, MJOAuthClientRegistrationEntity, MJOAuthTokenEntity, MJOpenAppDependencyEntity, MJOpenAppInstallHistoryEntity, MJOpenAppEntity, MJOutputDeliveryTypeEntity, MJOutputFormatTypeEntity, MJOutputTriggerTypeEntity, MJPermissionDomainEntity, MJProcessRunDetailEntity, MJProcessRunEntity, MJProjectEntity, MJPublicLinkEntity, MJQueryEntity, MJQueryCategoryEntity, MJQueryDependencyEntity, MJQueryEntityEntity, MJQueryFieldEntity, MJQueryParameterEntity, MJQueryPermissionEntity, MJQuerySQLEntity, MJQueueTaskEntity, MJQueueTypeEntity, MJQueueEntity, MJRecommendationItemEntity, MJRecommendationProviderEntity, MJRecommendationRunEntity, MJRecommendationEntity, MJRecordChangeReplayRunEntity, MJRecordChangeEntity, MJRecordGeoCodeEntity, MJRecordLinkEntity, MJRecordMergeDeletionLogEntity, MJRecordMergeLogEntity, MJRecordProcessCategoryEntity, MJRecordProcessWatermarkEntity, MJRecordProcessEntity, MJRemoteOperationCategoryEntity, MJRemoteOperationEntity, MJReportCategoryEntity, MJReportSnapshotEntity, MJReportUserStateEntity, MJReportVersionEntity, MJReportEntity, MJResourceLinkEntity, MJResourcePermissionEntity, MJResourceTypeEntity, MJRoleEntity, MJRowLevelSecurityFilterEntity, MJScheduledActionParamEntity, MJScheduledActionEntity, MJScheduledJobRunEntity, MJScheduledJobTypeEntity, MJScheduledJobEntity, MJSchemaInfoEntity, MJSearchExecutionLogEntity, MJSearchProviderEntity, MJSearchScopeEntityEntity, MJSearchScopeExternalIndexEntity, MJSearchScopePermissionEntity, MJSearchScopeProviderEntity, MJSearchScopeStorageAccountEntity, MJSearchScopeTestQueryEntity, MJSearchScopeEntity, MJSignatureAccountEntity, MJSignatureProviderEntity, MJSignatureRequestDocumentEntity, MJSignatureRequestLogEntity, MJSignatureRequestRecipientEntity, MJSignatureRequestEntity, MJSkillEntity, MJSQLDialectEntity, 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, MJUserApplicationEntityEntity, MJUserApplicationEntity, MJUserFavoriteEntity, MJUserNotificationPreferenceEntity, MJUserNotificationTypeEntity, MJUserNotificationEntity, MJUserRecordLogEntity, MJUserRoleEntity, MJUserSettingEntity, MJUserViewCategoryEntity, MJUserViewRunDetailEntity, MJUserViewRunEntity, MJUserViewEntity, MJUserEntity, MJVectorDatabaseEntity, MJVectorIndexEntity, MJVersionInstallationEntity, MJVersionLabelItemEntity, MJVersionLabelRestoreEntity, MJVersionLabelEntity, MJViewTypeEntity, MJWorkflowEngineEntity, MJWorkflowRunEntity, MJWorkflowEntity, MJWorkspaceItemEntity, MJWorkspaceEntity } from '@memberjunction/core-entities';
|
|
22
22
|
|
|
23
23
|
|
|
24
24
|
//****************************************************************************
|
|
@@ -1031,6 +1031,9 @@ export class MJActionExecutionLog_ {
|
|
|
1031
1031
|
@MaxLength(100)
|
|
1032
1032
|
User: string;
|
|
1033
1033
|
|
|
1034
|
+
@Field(() => [MJProcessRunDetail_])
|
|
1035
|
+
MJProcessRunDetails_ActionExecutionLogIDArray: MJProcessRunDetail_[]; // Link to MJProcessRunDetails
|
|
1036
|
+
|
|
1034
1037
|
}
|
|
1035
1038
|
|
|
1036
1039
|
//****************************************************************************
|
|
@@ -1166,6 +1169,16 @@ export class MJActionExecutionLogResolver extends ResolverBase {
|
|
|
1166
1169
|
return result;
|
|
1167
1170
|
}
|
|
1168
1171
|
|
|
1172
|
+
@FieldResolver(() => [MJProcessRunDetail_])
|
|
1173
|
+
async MJProcessRunDetails_ActionExecutionLogIDArray(@Root() mjactionexecutionlog_: MJActionExecutionLog_, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
1174
|
+
this.CheckUserReadPermissions('MJ: Process Run Details', userPayload);
|
|
1175
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
1176
|
+
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwProcessRunDetails')} WHERE ${provider.QuoteIdentifier('ActionExecutionLogID')}=${provider.BuildParameterPlaceholder(0)} ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: Process Run Details', userPayload, EntityPermissionType.Read, 'AND');
|
|
1177
|
+
const rows = await provider.ExecuteSQL(sSQL, [mjactionexecutionlog_.ID], undefined, this.GetUserFromPayload(userPayload));
|
|
1178
|
+
const result = await this.ArrayMapFieldNamesToCodeNames('MJ: Process Run Details', rows, this.GetUserFromPayload(userPayload));
|
|
1179
|
+
return result;
|
|
1180
|
+
}
|
|
1181
|
+
|
|
1169
1182
|
@Mutation(() => MJActionExecutionLog_)
|
|
1170
1183
|
async CreateMJActionExecutionLog(
|
|
1171
1184
|
@Arg('input', () => CreateMJActionExecutionLogInput) input: CreateMJActionExecutionLogInput,
|
|
@@ -2121,6 +2134,9 @@ export class MJAction_ {
|
|
|
2121
2134
|
@Field(() => [MJAction_])
|
|
2122
2135
|
MJActions_ParentIDArray: MJAction_[]; // Link to MJActions
|
|
2123
2136
|
|
|
2137
|
+
@Field(() => [MJRecordProcess_])
|
|
2138
|
+
MJRecordProcesses_ActionIDArray: MJRecordProcess_[]; // Link to MJRecordProcesses
|
|
2139
|
+
|
|
2124
2140
|
}
|
|
2125
2141
|
|
|
2126
2142
|
//****************************************************************************
|
|
@@ -2472,6 +2488,16 @@ export class MJActionResolver extends ResolverBase {
|
|
|
2472
2488
|
return result;
|
|
2473
2489
|
}
|
|
2474
2490
|
|
|
2491
|
+
@FieldResolver(() => [MJRecordProcess_])
|
|
2492
|
+
async MJRecordProcesses_ActionIDArray(@Root() mjaction_: MJAction_, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
2493
|
+
this.CheckUserReadPermissions('MJ: Record Processes', userPayload);
|
|
2494
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
2495
|
+
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwRecordProcesses')} WHERE ${provider.QuoteIdentifier('ActionID')}=${provider.BuildParameterPlaceholder(0)} ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: Record Processes', userPayload, EntityPermissionType.Read, 'AND');
|
|
2496
|
+
const rows = await provider.ExecuteSQL(sSQL, [mjaction_.ID], undefined, this.GetUserFromPayload(userPayload));
|
|
2497
|
+
const result = await this.ArrayMapFieldNamesToCodeNames('MJ: Record Processes', rows, this.GetUserFromPayload(userPayload));
|
|
2498
|
+
return result;
|
|
2499
|
+
}
|
|
2500
|
+
|
|
2475
2501
|
@Mutation(() => MJAction_)
|
|
2476
2502
|
async CreateMJAction(
|
|
2477
2503
|
@Arg('input', () => CreateMJActionInput) input: CreateMJActionInput,
|
|
@@ -8147,6 +8173,9 @@ each time the agent processes a prompt step.`})
|
|
|
8147
8173
|
@Field(() => [MJAIAgentRun_])
|
|
8148
8174
|
MJAIAgentRuns_LastRunIDArray: MJAIAgentRun_[]; // Link to MJAIAgentRuns
|
|
8149
8175
|
|
|
8176
|
+
@Field(() => [MJProcessRunDetail_])
|
|
8177
|
+
MJProcessRunDetails_AIAgentRunIDArray: MJProcessRunDetail_[]; // Link to MJProcessRunDetails
|
|
8178
|
+
|
|
8150
8179
|
}
|
|
8151
8180
|
|
|
8152
8181
|
//****************************************************************************
|
|
@@ -8606,6 +8635,16 @@ export class MJAIAgentRunResolver extends ResolverBase {
|
|
|
8606
8635
|
return result;
|
|
8607
8636
|
}
|
|
8608
8637
|
|
|
8638
|
+
@FieldResolver(() => [MJProcessRunDetail_])
|
|
8639
|
+
async MJProcessRunDetails_AIAgentRunIDArray(@Root() mjaiagentrun_: MJAIAgentRun_, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
8640
|
+
this.CheckUserReadPermissions('MJ: Process Run Details', userPayload);
|
|
8641
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
8642
|
+
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwProcessRunDetails')} WHERE ${provider.QuoteIdentifier('AIAgentRunID')}=${provider.BuildParameterPlaceholder(0)} ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: Process Run Details', userPayload, EntityPermissionType.Read, 'AND');
|
|
8643
|
+
const rows = await provider.ExecuteSQL(sSQL, [mjaiagentrun_.ID], undefined, this.GetUserFromPayload(userPayload));
|
|
8644
|
+
const result = await this.ArrayMapFieldNamesToCodeNames('MJ: Process Run Details', rows, this.GetUserFromPayload(userPayload));
|
|
8645
|
+
return result;
|
|
8646
|
+
}
|
|
8647
|
+
|
|
8609
8648
|
@Mutation(() => MJAIAgentRun_)
|
|
8610
8649
|
async CreateMJAIAgentRun(
|
|
8611
8650
|
@Arg('input', () => CreateMJAIAgentRunInput) input: CreateMJAIAgentRunInput,
|
|
@@ -11154,6 +11193,9 @@ if this limit is exceeded.`})
|
|
|
11154
11193
|
@Field(() => [MJAIBridgeAgentIdentity_])
|
|
11155
11194
|
MJAIBridgeAgentIdentities_AgentIDArray: MJAIBridgeAgentIdentity_[]; // Link to MJAIBridgeAgentIdentities
|
|
11156
11195
|
|
|
11196
|
+
@Field(() => [MJRecordProcess_])
|
|
11197
|
+
MJRecordProcesses_AgentIDArray: MJRecordProcess_[]; // Link to MJRecordProcesses
|
|
11198
|
+
|
|
11157
11199
|
}
|
|
11158
11200
|
|
|
11159
11201
|
//****************************************************************************
|
|
@@ -11957,6 +11999,16 @@ export class MJAIAgentResolver extends ResolverBase {
|
|
|
11957
11999
|
return result;
|
|
11958
12000
|
}
|
|
11959
12001
|
|
|
12002
|
+
@FieldResolver(() => [MJRecordProcess_])
|
|
12003
|
+
async MJRecordProcesses_AgentIDArray(@Root() mjaiagent_: MJAIAgent_, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
12004
|
+
this.CheckUserReadPermissions('MJ: Record Processes', userPayload);
|
|
12005
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
12006
|
+
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwRecordProcesses')} WHERE ${provider.QuoteIdentifier('AgentID')}=${provider.BuildParameterPlaceholder(0)} ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: Record Processes', userPayload, EntityPermissionType.Read, 'AND');
|
|
12007
|
+
const rows = await provider.ExecuteSQL(sSQL, [mjaiagent_.ID], undefined, this.GetUserFromPayload(userPayload));
|
|
12008
|
+
const result = await this.ArrayMapFieldNamesToCodeNames('MJ: Record Processes', rows, this.GetUserFromPayload(userPayload));
|
|
12009
|
+
return result;
|
|
12010
|
+
}
|
|
12011
|
+
|
|
11960
12012
|
@Mutation(() => MJAIAgent_)
|
|
11961
12013
|
async CreateMJAIAgent(
|
|
11962
12014
|
@Arg('input', () => CreateMJAIAgentInput) input: CreateMJAIAgentInput,
|
|
@@ -18741,6 +18793,9 @@ export class MJAIPrompt_ {
|
|
|
18741
18793
|
@Field(() => [MJAction_])
|
|
18742
18794
|
MJActions_DefaultCompactPromptIDArray: MJAction_[]; // Link to MJActions
|
|
18743
18795
|
|
|
18796
|
+
@Field(() => [MJRecordProcess_])
|
|
18797
|
+
MJRecordProcesses_PromptIDArray: MJRecordProcess_[]; // Link to MJRecordProcesses
|
|
18798
|
+
|
|
18744
18799
|
}
|
|
18745
18800
|
|
|
18746
18801
|
//****************************************************************************
|
|
@@ -19274,6 +19329,16 @@ export class MJAIPromptResolver extends ResolverBase {
|
|
|
19274
19329
|
return result;
|
|
19275
19330
|
}
|
|
19276
19331
|
|
|
19332
|
+
@FieldResolver(() => [MJRecordProcess_])
|
|
19333
|
+
async MJRecordProcesses_PromptIDArray(@Root() mjaiprompt_: MJAIPrompt_, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
19334
|
+
this.CheckUserReadPermissions('MJ: Record Processes', userPayload);
|
|
19335
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
19336
|
+
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwRecordProcesses')} WHERE ${provider.QuoteIdentifier('PromptID')}=${provider.BuildParameterPlaceholder(0)} ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: Record Processes', userPayload, EntityPermissionType.Read, 'AND');
|
|
19337
|
+
const rows = await provider.ExecuteSQL(sSQL, [mjaiprompt_.ID], undefined, this.GetUserFromPayload(userPayload));
|
|
19338
|
+
const result = await this.ArrayMapFieldNamesToCodeNames('MJ: Record Processes', rows, this.GetUserFromPayload(userPayload));
|
|
19339
|
+
return result;
|
|
19340
|
+
}
|
|
19341
|
+
|
|
19277
19342
|
@Mutation(() => MJAIPrompt_)
|
|
19278
19343
|
async CreateMJAIPrompt(
|
|
19279
19344
|
@Arg('input', () => CreateMJAIPromptInput) input: CreateMJAIPromptInput,
|
|
@@ -43677,6 +43742,18 @@ export class MJEntity_ {
|
|
|
43677
43742
|
@Field(() => [MJSignatureRequest_])
|
|
43678
43743
|
MJSignatureRequests_EntityIDArray: MJSignatureRequest_[]; // Link to MJSignatureRequests
|
|
43679
43744
|
|
|
43745
|
+
@Field(() => [MJProcessRunDetail_])
|
|
43746
|
+
MJProcessRunDetails_EntityIDArray: MJProcessRunDetail_[]; // Link to MJProcessRunDetails
|
|
43747
|
+
|
|
43748
|
+
@Field(() => [MJProcessRun_])
|
|
43749
|
+
MJProcessRuns_EntityIDArray: MJProcessRun_[]; // Link to MJProcessRuns
|
|
43750
|
+
|
|
43751
|
+
@Field(() => [MJRecordProcessWatermark_])
|
|
43752
|
+
MJRecordProcessWatermarks_EntityIDArray: MJRecordProcessWatermark_[]; // Link to MJRecordProcessWatermarks
|
|
43753
|
+
|
|
43754
|
+
@Field(() => [MJRecordProcess_])
|
|
43755
|
+
MJRecordProcesses_EntityIDArray: MJRecordProcess_[]; // Link to MJRecordProcesses
|
|
43756
|
+
|
|
43680
43757
|
}
|
|
43681
43758
|
|
|
43682
43759
|
//****************************************************************************
|
|
@@ -44754,6 +44831,46 @@ export class MJEntityResolverBase extends ResolverBase {
|
|
|
44754
44831
|
return result;
|
|
44755
44832
|
}
|
|
44756
44833
|
|
|
44834
|
+
@FieldResolver(() => [MJProcessRunDetail_])
|
|
44835
|
+
async MJProcessRunDetails_EntityIDArray(@Root() mjentity_: MJEntity_, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
44836
|
+
this.CheckUserReadPermissions('MJ: Process Run Details', userPayload);
|
|
44837
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
44838
|
+
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwProcessRunDetails')} WHERE ${provider.QuoteIdentifier('EntityID')}=${provider.BuildParameterPlaceholder(0)} ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: Process Run Details', userPayload, EntityPermissionType.Read, 'AND');
|
|
44839
|
+
const rows = await provider.ExecuteSQL(sSQL, [mjentity_.ID], undefined, this.GetUserFromPayload(userPayload));
|
|
44840
|
+
const result = await this.ArrayMapFieldNamesToCodeNames('MJ: Process Run Details', rows, this.GetUserFromPayload(userPayload));
|
|
44841
|
+
return result;
|
|
44842
|
+
}
|
|
44843
|
+
|
|
44844
|
+
@FieldResolver(() => [MJProcessRun_])
|
|
44845
|
+
async MJProcessRuns_EntityIDArray(@Root() mjentity_: MJEntity_, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
44846
|
+
this.CheckUserReadPermissions('MJ: Process Runs', userPayload);
|
|
44847
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
44848
|
+
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwProcessRuns')} WHERE ${provider.QuoteIdentifier('EntityID')}=${provider.BuildParameterPlaceholder(0)} ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: Process Runs', userPayload, EntityPermissionType.Read, 'AND');
|
|
44849
|
+
const rows = await provider.ExecuteSQL(sSQL, [mjentity_.ID], undefined, this.GetUserFromPayload(userPayload));
|
|
44850
|
+
const result = await this.ArrayMapFieldNamesToCodeNames('MJ: Process Runs', rows, this.GetUserFromPayload(userPayload));
|
|
44851
|
+
return result;
|
|
44852
|
+
}
|
|
44853
|
+
|
|
44854
|
+
@FieldResolver(() => [MJRecordProcessWatermark_])
|
|
44855
|
+
async MJRecordProcessWatermarks_EntityIDArray(@Root() mjentity_: MJEntity_, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
44856
|
+
this.CheckUserReadPermissions('MJ: Record Process Watermarks', userPayload);
|
|
44857
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
44858
|
+
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwRecordProcessWatermarks')} WHERE ${provider.QuoteIdentifier('EntityID')}=${provider.BuildParameterPlaceholder(0)} ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: Record Process Watermarks', userPayload, EntityPermissionType.Read, 'AND');
|
|
44859
|
+
const rows = await provider.ExecuteSQL(sSQL, [mjentity_.ID], undefined, this.GetUserFromPayload(userPayload));
|
|
44860
|
+
const result = await this.ArrayMapFieldNamesToCodeNames('MJ: Record Process Watermarks', rows, this.GetUserFromPayload(userPayload));
|
|
44861
|
+
return result;
|
|
44862
|
+
}
|
|
44863
|
+
|
|
44864
|
+
@FieldResolver(() => [MJRecordProcess_])
|
|
44865
|
+
async MJRecordProcesses_EntityIDArray(@Root() mjentity_: MJEntity_, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
44866
|
+
this.CheckUserReadPermissions('MJ: Record Processes', userPayload);
|
|
44867
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
44868
|
+
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwRecordProcesses')} WHERE ${provider.QuoteIdentifier('EntityID')}=${provider.BuildParameterPlaceholder(0)} ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: Record Processes', userPayload, EntityPermissionType.Read, 'AND');
|
|
44869
|
+
const rows = await provider.ExecuteSQL(sSQL, [mjentity_.ID], undefined, this.GetUserFromPayload(userPayload));
|
|
44870
|
+
const result = await this.ArrayMapFieldNamesToCodeNames('MJ: Record Processes', rows, this.GetUserFromPayload(userPayload));
|
|
44871
|
+
return result;
|
|
44872
|
+
}
|
|
44873
|
+
|
|
44757
44874
|
@Mutation(() => MJEntity_)
|
|
44758
44875
|
async CreateMJEntity(
|
|
44759
44876
|
@Arg('input', () => CreateMJEntityInput) input: CreateMJEntityInput,
|
|
@@ -45159,6 +45276,10 @@ export class MJEntityActionInvocation_ {
|
|
|
45159
45276
|
@Field()
|
|
45160
45277
|
_mj__UpdatedAt: Date;
|
|
45161
45278
|
|
|
45279
|
+
@Field({nullable: true, description: `Optional class name of a registered runtime-UX driver component (a BaseEntityActionRuntimeUX subclass resolved via MJGlobal.ClassFactory) that owns this invocation's interaction — parameter collection, dry-run preview, confirmation, and progress. NULL invokes the action directly with no custom UX. This lets any action opt into a richer, reusable runtime experience while the grid/toolbar stays operation-agnostic.`})
|
|
45280
|
+
@MaxLength(255)
|
|
45281
|
+
RuntimeUXDriverClass?: string;
|
|
45282
|
+
|
|
45162
45283
|
@Field()
|
|
45163
45284
|
@MaxLength(425)
|
|
45164
45285
|
EntityAction: string;
|
|
@@ -45186,6 +45307,9 @@ export class CreateMJEntityActionInvocationInput {
|
|
|
45186
45307
|
@Field({ nullable: true })
|
|
45187
45308
|
Status?: string;
|
|
45188
45309
|
|
|
45310
|
+
@Field({ nullable: true })
|
|
45311
|
+
RuntimeUXDriverClass: string | null;
|
|
45312
|
+
|
|
45189
45313
|
@Field(() => RestoreContextInput, { nullable: true })
|
|
45190
45314
|
RestoreContext___?: RestoreContextInput;
|
|
45191
45315
|
}
|
|
@@ -45208,6 +45332,9 @@ export class UpdateMJEntityActionInvocationInput {
|
|
|
45208
45332
|
@Field({ nullable: true })
|
|
45209
45333
|
Status?: string;
|
|
45210
45334
|
|
|
45335
|
+
@Field({ nullable: true })
|
|
45336
|
+
RuntimeUXDriverClass?: string | null;
|
|
45337
|
+
|
|
45211
45338
|
@Field(() => [KeyValuePairInput], { nullable: true })
|
|
45212
45339
|
OldValues___?: KeyValuePairInput[];
|
|
45213
45340
|
|
|
@@ -53203,6 +53330,26 @@ export class MJIntegrationObject_ {
|
|
|
53203
53330
|
@MaxLength(20)
|
|
53204
53331
|
MetadataSource: string;
|
|
53205
53332
|
|
|
53333
|
+
@Field(() => Boolean, {description: `Whether this object supports record creation in the external system (per-operation granularity beyond SupportsWrite). Drives whether the generic CreateRecord path is wired and whether the object is offered for write-back create.`})
|
|
53334
|
+
SupportsCreate: boolean;
|
|
53335
|
+
|
|
53336
|
+
@Field(() => Boolean, {description: `Whether this object supports record updates in the external system (per-operation granularity beyond SupportsWrite).`})
|
|
53337
|
+
SupportsUpdate: boolean;
|
|
53338
|
+
|
|
53339
|
+
@Field(() => Boolean, {description: `Whether this object supports record deletion/tombstoning in the external system (per-operation granularity beyond SupportsWrite).`})
|
|
53340
|
+
SupportsDelete: boolean;
|
|
53341
|
+
|
|
53342
|
+
@Field({nullable: true, description: `Declared incremental sync strategy for this object (e.g. WatermarkIncremental, ContentHash, FullSnapshot). Informs how the engine narrows subsequent syncs.`})
|
|
53343
|
+
@MaxLength(50)
|
|
53344
|
+
SyncStrategy?: string;
|
|
53345
|
+
|
|
53346
|
+
@Field(() => Boolean, {description: `Whether per-record content hashing is meaningful for this object (false for append-only/event streams where every row is new). Controls whether the engine uses content-hash to skip unchanged-row writes.`})
|
|
53347
|
+
ContentHashApplicable: boolean;
|
|
53348
|
+
|
|
53349
|
+
@Field({nullable: true, description: `Stable, monotonic ordering column (usually the PK) used for keyset/no-watermark resume of a scan. Null when the object has no stable key.`})
|
|
53350
|
+
@MaxLength(255)
|
|
53351
|
+
StableOrderingKey?: string;
|
|
53352
|
+
|
|
53206
53353
|
@Field()
|
|
53207
53354
|
@MaxLength(100)
|
|
53208
53355
|
Integration: string;
|
|
@@ -53325,6 +53472,24 @@ export class CreateMJIntegrationObjectInput {
|
|
|
53325
53472
|
@Field({ nullable: true })
|
|
53326
53473
|
MetadataSource?: string;
|
|
53327
53474
|
|
|
53475
|
+
@Field(() => Boolean, { nullable: true })
|
|
53476
|
+
SupportsCreate?: boolean;
|
|
53477
|
+
|
|
53478
|
+
@Field(() => Boolean, { nullable: true })
|
|
53479
|
+
SupportsUpdate?: boolean;
|
|
53480
|
+
|
|
53481
|
+
@Field(() => Boolean, { nullable: true })
|
|
53482
|
+
SupportsDelete?: boolean;
|
|
53483
|
+
|
|
53484
|
+
@Field({ nullable: true })
|
|
53485
|
+
SyncStrategy: string | null;
|
|
53486
|
+
|
|
53487
|
+
@Field(() => Boolean, { nullable: true })
|
|
53488
|
+
ContentHashApplicable?: boolean;
|
|
53489
|
+
|
|
53490
|
+
@Field({ nullable: true })
|
|
53491
|
+
StableOrderingKey: string | null;
|
|
53492
|
+
|
|
53328
53493
|
@Field(() => RestoreContextInput, { nullable: true })
|
|
53329
53494
|
RestoreContext___?: RestoreContextInput;
|
|
53330
53495
|
}
|
|
@@ -53440,6 +53605,24 @@ export class UpdateMJIntegrationObjectInput {
|
|
|
53440
53605
|
@Field({ nullable: true })
|
|
53441
53606
|
MetadataSource?: string;
|
|
53442
53607
|
|
|
53608
|
+
@Field(() => Boolean, { nullable: true })
|
|
53609
|
+
SupportsCreate?: boolean;
|
|
53610
|
+
|
|
53611
|
+
@Field(() => Boolean, { nullable: true })
|
|
53612
|
+
SupportsUpdate?: boolean;
|
|
53613
|
+
|
|
53614
|
+
@Field(() => Boolean, { nullable: true })
|
|
53615
|
+
SupportsDelete?: boolean;
|
|
53616
|
+
|
|
53617
|
+
@Field({ nullable: true })
|
|
53618
|
+
SyncStrategy?: string | null;
|
|
53619
|
+
|
|
53620
|
+
@Field(() => Boolean, { nullable: true })
|
|
53621
|
+
ContentHashApplicable?: boolean;
|
|
53622
|
+
|
|
53623
|
+
@Field({ nullable: true })
|
|
53624
|
+
StableOrderingKey?: string | null;
|
|
53625
|
+
|
|
53443
53626
|
@Field(() => [KeyValuePairInput], { nullable: true })
|
|
53444
53627
|
OldValues___?: KeyValuePairInput[];
|
|
53445
53628
|
|
|
@@ -53986,6 +54169,9 @@ export class MJIntegration_ {
|
|
|
53986
54169
|
@Field({nullable: true, description: `Icon for the integration. Supports Font Awesome CSS classes, image URLs, or base64 data URIs.`})
|
|
53987
54170
|
Icon?: string;
|
|
53988
54171
|
|
|
54172
|
+
@Field({nullable: true, description: `Integration-level connector configuration JSON (e.g. out-of-scope object families, vendor-specific tuning). Free-form JSON the connector reads at runtime.`})
|
|
54173
|
+
Configuration?: string;
|
|
54174
|
+
|
|
53989
54175
|
@Field({nullable: true})
|
|
53990
54176
|
@MaxLength(100)
|
|
53991
54177
|
CredentialType?: string;
|
|
@@ -54039,6 +54225,9 @@ export class CreateMJIntegrationInput {
|
|
|
54039
54225
|
@Field({ nullable: true })
|
|
54040
54226
|
Icon: string | null;
|
|
54041
54227
|
|
|
54228
|
+
@Field({ nullable: true })
|
|
54229
|
+
Configuration: string | null;
|
|
54230
|
+
|
|
54042
54231
|
@Field(() => RestoreContextInput, { nullable: true })
|
|
54043
54232
|
RestoreContext___?: RestoreContextInput;
|
|
54044
54233
|
}
|
|
@@ -54079,6 +54268,9 @@ export class UpdateMJIntegrationInput {
|
|
|
54079
54268
|
@Field({ nullable: true })
|
|
54080
54269
|
Icon?: string | null;
|
|
54081
54270
|
|
|
54271
|
+
@Field({ nullable: true })
|
|
54272
|
+
Configuration?: string | null;
|
|
54273
|
+
|
|
54082
54274
|
@Field(() => [KeyValuePairInput], { nullable: true })
|
|
54083
54275
|
OldValues___?: KeyValuePairInput[];
|
|
54084
54276
|
|
|
@@ -55669,6 +55861,9 @@ export class MJList_ {
|
|
|
55669
55861
|
@Field(() => [MJListShare_])
|
|
55670
55862
|
MJListShares_ListIDArray: MJListShare_[]; // Link to MJListShares
|
|
55671
55863
|
|
|
55864
|
+
@Field(() => [MJRecordProcess_])
|
|
55865
|
+
MJRecordProcesses_ScopeListIDArray: MJRecordProcess_[]; // Link to MJRecordProcesses
|
|
55866
|
+
|
|
55672
55867
|
}
|
|
55673
55868
|
|
|
55674
55869
|
//****************************************************************************
|
|
@@ -55874,6 +56069,16 @@ export class MJListResolver extends ResolverBase {
|
|
|
55874
56069
|
return result;
|
|
55875
56070
|
}
|
|
55876
56071
|
|
|
56072
|
+
@FieldResolver(() => [MJRecordProcess_])
|
|
56073
|
+
async MJRecordProcesses_ScopeListIDArray(@Root() mjlist_: MJList_, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
56074
|
+
this.CheckUserReadPermissions('MJ: Record Processes', userPayload);
|
|
56075
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
56076
|
+
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwRecordProcesses')} WHERE ${provider.QuoteIdentifier('ScopeListID')}=${provider.BuildParameterPlaceholder(0)} ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: Record Processes', userPayload, EntityPermissionType.Read, 'AND');
|
|
56077
|
+
const rows = await provider.ExecuteSQL(sSQL, [mjlist_.ID], undefined, this.GetUserFromPayload(userPayload));
|
|
56078
|
+
const result = await this.ArrayMapFieldNamesToCodeNames('MJ: Record Processes', rows, this.GetUserFromPayload(userPayload));
|
|
56079
|
+
return result;
|
|
56080
|
+
}
|
|
56081
|
+
|
|
55877
56082
|
@Mutation(() => MJList_)
|
|
55878
56083
|
async CreateMJList(
|
|
55879
56084
|
@Arg('input', () => CreateMJListInput) input: CreateMJListInput,
|
|
@@ -60503,6 +60708,10 @@ export class MJOpenApp_ {
|
|
|
60503
60708
|
@Field()
|
|
60504
60709
|
_mj__UpdatedAt: Date;
|
|
60505
60710
|
|
|
60711
|
+
@Field({nullable: true, description: `In-repo subdirectory the app was installed from for multi-app repositories (e.g. 'CRM/HubSpot'). NULL when the app's mj-app.json is at the repository root.`})
|
|
60712
|
+
@MaxLength(500)
|
|
60713
|
+
Subpath?: string;
|
|
60714
|
+
|
|
60506
60715
|
@Field()
|
|
60507
60716
|
@MaxLength(100)
|
|
60508
60717
|
InstalledByUser: string;
|
|
@@ -60577,6 +60786,9 @@ export class CreateMJOpenAppInput {
|
|
|
60577
60786
|
@Field({ nullable: true })
|
|
60578
60787
|
Status?: string;
|
|
60579
60788
|
|
|
60789
|
+
@Field({ nullable: true })
|
|
60790
|
+
Subpath: string | null;
|
|
60791
|
+
|
|
60580
60792
|
@Field(() => RestoreContextInput, { nullable: true })
|
|
60581
60793
|
RestoreContext___?: RestoreContextInput;
|
|
60582
60794
|
}
|
|
@@ -60641,6 +60853,9 @@ export class UpdateMJOpenAppInput {
|
|
|
60641
60853
|
@Field({ nullable: true })
|
|
60642
60854
|
Status?: string;
|
|
60643
60855
|
|
|
60856
|
+
@Field({ nullable: true })
|
|
60857
|
+
Subpath?: string | null;
|
|
60858
|
+
|
|
60644
60859
|
@Field(() => [KeyValuePairInput], { nullable: true })
|
|
60645
60860
|
OldValues___?: KeyValuePairInput[];
|
|
60646
60861
|
|
|
@@ -61498,39 +61713,55 @@ export class MJPermissionDomainResolver extends ResolverBase {
|
|
|
61498
61713
|
}
|
|
61499
61714
|
|
|
61500
61715
|
//****************************************************************************
|
|
61501
|
-
// ENTITY CLASS for MJ:
|
|
61716
|
+
// ENTITY CLASS for MJ: Process Run Details
|
|
61502
61717
|
//****************************************************************************
|
|
61503
|
-
@ObjectType({ description: `
|
|
61504
|
-
export class
|
|
61718
|
+
@ObjectType({ description: `Per-record result within a Process Run: powers audit, resume (skip already-done records), and the run-viewer UX. One row per processed record. EXAMPLE: customer CUST-00417 -> Succeeded with ResultPayload {"satisfaction":"High","sentiment":0.82} and a link to its AI Agent Run; customer CUST-00418 -> Failed with ErrorMessage "Model timeout".` })
|
|
61719
|
+
export class MJProcessRunDetail_ {
|
|
61505
61720
|
@Field()
|
|
61506
61721
|
@MaxLength(36)
|
|
61507
61722
|
ID: string;
|
|
61508
61723
|
|
|
61509
|
-
@Field()
|
|
61724
|
+
@Field({description: `Foreign key to the parent Process Run`})
|
|
61510
61725
|
@MaxLength(36)
|
|
61511
|
-
|
|
61726
|
+
ProcessRunID: string;
|
|
61512
61727
|
|
|
61513
|
-
@Field({
|
|
61728
|
+
@Field({description: `Foreign key to the entity of the processed record. Stored (not inherited) because a single run may span entities for ad-hoc / engine-driven runs.`})
|
|
61514
61729
|
@MaxLength(36)
|
|
61515
|
-
|
|
61730
|
+
EntityID: string;
|
|
61516
61731
|
|
|
61517
|
-
@Field({description: `
|
|
61518
|
-
@MaxLength(
|
|
61519
|
-
|
|
61732
|
+
@Field({description: `Primary key of the processed record, stored as text to remain composite-key safe`})
|
|
61733
|
+
@MaxLength(450)
|
|
61734
|
+
RecordID: string;
|
|
61520
61735
|
|
|
61521
|
-
@Field({
|
|
61522
|
-
|
|
61736
|
+
@Field({description: `Per-record status: Pending, Succeeded, Failed, or Skipped`})
|
|
61737
|
+
@MaxLength(20)
|
|
61738
|
+
Status: string;
|
|
61523
61739
|
|
|
61524
|
-
@Field({nullable: true, description: `
|
|
61525
|
-
|
|
61526
|
-
Color?: string;
|
|
61740
|
+
@Field({nullable: true, description: `When processing of this record started`})
|
|
61741
|
+
StartedAt?: Date;
|
|
61527
61742
|
|
|
61528
|
-
@Field({nullable: true, description: `
|
|
61529
|
-
|
|
61530
|
-
Icon?: string;
|
|
61743
|
+
@Field({nullable: true, description: `When processing of this record completed`})
|
|
61744
|
+
CompletedAt?: Date;
|
|
61531
61745
|
|
|
61532
|
-
@Field(() =>
|
|
61533
|
-
|
|
61746
|
+
@Field(() => Int, {nullable: true, description: `Processing duration for this record in milliseconds`})
|
|
61747
|
+
DurationMs?: number;
|
|
61748
|
+
|
|
61749
|
+
@Field(() => Int, {description: `Number of processing attempts for this record (supports retry)`})
|
|
61750
|
+
AttemptCount: number;
|
|
61751
|
+
|
|
61752
|
+
@Field({nullable: true, description: `Structured output payload (JSON) produced for this record`})
|
|
61753
|
+
ResultPayload?: string;
|
|
61754
|
+
|
|
61755
|
+
@Field({nullable: true, description: `Per-record error message when Status=Failed`})
|
|
61756
|
+
ErrorMessage?: string;
|
|
61757
|
+
|
|
61758
|
+
@Field({nullable: true, description: `Foreign key to the Action Execution Log for deep tracing, when the work was an Action`})
|
|
61759
|
+
@MaxLength(36)
|
|
61760
|
+
ActionExecutionLogID?: string;
|
|
61761
|
+
|
|
61762
|
+
@Field({nullable: true, description: `Foreign key to the AI Agent Run for deep tracing, when the work was an Agent`})
|
|
61763
|
+
@MaxLength(36)
|
|
61764
|
+
AIAgentRunID?: string;
|
|
61534
61765
|
|
|
61535
61766
|
@Field()
|
|
61536
61767
|
_mj__CreatedAt: Date;
|
|
@@ -61540,55 +61771,61 @@ export class MJProject_ {
|
|
|
61540
61771
|
|
|
61541
61772
|
@Field()
|
|
61542
61773
|
@MaxLength(255)
|
|
61543
|
-
|
|
61774
|
+
Entity: string;
|
|
61544
61775
|
|
|
61545
61776
|
@Field({nullable: true})
|
|
61546
|
-
@MaxLength(
|
|
61547
|
-
|
|
61777
|
+
@MaxLength(425)
|
|
61778
|
+
ActionExecutionLog?: string;
|
|
61548
61779
|
|
|
61549
61780
|
@Field({nullable: true})
|
|
61550
|
-
@MaxLength(
|
|
61551
|
-
|
|
61781
|
+
@MaxLength(255)
|
|
61782
|
+
AIAgentRun?: string;
|
|
61552
61783
|
|
|
61553
|
-
@Field(() => [MJProject_])
|
|
61554
|
-
MJProjects_ParentIDArray: MJProject_[]; // Link to MJProjects
|
|
61555
|
-
|
|
61556
|
-
@Field(() => [MJConversation_])
|
|
61557
|
-
MJConversations_ProjectIDArray: MJConversation_[]; // Link to MJConversations
|
|
61558
|
-
|
|
61559
|
-
@Field(() => [MJTask_])
|
|
61560
|
-
MJTasks_ProjectIDArray: MJTask_[]; // Link to MJTasks
|
|
61561
|
-
|
|
61562
61784
|
}
|
|
61563
61785
|
|
|
61564
61786
|
//****************************************************************************
|
|
61565
|
-
// INPUT TYPE for MJ:
|
|
61787
|
+
// INPUT TYPE for MJ: Process Run Details
|
|
61566
61788
|
//****************************************************************************
|
|
61567
61789
|
@InputType()
|
|
61568
|
-
export class
|
|
61790
|
+
export class CreateMJProcessRunDetailInput {
|
|
61569
61791
|
@Field({ nullable: true })
|
|
61570
61792
|
ID?: string;
|
|
61571
61793
|
|
|
61572
61794
|
@Field({ nullable: true })
|
|
61573
|
-
|
|
61795
|
+
ProcessRunID?: string;
|
|
61574
61796
|
|
|
61575
61797
|
@Field({ nullable: true })
|
|
61576
|
-
|
|
61798
|
+
EntityID?: string;
|
|
61577
61799
|
|
|
61578
61800
|
@Field({ nullable: true })
|
|
61579
|
-
|
|
61801
|
+
RecordID?: string;
|
|
61580
61802
|
|
|
61581
61803
|
@Field({ nullable: true })
|
|
61582
|
-
|
|
61804
|
+
Status?: string;
|
|
61583
61805
|
|
|
61584
61806
|
@Field({ nullable: true })
|
|
61585
|
-
|
|
61807
|
+
StartedAt: Date | null;
|
|
61586
61808
|
|
|
61587
61809
|
@Field({ nullable: true })
|
|
61588
|
-
|
|
61810
|
+
CompletedAt: Date | null;
|
|
61589
61811
|
|
|
61590
|
-
@Field(() =>
|
|
61591
|
-
|
|
61812
|
+
@Field(() => Int, { nullable: true })
|
|
61813
|
+
DurationMs: number | null;
|
|
61814
|
+
|
|
61815
|
+
@Field(() => Int, { nullable: true })
|
|
61816
|
+
AttemptCount?: number;
|
|
61817
|
+
|
|
61818
|
+
@Field({ nullable: true })
|
|
61819
|
+
ResultPayload: string | null;
|
|
61820
|
+
|
|
61821
|
+
@Field({ nullable: true })
|
|
61822
|
+
ErrorMessage: string | null;
|
|
61823
|
+
|
|
61824
|
+
@Field({ nullable: true })
|
|
61825
|
+
ActionExecutionLogID: string | null;
|
|
61826
|
+
|
|
61827
|
+
@Field({ nullable: true })
|
|
61828
|
+
AIAgentRunID: string | null;
|
|
61592
61829
|
|
|
61593
61830
|
@Field(() => RestoreContextInput, { nullable: true })
|
|
61594
61831
|
RestoreContext___?: RestoreContextInput;
|
|
@@ -61596,33 +61833,48 @@ export class CreateMJProjectInput {
|
|
|
61596
61833
|
|
|
61597
61834
|
|
|
61598
61835
|
//****************************************************************************
|
|
61599
|
-
// INPUT TYPE for MJ:
|
|
61836
|
+
// INPUT TYPE for MJ: Process Run Details
|
|
61600
61837
|
//****************************************************************************
|
|
61601
61838
|
@InputType()
|
|
61602
|
-
export class
|
|
61839
|
+
export class UpdateMJProcessRunDetailInput {
|
|
61603
61840
|
@Field()
|
|
61604
61841
|
ID: string;
|
|
61605
61842
|
|
|
61606
61843
|
@Field({ nullable: true })
|
|
61607
|
-
|
|
61844
|
+
ProcessRunID?: string;
|
|
61608
61845
|
|
|
61609
61846
|
@Field({ nullable: true })
|
|
61610
|
-
|
|
61847
|
+
EntityID?: string;
|
|
61611
61848
|
|
|
61612
61849
|
@Field({ nullable: true })
|
|
61613
|
-
|
|
61850
|
+
RecordID?: string;
|
|
61614
61851
|
|
|
61615
61852
|
@Field({ nullable: true })
|
|
61616
|
-
|
|
61853
|
+
Status?: string;
|
|
61617
61854
|
|
|
61618
61855
|
@Field({ nullable: true })
|
|
61619
|
-
|
|
61856
|
+
StartedAt?: Date | null;
|
|
61620
61857
|
|
|
61621
61858
|
@Field({ nullable: true })
|
|
61622
|
-
|
|
61859
|
+
CompletedAt?: Date | null;
|
|
61623
61860
|
|
|
61624
|
-
@Field(() =>
|
|
61625
|
-
|
|
61861
|
+
@Field(() => Int, { nullable: true })
|
|
61862
|
+
DurationMs?: number | null;
|
|
61863
|
+
|
|
61864
|
+
@Field(() => Int, { nullable: true })
|
|
61865
|
+
AttemptCount?: number;
|
|
61866
|
+
|
|
61867
|
+
@Field({ nullable: true })
|
|
61868
|
+
ResultPayload?: string | null;
|
|
61869
|
+
|
|
61870
|
+
@Field({ nullable: true })
|
|
61871
|
+
ErrorMessage?: string | null;
|
|
61872
|
+
|
|
61873
|
+
@Field({ nullable: true })
|
|
61874
|
+
ActionExecutionLogID?: string | null;
|
|
61875
|
+
|
|
61876
|
+
@Field({ nullable: true })
|
|
61877
|
+
AIAgentRunID?: string | null;
|
|
61626
61878
|
|
|
61627
61879
|
@Field(() => [KeyValuePairInput], { nullable: true })
|
|
61628
61880
|
OldValues___?: KeyValuePairInput[];
|
|
@@ -61632,12 +61884,12 @@ export class UpdateMJProjectInput {
|
|
|
61632
61884
|
}
|
|
61633
61885
|
|
|
61634
61886
|
//****************************************************************************
|
|
61635
|
-
// RESOLVER for MJ:
|
|
61887
|
+
// RESOLVER for MJ: Process Run Details
|
|
61636
61888
|
//****************************************************************************
|
|
61637
61889
|
@ObjectType()
|
|
61638
|
-
export class
|
|
61639
|
-
@Field(() => [
|
|
61640
|
-
Results:
|
|
61890
|
+
export class RunMJProcessRunDetailViewResult {
|
|
61891
|
+
@Field(() => [MJProcessRunDetail_])
|
|
61892
|
+
Results: MJProcessRunDetail_[];
|
|
61641
61893
|
|
|
61642
61894
|
@Field(() => String, {nullable: true})
|
|
61643
61895
|
UserViewRunID?: string;
|
|
@@ -61658,135 +61910,148 @@ export class RunMJProjectViewResult {
|
|
|
61658
61910
|
Success: boolean;
|
|
61659
61911
|
}
|
|
61660
61912
|
|
|
61661
|
-
@Resolver(
|
|
61662
|
-
export class
|
|
61663
|
-
@Query(() =>
|
|
61664
|
-
async
|
|
61913
|
+
@Resolver(MJProcessRunDetail_)
|
|
61914
|
+
export class MJProcessRunDetailResolver extends ResolverBase {
|
|
61915
|
+
@Query(() => RunMJProcessRunDetailViewResult)
|
|
61916
|
+
async RunMJProcessRunDetailViewByID(@Arg('input', () => RunViewByIDInput) input: RunViewByIDInput, @Ctx() { providers, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
61665
61917
|
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
61666
61918
|
return super.RunViewByIDGeneric(input, provider, userPayload, pubSub);
|
|
61667
61919
|
}
|
|
61668
61920
|
|
|
61669
|
-
@Query(() =>
|
|
61670
|
-
async
|
|
61921
|
+
@Query(() => RunMJProcessRunDetailViewResult)
|
|
61922
|
+
async RunMJProcessRunDetailViewByName(@Arg('input', () => RunViewByNameInput) input: RunViewByNameInput, @Ctx() { providers, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
61671
61923
|
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
61672
61924
|
return super.RunViewByNameGeneric(input, provider, userPayload, pubSub);
|
|
61673
61925
|
}
|
|
61674
61926
|
|
|
61675
|
-
@Query(() =>
|
|
61676
|
-
async
|
|
61927
|
+
@Query(() => RunMJProcessRunDetailViewResult)
|
|
61928
|
+
async RunMJProcessRunDetailDynamicView(@Arg('input', () => RunDynamicViewInput) input: RunDynamicViewInput, @Ctx() { providers, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
61677
61929
|
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
61678
|
-
input.EntityName = 'MJ:
|
|
61930
|
+
input.EntityName = 'MJ: Process Run Details';
|
|
61679
61931
|
return super.RunDynamicViewGeneric(input, provider, userPayload, pubSub);
|
|
61680
61932
|
}
|
|
61681
|
-
@Query(() =>
|
|
61682
|
-
async
|
|
61683
|
-
this.CheckUserReadPermissions('MJ:
|
|
61933
|
+
@Query(() => MJProcessRunDetail_, { nullable: true })
|
|
61934
|
+
async MJProcessRunDetail(@Arg('ID', () => String) ID: string, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine): Promise<MJProcessRunDetail_ | null> {
|
|
61935
|
+
this.CheckUserReadPermissions('MJ: Process Run Details', userPayload);
|
|
61684
61936
|
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
61685
|
-
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, '
|
|
61937
|
+
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwProcessRunDetails')} WHERE ${provider.QuoteIdentifier('ID')}=${provider.BuildParameterPlaceholder(0)} ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: Process Run Details', userPayload, EntityPermissionType.Read, 'AND');
|
|
61686
61938
|
const rows = await provider.ExecuteSQL(sSQL, [ID], undefined, this.GetUserFromPayload(userPayload));
|
|
61687
|
-
const result = await this.MapFieldNamesToCodeNames('MJ:
|
|
61939
|
+
const result = await this.MapFieldNamesToCodeNames('MJ: Process Run Details', rows && rows.length > 0 ? rows[0] : null, this.GetUserFromPayload(userPayload));
|
|
61688
61940
|
return result;
|
|
61689
61941
|
}
|
|
61690
61942
|
|
|
61691
|
-
@
|
|
61692
|
-
async
|
|
61693
|
-
|
|
61694
|
-
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
61695
|
-
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwProjects')} WHERE ${provider.QuoteIdentifier('ParentID')}=${provider.BuildParameterPlaceholder(0)} ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: Projects', userPayload, EntityPermissionType.Read, 'AND');
|
|
61696
|
-
const rows = await provider.ExecuteSQL(sSQL, [mjproject_.ID], undefined, this.GetUserFromPayload(userPayload));
|
|
61697
|
-
const result = await this.ArrayMapFieldNamesToCodeNames('MJ: Projects', rows, this.GetUserFromPayload(userPayload));
|
|
61698
|
-
return result;
|
|
61699
|
-
}
|
|
61700
|
-
|
|
61701
|
-
@FieldResolver(() => [MJConversation_])
|
|
61702
|
-
async MJConversations_ProjectIDArray(@Root() mjproject_: MJProject_, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
61703
|
-
this.CheckUserReadPermissions('MJ: Conversations', userPayload);
|
|
61704
|
-
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
61705
|
-
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwConversations')} WHERE ${provider.QuoteIdentifier('ProjectID')}=${provider.BuildParameterPlaceholder(0)} ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: Conversations', userPayload, EntityPermissionType.Read, 'AND');
|
|
61706
|
-
const rows = await provider.ExecuteSQL(sSQL, [mjproject_.ID], undefined, this.GetUserFromPayload(userPayload));
|
|
61707
|
-
const result = await this.ArrayMapFieldNamesToCodeNames('MJ: Conversations', rows, this.GetUserFromPayload(userPayload));
|
|
61708
|
-
return result;
|
|
61709
|
-
}
|
|
61710
|
-
|
|
61711
|
-
@FieldResolver(() => [MJTask_])
|
|
61712
|
-
async MJTasks_ProjectIDArray(@Root() mjproject_: MJProject_, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
61713
|
-
this.CheckUserReadPermissions('MJ: Tasks', userPayload);
|
|
61714
|
-
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
61715
|
-
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwTasks')} WHERE ${provider.QuoteIdentifier('ProjectID')}=${provider.BuildParameterPlaceholder(0)} ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: Tasks', userPayload, EntityPermissionType.Read, 'AND');
|
|
61716
|
-
const rows = await provider.ExecuteSQL(sSQL, [mjproject_.ID], undefined, this.GetUserFromPayload(userPayload));
|
|
61717
|
-
const result = await this.ArrayMapFieldNamesToCodeNames('MJ: Tasks', rows, this.GetUserFromPayload(userPayload));
|
|
61718
|
-
return result;
|
|
61719
|
-
}
|
|
61720
|
-
|
|
61721
|
-
@Mutation(() => MJProject_)
|
|
61722
|
-
async CreateMJProject(
|
|
61723
|
-
@Arg('input', () => CreateMJProjectInput) input: CreateMJProjectInput,
|
|
61943
|
+
@Mutation(() => MJProcessRunDetail_)
|
|
61944
|
+
async CreateMJProcessRunDetail(
|
|
61945
|
+
@Arg('input', () => CreateMJProcessRunDetailInput) input: CreateMJProcessRunDetailInput,
|
|
61724
61946
|
@Ctx() { providers, userPayload }: AppContext,
|
|
61725
61947
|
@PubSub() pubSub: PubSubEngine
|
|
61726
61948
|
) {
|
|
61727
61949
|
const provider = GetReadWriteProvider(providers);
|
|
61728
|
-
return this.CreateRecord('MJ:
|
|
61950
|
+
return this.CreateRecord('MJ: Process Run Details', input, provider, userPayload, pubSub)
|
|
61729
61951
|
}
|
|
61730
61952
|
|
|
61731
|
-
@Mutation(() =>
|
|
61732
|
-
async
|
|
61733
|
-
@Arg('input', () =>
|
|
61953
|
+
@Mutation(() => MJProcessRunDetail_)
|
|
61954
|
+
async UpdateMJProcessRunDetail(
|
|
61955
|
+
@Arg('input', () => UpdateMJProcessRunDetailInput) input: UpdateMJProcessRunDetailInput,
|
|
61734
61956
|
@Ctx() { providers, userPayload }: AppContext,
|
|
61735
61957
|
@PubSub() pubSub: PubSubEngine
|
|
61736
61958
|
) {
|
|
61737
61959
|
const provider = GetReadWriteProvider(providers);
|
|
61738
|
-
return this.UpdateRecord('MJ:
|
|
61960
|
+
return this.UpdateRecord('MJ: Process Run Details', input, provider, userPayload, pubSub);
|
|
61739
61961
|
}
|
|
61740
61962
|
|
|
61741
|
-
@Mutation(() =>
|
|
61742
|
-
async
|
|
61963
|
+
@Mutation(() => MJProcessRunDetail_)
|
|
61964
|
+
async DeleteMJProcessRunDetail(@Arg('ID', () => String) ID: string, @Arg('options___', () => DeleteOptionsInput) options: DeleteOptionsInput, @Ctx() { providers, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
61743
61965
|
const provider = GetReadWriteProvider(providers);
|
|
61744
61966
|
const key = new CompositeKey([{FieldName: 'ID', Value: ID}]);
|
|
61745
|
-
return this.DeleteRecord('MJ:
|
|
61967
|
+
return this.DeleteRecord('MJ: Process Run Details', key, options, provider, userPayload, pubSub);
|
|
61746
61968
|
}
|
|
61747
61969
|
|
|
61748
61970
|
}
|
|
61749
61971
|
|
|
61750
61972
|
//****************************************************************************
|
|
61751
|
-
// ENTITY CLASS for MJ:
|
|
61973
|
+
// ENTITY CLASS for MJ: Process Runs
|
|
61752
61974
|
//****************************************************************************
|
|
61753
|
-
@ObjectType({ description: `
|
|
61754
|
-
export class
|
|
61975
|
+
@ObjectType({ description: `Source-agnostic header for one execution of any set-processing job. Deliberately generic: a Record Process run sets RecordProcessID, but legacy/engine-driven jobs (e.g., a geocoding sweep or vector sync) keep their own source tables and still record a run here with RecordProcessID = NULL, giving every batch a uniform audit + resume trail. EXAMPLE: the Saturday 2am run of "Weekly Customer Health Summary" over 1,284 active customers (RecordProcessID set, TriggeredBy=Schedule); or a nightly geocoding sweep (RecordProcessID NULL).` })
|
|
61976
|
+
export class MJProcessRun_ {
|
|
61755
61977
|
@Field()
|
|
61756
61978
|
@MaxLength(36)
|
|
61757
61979
|
ID: string;
|
|
61758
61980
|
|
|
61759
|
-
@Field({description: `
|
|
61760
|
-
@MaxLength(50)
|
|
61761
|
-
ResourceType: string;
|
|
61762
|
-
|
|
61763
|
-
@Field()
|
|
61981
|
+
@Field({nullable: true, description: `Foreign key to the Record Process that spawned this run; NULL for ad-hoc / engine-driven runs not tied to a saved definition`})
|
|
61764
61982
|
@MaxLength(36)
|
|
61765
|
-
|
|
61983
|
+
RecordProcessID?: string;
|
|
61766
61984
|
|
|
61767
|
-
@Field({description: `
|
|
61768
|
-
@MaxLength(
|
|
61769
|
-
|
|
61985
|
+
@Field({nullable: true, description: `Foreign key to the entity processed by this run, when the run is entity-scoped`})
|
|
61986
|
+
@MaxLength(36)
|
|
61987
|
+
EntityID?: string;
|
|
61770
61988
|
|
|
61771
|
-
@Field({
|
|
61772
|
-
@MaxLength(
|
|
61773
|
-
|
|
61989
|
+
@Field({description: `What triggered this run: OnChange, Schedule, OnDemand, or Manual`})
|
|
61990
|
+
@MaxLength(20)
|
|
61991
|
+
TriggeredBy: string;
|
|
61774
61992
|
|
|
61775
|
-
@Field({
|
|
61776
|
-
|
|
61993
|
+
@Field({description: `The kind of record-set source resolved for this run: View, List, Filter, Array, Keyset, or SingleRecord`})
|
|
61994
|
+
@MaxLength(20)
|
|
61995
|
+
SourceType: string;
|
|
61777
61996
|
|
|
61778
|
-
@Field(
|
|
61779
|
-
|
|
61997
|
+
@Field({nullable: true, description: `Polymorphic source identifier (e.g., ViewID or ListID) when applicable; no FK because it spans entities`})
|
|
61998
|
+
@MaxLength(36)
|
|
61999
|
+
SourceID?: string;
|
|
61780
62000
|
|
|
61781
|
-
@Field(
|
|
61782
|
-
|
|
62001
|
+
@Field({nullable: true, description: `Resolved filter snapshot used to materialize the record set for this run`})
|
|
62002
|
+
SourceFilter?: string;
|
|
61783
62003
|
|
|
61784
|
-
@Field()
|
|
62004
|
+
@Field({nullable: true, description: `Foreign key to the Scheduled Job Run that launched this run, when scheduler-launched`})
|
|
61785
62005
|
@MaxLength(36)
|
|
61786
|
-
|
|
62006
|
+
ScheduledJobRunID?: string;
|
|
61787
62007
|
|
|
61788
|
-
@Field(
|
|
61789
|
-
|
|
62008
|
+
@Field({description: `Run status: Pending, Running, Paused, Completed, Failed, or Cancelled`})
|
|
62009
|
+
@MaxLength(20)
|
|
62010
|
+
Status: string;
|
|
62011
|
+
|
|
62012
|
+
@Field({nullable: true, description: `When the run started`})
|
|
62013
|
+
StartTime?: Date;
|
|
62014
|
+
|
|
62015
|
+
@Field({nullable: true, description: `When the run ended`})
|
|
62016
|
+
EndTime?: Date;
|
|
62017
|
+
|
|
62018
|
+
@Field(() => Int, {nullable: true, description: `Estimated or known total number of records to process`})
|
|
62019
|
+
TotalItemCount?: number;
|
|
62020
|
+
|
|
62021
|
+
@Field(() => Int, {description: `Count of records processed so far`})
|
|
62022
|
+
ProcessedItems: number;
|
|
62023
|
+
|
|
62024
|
+
@Field(() => Int, {description: `Count of records processed successfully`})
|
|
62025
|
+
SuccessCount: number;
|
|
62026
|
+
|
|
62027
|
+
@Field(() => Int, {description: `Count of records that failed processing`})
|
|
62028
|
+
ErrorCount: number;
|
|
62029
|
+
|
|
62030
|
+
@Field(() => Int, {description: `Count of records skipped (e.g., unchanged per watermark)`})
|
|
62031
|
+
SkippedCount: number;
|
|
62032
|
+
|
|
62033
|
+
@Field(() => Int, {nullable: true, description: `Offset-based resume cursor (StartRow) for sources that paginate by offset`})
|
|
62034
|
+
LastProcessedOffset?: number;
|
|
62035
|
+
|
|
62036
|
+
@Field({nullable: true, description: `Keyset-based resume cursor (AfterKey) for sources that paginate by seek`})
|
|
62037
|
+
@MaxLength(450)
|
|
62038
|
+
LastProcessedKey?: string;
|
|
62039
|
+
|
|
62040
|
+
@Field(() => Int, {nullable: true, description: `Effective batch size for this run`})
|
|
62041
|
+
BatchSize?: number;
|
|
62042
|
+
|
|
62043
|
+
@Field(() => Boolean, {description: `Pause/cancel handshake flag honored by the processor between batches`})
|
|
62044
|
+
CancellationRequested: boolean;
|
|
62045
|
+
|
|
62046
|
+
@Field({nullable: true, description: `JSON snapshot of the effective configuration for this run`})
|
|
62047
|
+
Configuration?: string;
|
|
62048
|
+
|
|
62049
|
+
@Field({nullable: true, description: `Run-level error message when Status=Failed`})
|
|
62050
|
+
ErrorMessage?: string;
|
|
62051
|
+
|
|
62052
|
+
@Field({nullable: true, description: `Foreign key to the user who started the run`})
|
|
62053
|
+
@MaxLength(36)
|
|
62054
|
+
StartedByUserID?: string;
|
|
61790
62055
|
|
|
61791
62056
|
@Field()
|
|
61792
62057
|
_mj__CreatedAt: Date;
|
|
@@ -61794,46 +62059,106 @@ export class MJPublicLink_ {
|
|
|
61794
62059
|
@Field()
|
|
61795
62060
|
_mj__UpdatedAt: Date;
|
|
61796
62061
|
|
|
61797
|
-
@Field()
|
|
62062
|
+
@Field(() => Boolean, {description: `When 1, this run was a dry-run (compute-only) preview: the per-record diffs were computed and persisted as Process Run Details, but no changes were written back to the target records. When 0, the run applied its changes.`})
|
|
62063
|
+
DryRun: boolean;
|
|
62064
|
+
|
|
62065
|
+
@Field({nullable: true})
|
|
62066
|
+
@MaxLength(255)
|
|
62067
|
+
RecordProcess?: string;
|
|
62068
|
+
|
|
62069
|
+
@Field({nullable: true})
|
|
62070
|
+
@MaxLength(255)
|
|
62071
|
+
Entity?: string;
|
|
62072
|
+
|
|
62073
|
+
@Field({nullable: true})
|
|
62074
|
+
@MaxLength(200)
|
|
62075
|
+
ScheduledJobRun?: string;
|
|
62076
|
+
|
|
62077
|
+
@Field({nullable: true})
|
|
61798
62078
|
@MaxLength(100)
|
|
61799
|
-
|
|
62079
|
+
StartedByUser?: string;
|
|
61800
62080
|
|
|
62081
|
+
@Field(() => [MJProcessRunDetail_])
|
|
62082
|
+
MJProcessRunDetails_ProcessRunIDArray: MJProcessRunDetail_[]; // Link to MJProcessRunDetails
|
|
62083
|
+
|
|
61801
62084
|
}
|
|
61802
62085
|
|
|
61803
62086
|
//****************************************************************************
|
|
61804
|
-
// INPUT TYPE for MJ:
|
|
62087
|
+
// INPUT TYPE for MJ: Process Runs
|
|
61805
62088
|
//****************************************************************************
|
|
61806
62089
|
@InputType()
|
|
61807
|
-
export class
|
|
62090
|
+
export class CreateMJProcessRunInput {
|
|
61808
62091
|
@Field({ nullable: true })
|
|
61809
62092
|
ID?: string;
|
|
61810
62093
|
|
|
61811
62094
|
@Field({ nullable: true })
|
|
61812
|
-
|
|
62095
|
+
RecordProcessID: string | null;
|
|
61813
62096
|
|
|
61814
62097
|
@Field({ nullable: true })
|
|
61815
|
-
|
|
62098
|
+
EntityID: string | null;
|
|
61816
62099
|
|
|
61817
62100
|
@Field({ nullable: true })
|
|
61818
|
-
|
|
62101
|
+
TriggeredBy?: string;
|
|
61819
62102
|
|
|
61820
62103
|
@Field({ nullable: true })
|
|
61821
|
-
|
|
62104
|
+
SourceType?: string;
|
|
61822
62105
|
|
|
61823
62106
|
@Field({ nullable: true })
|
|
61824
|
-
|
|
62107
|
+
SourceID: string | null;
|
|
62108
|
+
|
|
62109
|
+
@Field({ nullable: true })
|
|
62110
|
+
SourceFilter: string | null;
|
|
62111
|
+
|
|
62112
|
+
@Field({ nullable: true })
|
|
62113
|
+
ScheduledJobRunID: string | null;
|
|
62114
|
+
|
|
62115
|
+
@Field({ nullable: true })
|
|
62116
|
+
Status?: string;
|
|
62117
|
+
|
|
62118
|
+
@Field({ nullable: true })
|
|
62119
|
+
StartTime: Date | null;
|
|
62120
|
+
|
|
62121
|
+
@Field({ nullable: true })
|
|
62122
|
+
EndTime: Date | null;
|
|
61825
62123
|
|
|
61826
62124
|
@Field(() => Int, { nullable: true })
|
|
61827
|
-
|
|
62125
|
+
TotalItemCount: number | null;
|
|
61828
62126
|
|
|
61829
62127
|
@Field(() => Int, { nullable: true })
|
|
61830
|
-
|
|
62128
|
+
ProcessedItems?: number;
|
|
62129
|
+
|
|
62130
|
+
@Field(() => Int, { nullable: true })
|
|
62131
|
+
SuccessCount?: number;
|
|
62132
|
+
|
|
62133
|
+
@Field(() => Int, { nullable: true })
|
|
62134
|
+
ErrorCount?: number;
|
|
62135
|
+
|
|
62136
|
+
@Field(() => Int, { nullable: true })
|
|
62137
|
+
SkippedCount?: number;
|
|
62138
|
+
|
|
62139
|
+
@Field(() => Int, { nullable: true })
|
|
62140
|
+
LastProcessedOffset: number | null;
|
|
61831
62141
|
|
|
61832
62142
|
@Field({ nullable: true })
|
|
61833
|
-
|
|
62143
|
+
LastProcessedKey: string | null;
|
|
62144
|
+
|
|
62145
|
+
@Field(() => Int, { nullable: true })
|
|
62146
|
+
BatchSize: number | null;
|
|
61834
62147
|
|
|
61835
62148
|
@Field(() => Boolean, { nullable: true })
|
|
61836
|
-
|
|
62149
|
+
CancellationRequested?: boolean;
|
|
62150
|
+
|
|
62151
|
+
@Field({ nullable: true })
|
|
62152
|
+
Configuration: string | null;
|
|
62153
|
+
|
|
62154
|
+
@Field({ nullable: true })
|
|
62155
|
+
ErrorMessage: string | null;
|
|
62156
|
+
|
|
62157
|
+
@Field({ nullable: true })
|
|
62158
|
+
StartedByUserID: string | null;
|
|
62159
|
+
|
|
62160
|
+
@Field(() => Boolean, { nullable: true })
|
|
62161
|
+
DryRun?: boolean;
|
|
61837
62162
|
|
|
61838
62163
|
@Field(() => RestoreContextInput, { nullable: true })
|
|
61839
62164
|
RestoreContext___?: RestoreContextInput;
|
|
@@ -61841,39 +62166,81 @@ export class CreateMJPublicLinkInput {
|
|
|
61841
62166
|
|
|
61842
62167
|
|
|
61843
62168
|
//****************************************************************************
|
|
61844
|
-
// INPUT TYPE for MJ:
|
|
62169
|
+
// INPUT TYPE for MJ: Process Runs
|
|
61845
62170
|
//****************************************************************************
|
|
61846
62171
|
@InputType()
|
|
61847
|
-
export class
|
|
62172
|
+
export class UpdateMJProcessRunInput {
|
|
61848
62173
|
@Field()
|
|
61849
62174
|
ID: string;
|
|
61850
62175
|
|
|
61851
62176
|
@Field({ nullable: true })
|
|
61852
|
-
|
|
62177
|
+
RecordProcessID?: string | null;
|
|
61853
62178
|
|
|
61854
62179
|
@Field({ nullable: true })
|
|
61855
|
-
|
|
62180
|
+
EntityID?: string | null;
|
|
61856
62181
|
|
|
61857
62182
|
@Field({ nullable: true })
|
|
61858
|
-
|
|
62183
|
+
TriggeredBy?: string;
|
|
61859
62184
|
|
|
61860
62185
|
@Field({ nullable: true })
|
|
61861
|
-
|
|
62186
|
+
SourceType?: string;
|
|
61862
62187
|
|
|
61863
62188
|
@Field({ nullable: true })
|
|
61864
|
-
|
|
62189
|
+
SourceID?: string | null;
|
|
62190
|
+
|
|
62191
|
+
@Field({ nullable: true })
|
|
62192
|
+
SourceFilter?: string | null;
|
|
62193
|
+
|
|
62194
|
+
@Field({ nullable: true })
|
|
62195
|
+
ScheduledJobRunID?: string | null;
|
|
62196
|
+
|
|
62197
|
+
@Field({ nullable: true })
|
|
62198
|
+
Status?: string;
|
|
62199
|
+
|
|
62200
|
+
@Field({ nullable: true })
|
|
62201
|
+
StartTime?: Date | null;
|
|
62202
|
+
|
|
62203
|
+
@Field({ nullable: true })
|
|
62204
|
+
EndTime?: Date | null;
|
|
61865
62205
|
|
|
61866
62206
|
@Field(() => Int, { nullable: true })
|
|
61867
|
-
|
|
62207
|
+
TotalItemCount?: number | null;
|
|
61868
62208
|
|
|
61869
62209
|
@Field(() => Int, { nullable: true })
|
|
61870
|
-
|
|
62210
|
+
ProcessedItems?: number;
|
|
62211
|
+
|
|
62212
|
+
@Field(() => Int, { nullable: true })
|
|
62213
|
+
SuccessCount?: number;
|
|
62214
|
+
|
|
62215
|
+
@Field(() => Int, { nullable: true })
|
|
62216
|
+
ErrorCount?: number;
|
|
62217
|
+
|
|
62218
|
+
@Field(() => Int, { nullable: true })
|
|
62219
|
+
SkippedCount?: number;
|
|
62220
|
+
|
|
62221
|
+
@Field(() => Int, { nullable: true })
|
|
62222
|
+
LastProcessedOffset?: number | null;
|
|
61871
62223
|
|
|
61872
62224
|
@Field({ nullable: true })
|
|
61873
|
-
|
|
62225
|
+
LastProcessedKey?: string | null;
|
|
62226
|
+
|
|
62227
|
+
@Field(() => Int, { nullable: true })
|
|
62228
|
+
BatchSize?: number | null;
|
|
61874
62229
|
|
|
61875
62230
|
@Field(() => Boolean, { nullable: true })
|
|
61876
|
-
|
|
62231
|
+
CancellationRequested?: boolean;
|
|
62232
|
+
|
|
62233
|
+
@Field({ nullable: true })
|
|
62234
|
+
Configuration?: string | null;
|
|
62235
|
+
|
|
62236
|
+
@Field({ nullable: true })
|
|
62237
|
+
ErrorMessage?: string | null;
|
|
62238
|
+
|
|
62239
|
+
@Field({ nullable: true })
|
|
62240
|
+
StartedByUserID?: string | null;
|
|
62241
|
+
|
|
62242
|
+
@Field(() => Boolean, { nullable: true })
|
|
62243
|
+
DryRun?: boolean;
|
|
61877
62244
|
|
|
61878
62245
|
@Field(() => [KeyValuePairInput], { nullable: true })
|
|
61879
62246
|
OldValues___?: KeyValuePairInput[];
|
|
@@ -61883,12 +62250,12 @@ export class UpdateMJPublicLinkInput {
|
|
|
61883
62250
|
}
|
|
61884
62251
|
|
|
61885
62252
|
//****************************************************************************
|
|
61886
|
-
// RESOLVER for MJ:
|
|
62253
|
+
// RESOLVER for MJ: Process Runs
|
|
61887
62254
|
//****************************************************************************
|
|
61888
62255
|
@ObjectType()
|
|
61889
|
-
export class
|
|
61890
|
-
@Field(() => [
|
|
61891
|
-
Results:
|
|
62256
|
+
export class RunMJProcessRunViewResult {
|
|
62257
|
+
@Field(() => [MJProcessRun_])
|
|
62258
|
+
Results: MJProcessRun_[];
|
|
61892
62259
|
|
|
61893
62260
|
@Field(() => String, {nullable: true})
|
|
61894
62261
|
UserViewRunID?: string;
|
|
@@ -61909,81 +62276,562 @@ export class RunMJPublicLinkViewResult {
|
|
|
61909
62276
|
Success: boolean;
|
|
61910
62277
|
}
|
|
61911
62278
|
|
|
61912
|
-
@Resolver(
|
|
61913
|
-
export class
|
|
61914
|
-
@Query(() =>
|
|
61915
|
-
async
|
|
62279
|
+
@Resolver(MJProcessRun_)
|
|
62280
|
+
export class MJProcessRunResolver extends ResolverBase {
|
|
62281
|
+
@Query(() => RunMJProcessRunViewResult)
|
|
62282
|
+
async RunMJProcessRunViewByID(@Arg('input', () => RunViewByIDInput) input: RunViewByIDInput, @Ctx() { providers, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
61916
62283
|
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
61917
62284
|
return super.RunViewByIDGeneric(input, provider, userPayload, pubSub);
|
|
61918
62285
|
}
|
|
61919
62286
|
|
|
61920
|
-
@Query(() =>
|
|
61921
|
-
async
|
|
62287
|
+
@Query(() => RunMJProcessRunViewResult)
|
|
62288
|
+
async RunMJProcessRunViewByName(@Arg('input', () => RunViewByNameInput) input: RunViewByNameInput, @Ctx() { providers, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
61922
62289
|
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
61923
62290
|
return super.RunViewByNameGeneric(input, provider, userPayload, pubSub);
|
|
61924
62291
|
}
|
|
61925
62292
|
|
|
61926
|
-
@Query(() =>
|
|
61927
|
-
async
|
|
62293
|
+
@Query(() => RunMJProcessRunViewResult)
|
|
62294
|
+
async RunMJProcessRunDynamicView(@Arg('input', () => RunDynamicViewInput) input: RunDynamicViewInput, @Ctx() { providers, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
61928
62295
|
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
61929
|
-
input.EntityName = 'MJ:
|
|
62296
|
+
input.EntityName = 'MJ: Process Runs';
|
|
61930
62297
|
return super.RunDynamicViewGeneric(input, provider, userPayload, pubSub);
|
|
61931
62298
|
}
|
|
61932
|
-
@Query(() =>
|
|
61933
|
-
async
|
|
61934
|
-
this.CheckUserReadPermissions('MJ:
|
|
62299
|
+
@Query(() => MJProcessRun_, { nullable: true })
|
|
62300
|
+
async MJProcessRun(@Arg('ID', () => String) ID: string, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine): Promise<MJProcessRun_ | null> {
|
|
62301
|
+
this.CheckUserReadPermissions('MJ: Process Runs', userPayload);
|
|
61935
62302
|
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
61936
|
-
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, '
|
|
62303
|
+
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwProcessRuns')} WHERE ${provider.QuoteIdentifier('ID')}=${provider.BuildParameterPlaceholder(0)} ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: Process Runs', userPayload, EntityPermissionType.Read, 'AND');
|
|
61937
62304
|
const rows = await provider.ExecuteSQL(sSQL, [ID], undefined, this.GetUserFromPayload(userPayload));
|
|
61938
|
-
const result = await this.MapFieldNamesToCodeNames('MJ:
|
|
62305
|
+
const result = await this.MapFieldNamesToCodeNames('MJ: Process Runs', rows && rows.length > 0 ? rows[0] : null, this.GetUserFromPayload(userPayload));
|
|
61939
62306
|
return result;
|
|
61940
62307
|
}
|
|
61941
62308
|
|
|
61942
|
-
@
|
|
61943
|
-
async
|
|
61944
|
-
|
|
62309
|
+
@FieldResolver(() => [MJProcessRunDetail_])
|
|
62310
|
+
async MJProcessRunDetails_ProcessRunIDArray(@Root() mjprocessrun_: MJProcessRun_, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
62311
|
+
this.CheckUserReadPermissions('MJ: Process Run Details', userPayload);
|
|
62312
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
62313
|
+
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwProcessRunDetails')} WHERE ${provider.QuoteIdentifier('ProcessRunID')}=${provider.BuildParameterPlaceholder(0)} ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: Process Run Details', userPayload, EntityPermissionType.Read, 'AND');
|
|
62314
|
+
const rows = await provider.ExecuteSQL(sSQL, [mjprocessrun_.ID], undefined, this.GetUserFromPayload(userPayload));
|
|
62315
|
+
const result = await this.ArrayMapFieldNamesToCodeNames('MJ: Process Run Details', rows, this.GetUserFromPayload(userPayload));
|
|
62316
|
+
return result;
|
|
62317
|
+
}
|
|
62318
|
+
|
|
62319
|
+
@Mutation(() => MJProcessRun_)
|
|
62320
|
+
async CreateMJProcessRun(
|
|
62321
|
+
@Arg('input', () => CreateMJProcessRunInput) input: CreateMJProcessRunInput,
|
|
61945
62322
|
@Ctx() { providers, userPayload }: AppContext,
|
|
61946
62323
|
@PubSub() pubSub: PubSubEngine
|
|
61947
62324
|
) {
|
|
61948
62325
|
const provider = GetReadWriteProvider(providers);
|
|
61949
|
-
return this.CreateRecord('MJ:
|
|
62326
|
+
return this.CreateRecord('MJ: Process Runs', input, provider, userPayload, pubSub)
|
|
61950
62327
|
}
|
|
61951
62328
|
|
|
61952
|
-
@Mutation(() =>
|
|
61953
|
-
async
|
|
61954
|
-
@Arg('input', () =>
|
|
62329
|
+
@Mutation(() => MJProcessRun_)
|
|
62330
|
+
async UpdateMJProcessRun(
|
|
62331
|
+
@Arg('input', () => UpdateMJProcessRunInput) input: UpdateMJProcessRunInput,
|
|
61955
62332
|
@Ctx() { providers, userPayload }: AppContext,
|
|
61956
62333
|
@PubSub() pubSub: PubSubEngine
|
|
61957
62334
|
) {
|
|
61958
62335
|
const provider = GetReadWriteProvider(providers);
|
|
61959
|
-
return this.UpdateRecord('MJ:
|
|
62336
|
+
return this.UpdateRecord('MJ: Process Runs', input, provider, userPayload, pubSub);
|
|
61960
62337
|
}
|
|
61961
62338
|
|
|
61962
|
-
@Mutation(() =>
|
|
61963
|
-
async
|
|
62339
|
+
@Mutation(() => MJProcessRun_)
|
|
62340
|
+
async DeleteMJProcessRun(@Arg('ID', () => String) ID: string, @Arg('options___', () => DeleteOptionsInput) options: DeleteOptionsInput, @Ctx() { providers, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
61964
62341
|
const provider = GetReadWriteProvider(providers);
|
|
61965
62342
|
const key = new CompositeKey([{FieldName: 'ID', Value: ID}]);
|
|
61966
|
-
return this.DeleteRecord('MJ:
|
|
62343
|
+
return this.DeleteRecord('MJ: Process Runs', key, options, provider, userPayload, pubSub);
|
|
61967
62344
|
}
|
|
61968
62345
|
|
|
61969
62346
|
}
|
|
61970
62347
|
|
|
61971
62348
|
//****************************************************************************
|
|
61972
|
-
// ENTITY CLASS for MJ:
|
|
62349
|
+
// ENTITY CLASS for MJ: Projects
|
|
61973
62350
|
//****************************************************************************
|
|
61974
|
-
@ObjectType({ description: `
|
|
61975
|
-
export class
|
|
62351
|
+
@ObjectType({ description: `Container for grouping related conversations around a common topic, client, or initiative. Supports nesting for sub-projects.` })
|
|
62352
|
+
export class MJProject_ {
|
|
61976
62353
|
@Field()
|
|
61977
62354
|
@MaxLength(36)
|
|
61978
62355
|
ID: string;
|
|
61979
62356
|
|
|
61980
62357
|
@Field()
|
|
61981
|
-
@MaxLength(
|
|
61982
|
-
|
|
62358
|
+
@MaxLength(36)
|
|
62359
|
+
EnvironmentID: string;
|
|
61983
62360
|
|
|
61984
62361
|
@Field({nullable: true})
|
|
61985
62362
|
@MaxLength(36)
|
|
61986
|
-
|
|
62363
|
+
ParentID?: string;
|
|
62364
|
+
|
|
62365
|
+
@Field({description: `Display name for the project`})
|
|
62366
|
+
@MaxLength(255)
|
|
62367
|
+
Name: string;
|
|
62368
|
+
|
|
62369
|
+
@Field({nullable: true, description: `Detailed description of the project goals and scope`})
|
|
62370
|
+
Description?: string;
|
|
62371
|
+
|
|
62372
|
+
@Field({nullable: true, description: `Hex color code for project badges in UI (#RRGGBB format)`})
|
|
62373
|
+
@MaxLength(7)
|
|
62374
|
+
Color?: string;
|
|
62375
|
+
|
|
62376
|
+
@Field({nullable: true, description: `Font Awesome icon class for UI display`})
|
|
62377
|
+
@MaxLength(50)
|
|
62378
|
+
Icon?: string;
|
|
62379
|
+
|
|
62380
|
+
@Field(() => Boolean, {description: `Indicates if this project is archived and should be hidden from active lists`})
|
|
62381
|
+
IsArchived: boolean;
|
|
62382
|
+
|
|
62383
|
+
@Field()
|
|
62384
|
+
_mj__CreatedAt: Date;
|
|
62385
|
+
|
|
62386
|
+
@Field()
|
|
62387
|
+
_mj__UpdatedAt: Date;
|
|
62388
|
+
|
|
62389
|
+
@Field()
|
|
62390
|
+
@MaxLength(255)
|
|
62391
|
+
Environment: string;
|
|
62392
|
+
|
|
62393
|
+
@Field({nullable: true})
|
|
62394
|
+
@MaxLength(255)
|
|
62395
|
+
Parent?: string;
|
|
62396
|
+
|
|
62397
|
+
@Field({nullable: true})
|
|
62398
|
+
@MaxLength(36)
|
|
62399
|
+
RootParentID?: string;
|
|
62400
|
+
|
|
62401
|
+
@Field(() => [MJProject_])
|
|
62402
|
+
MJProjects_ParentIDArray: MJProject_[]; // Link to MJProjects
|
|
62403
|
+
|
|
62404
|
+
@Field(() => [MJConversation_])
|
|
62405
|
+
MJConversations_ProjectIDArray: MJConversation_[]; // Link to MJConversations
|
|
62406
|
+
|
|
62407
|
+
@Field(() => [MJTask_])
|
|
62408
|
+
MJTasks_ProjectIDArray: MJTask_[]; // Link to MJTasks
|
|
62409
|
+
|
|
62410
|
+
}
|
|
62411
|
+
|
|
62412
|
+
//****************************************************************************
|
|
62413
|
+
// INPUT TYPE for MJ: Projects
|
|
62414
|
+
//****************************************************************************
|
|
62415
|
+
@InputType()
|
|
62416
|
+
export class CreateMJProjectInput {
|
|
62417
|
+
@Field({ nullable: true })
|
|
62418
|
+
ID?: string;
|
|
62419
|
+
|
|
62420
|
+
@Field({ nullable: true })
|
|
62421
|
+
EnvironmentID?: string;
|
|
62422
|
+
|
|
62423
|
+
@Field({ nullable: true })
|
|
62424
|
+
ParentID: string | null;
|
|
62425
|
+
|
|
62426
|
+
@Field({ nullable: true })
|
|
62427
|
+
Name?: string;
|
|
62428
|
+
|
|
62429
|
+
@Field({ nullable: true })
|
|
62430
|
+
Description: string | null;
|
|
62431
|
+
|
|
62432
|
+
@Field({ nullable: true })
|
|
62433
|
+
Color: string | null;
|
|
62434
|
+
|
|
62435
|
+
@Field({ nullable: true })
|
|
62436
|
+
Icon: string | null;
|
|
62437
|
+
|
|
62438
|
+
@Field(() => Boolean, { nullable: true })
|
|
62439
|
+
IsArchived?: boolean;
|
|
62440
|
+
|
|
62441
|
+
@Field(() => RestoreContextInput, { nullable: true })
|
|
62442
|
+
RestoreContext___?: RestoreContextInput;
|
|
62443
|
+
}
|
|
62444
|
+
|
|
62445
|
+
|
|
62446
|
+
//****************************************************************************
|
|
62447
|
+
// INPUT TYPE for MJ: Projects
|
|
62448
|
+
//****************************************************************************
|
|
62449
|
+
@InputType()
|
|
62450
|
+
export class UpdateMJProjectInput {
|
|
62451
|
+
@Field()
|
|
62452
|
+
ID: string;
|
|
62453
|
+
|
|
62454
|
+
@Field({ nullable: true })
|
|
62455
|
+
EnvironmentID?: string;
|
|
62456
|
+
|
|
62457
|
+
@Field({ nullable: true })
|
|
62458
|
+
ParentID?: string | null;
|
|
62459
|
+
|
|
62460
|
+
@Field({ nullable: true })
|
|
62461
|
+
Name?: string;
|
|
62462
|
+
|
|
62463
|
+
@Field({ nullable: true })
|
|
62464
|
+
Description?: string | null;
|
|
62465
|
+
|
|
62466
|
+
@Field({ nullable: true })
|
|
62467
|
+
Color?: string | null;
|
|
62468
|
+
|
|
62469
|
+
@Field({ nullable: true })
|
|
62470
|
+
Icon?: string | null;
|
|
62471
|
+
|
|
62472
|
+
@Field(() => Boolean, { nullable: true })
|
|
62473
|
+
IsArchived?: boolean;
|
|
62474
|
+
|
|
62475
|
+
@Field(() => [KeyValuePairInput], { nullable: true })
|
|
62476
|
+
OldValues___?: KeyValuePairInput[];
|
|
62477
|
+
|
|
62478
|
+
@Field(() => RestoreContextInput, { nullable: true })
|
|
62479
|
+
RestoreContext___?: RestoreContextInput;
|
|
62480
|
+
}
|
|
62481
|
+
|
|
62482
|
+
//****************************************************************************
|
|
62483
|
+
// RESOLVER for MJ: Projects
|
|
62484
|
+
//****************************************************************************
|
|
62485
|
+
@ObjectType()
|
|
62486
|
+
export class RunMJProjectViewResult {
|
|
62487
|
+
@Field(() => [MJProject_])
|
|
62488
|
+
Results: MJProject_[];
|
|
62489
|
+
|
|
62490
|
+
@Field(() => String, {nullable: true})
|
|
62491
|
+
UserViewRunID?: string;
|
|
62492
|
+
|
|
62493
|
+
@Field(() => Int, {nullable: true})
|
|
62494
|
+
RowCount: number;
|
|
62495
|
+
|
|
62496
|
+
@Field(() => Int, {nullable: true})
|
|
62497
|
+
TotalRowCount: number;
|
|
62498
|
+
|
|
62499
|
+
@Field(() => Int, {nullable: true})
|
|
62500
|
+
ExecutionTime: number;
|
|
62501
|
+
|
|
62502
|
+
@Field({nullable: true})
|
|
62503
|
+
ErrorMessage?: string;
|
|
62504
|
+
|
|
62505
|
+
@Field(() => Boolean, {nullable: false})
|
|
62506
|
+
Success: boolean;
|
|
62507
|
+
}
|
|
62508
|
+
|
|
62509
|
+
@Resolver(MJProject_)
|
|
62510
|
+
export class MJProjectResolver extends ResolverBase {
|
|
62511
|
+
@Query(() => RunMJProjectViewResult)
|
|
62512
|
+
async RunMJProjectViewByID(@Arg('input', () => RunViewByIDInput) input: RunViewByIDInput, @Ctx() { providers, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
62513
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
62514
|
+
return super.RunViewByIDGeneric(input, provider, userPayload, pubSub);
|
|
62515
|
+
}
|
|
62516
|
+
|
|
62517
|
+
@Query(() => RunMJProjectViewResult)
|
|
62518
|
+
async RunMJProjectViewByName(@Arg('input', () => RunViewByNameInput) input: RunViewByNameInput, @Ctx() { providers, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
62519
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
62520
|
+
return super.RunViewByNameGeneric(input, provider, userPayload, pubSub);
|
|
62521
|
+
}
|
|
62522
|
+
|
|
62523
|
+
@Query(() => RunMJProjectViewResult)
|
|
62524
|
+
async RunMJProjectDynamicView(@Arg('input', () => RunDynamicViewInput) input: RunDynamicViewInput, @Ctx() { providers, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
62525
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
62526
|
+
input.EntityName = 'MJ: Projects';
|
|
62527
|
+
return super.RunDynamicViewGeneric(input, provider, userPayload, pubSub);
|
|
62528
|
+
}
|
|
62529
|
+
@Query(() => MJProject_, { nullable: true })
|
|
62530
|
+
async MJProject(@Arg('ID', () => String) ID: string, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine): Promise<MJProject_ | null> {
|
|
62531
|
+
this.CheckUserReadPermissions('MJ: Projects', userPayload);
|
|
62532
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
62533
|
+
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwProjects')} WHERE ${provider.QuoteIdentifier('ID')}=${provider.BuildParameterPlaceholder(0)} ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: Projects', userPayload, EntityPermissionType.Read, 'AND');
|
|
62534
|
+
const rows = await provider.ExecuteSQL(sSQL, [ID], undefined, this.GetUserFromPayload(userPayload));
|
|
62535
|
+
const result = await this.MapFieldNamesToCodeNames('MJ: Projects', rows && rows.length > 0 ? rows[0] : null, this.GetUserFromPayload(userPayload));
|
|
62536
|
+
return result;
|
|
62537
|
+
}
|
|
62538
|
+
|
|
62539
|
+
@FieldResolver(() => [MJProject_])
|
|
62540
|
+
async MJProjects_ParentIDArray(@Root() mjproject_: MJProject_, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
62541
|
+
this.CheckUserReadPermissions('MJ: Projects', userPayload);
|
|
62542
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
62543
|
+
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwProjects')} WHERE ${provider.QuoteIdentifier('ParentID')}=${provider.BuildParameterPlaceholder(0)} ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: Projects', userPayload, EntityPermissionType.Read, 'AND');
|
|
62544
|
+
const rows = await provider.ExecuteSQL(sSQL, [mjproject_.ID], undefined, this.GetUserFromPayload(userPayload));
|
|
62545
|
+
const result = await this.ArrayMapFieldNamesToCodeNames('MJ: Projects', rows, this.GetUserFromPayload(userPayload));
|
|
62546
|
+
return result;
|
|
62547
|
+
}
|
|
62548
|
+
|
|
62549
|
+
@FieldResolver(() => [MJConversation_])
|
|
62550
|
+
async MJConversations_ProjectIDArray(@Root() mjproject_: MJProject_, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
62551
|
+
this.CheckUserReadPermissions('MJ: Conversations', userPayload);
|
|
62552
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
62553
|
+
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwConversations')} WHERE ${provider.QuoteIdentifier('ProjectID')}=${provider.BuildParameterPlaceholder(0)} ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: Conversations', userPayload, EntityPermissionType.Read, 'AND');
|
|
62554
|
+
const rows = await provider.ExecuteSQL(sSQL, [mjproject_.ID], undefined, this.GetUserFromPayload(userPayload));
|
|
62555
|
+
const result = await this.ArrayMapFieldNamesToCodeNames('MJ: Conversations', rows, this.GetUserFromPayload(userPayload));
|
|
62556
|
+
return result;
|
|
62557
|
+
}
|
|
62558
|
+
|
|
62559
|
+
@FieldResolver(() => [MJTask_])
|
|
62560
|
+
async MJTasks_ProjectIDArray(@Root() mjproject_: MJProject_, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
62561
|
+
this.CheckUserReadPermissions('MJ: Tasks', userPayload);
|
|
62562
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
62563
|
+
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwTasks')} WHERE ${provider.QuoteIdentifier('ProjectID')}=${provider.BuildParameterPlaceholder(0)} ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: Tasks', userPayload, EntityPermissionType.Read, 'AND');
|
|
62564
|
+
const rows = await provider.ExecuteSQL(sSQL, [mjproject_.ID], undefined, this.GetUserFromPayload(userPayload));
|
|
62565
|
+
const result = await this.ArrayMapFieldNamesToCodeNames('MJ: Tasks', rows, this.GetUserFromPayload(userPayload));
|
|
62566
|
+
return result;
|
|
62567
|
+
}
|
|
62568
|
+
|
|
62569
|
+
@Mutation(() => MJProject_)
|
|
62570
|
+
async CreateMJProject(
|
|
62571
|
+
@Arg('input', () => CreateMJProjectInput) input: CreateMJProjectInput,
|
|
62572
|
+
@Ctx() { providers, userPayload }: AppContext,
|
|
62573
|
+
@PubSub() pubSub: PubSubEngine
|
|
62574
|
+
) {
|
|
62575
|
+
const provider = GetReadWriteProvider(providers);
|
|
62576
|
+
return this.CreateRecord('MJ: Projects', input, provider, userPayload, pubSub)
|
|
62577
|
+
}
|
|
62578
|
+
|
|
62579
|
+
@Mutation(() => MJProject_)
|
|
62580
|
+
async UpdateMJProject(
|
|
62581
|
+
@Arg('input', () => UpdateMJProjectInput) input: UpdateMJProjectInput,
|
|
62582
|
+
@Ctx() { providers, userPayload }: AppContext,
|
|
62583
|
+
@PubSub() pubSub: PubSubEngine
|
|
62584
|
+
) {
|
|
62585
|
+
const provider = GetReadWriteProvider(providers);
|
|
62586
|
+
return this.UpdateRecord('MJ: Projects', input, provider, userPayload, pubSub);
|
|
62587
|
+
}
|
|
62588
|
+
|
|
62589
|
+
@Mutation(() => MJProject_)
|
|
62590
|
+
async DeleteMJProject(@Arg('ID', () => String) ID: string, @Arg('options___', () => DeleteOptionsInput) options: DeleteOptionsInput, @Ctx() { providers, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
62591
|
+
const provider = GetReadWriteProvider(providers);
|
|
62592
|
+
const key = new CompositeKey([{FieldName: 'ID', Value: ID}]);
|
|
62593
|
+
return this.DeleteRecord('MJ: Projects', key, options, provider, userPayload, pubSub);
|
|
62594
|
+
}
|
|
62595
|
+
|
|
62596
|
+
}
|
|
62597
|
+
|
|
62598
|
+
//****************************************************************************
|
|
62599
|
+
// ENTITY CLASS for MJ: Public Links
|
|
62600
|
+
//****************************************************************************
|
|
62601
|
+
@ObjectType({ description: `Shareable links for external access to artifacts and other resources. Supports password protection and expiration.` })
|
|
62602
|
+
export class MJPublicLink_ {
|
|
62603
|
+
@Field()
|
|
62604
|
+
@MaxLength(36)
|
|
62605
|
+
ID: string;
|
|
62606
|
+
|
|
62607
|
+
@Field({description: `Type of resource being shared (Artifact, Conversation, Collection)`})
|
|
62608
|
+
@MaxLength(50)
|
|
62609
|
+
ResourceType: string;
|
|
62610
|
+
|
|
62611
|
+
@Field()
|
|
62612
|
+
@MaxLength(36)
|
|
62613
|
+
ResourceID: string;
|
|
62614
|
+
|
|
62615
|
+
@Field({description: `Unique token for accessing the shared resource via URL`})
|
|
62616
|
+
@MaxLength(255)
|
|
62617
|
+
Token: string;
|
|
62618
|
+
|
|
62619
|
+
@Field({nullable: true, description: `SHA256 hash of optional password for additional security`})
|
|
62620
|
+
@MaxLength(255)
|
|
62621
|
+
PasswordHash?: string;
|
|
62622
|
+
|
|
62623
|
+
@Field({nullable: true, description: `Optional expiration date/time for this public link`})
|
|
62624
|
+
ExpiresAt?: Date;
|
|
62625
|
+
|
|
62626
|
+
@Field(() => Int, {nullable: true, description: `Maximum number of times this link can be viewed`})
|
|
62627
|
+
MaxViews?: number;
|
|
62628
|
+
|
|
62629
|
+
@Field(() => Int, {description: `Current count of how many times this link has been viewed`})
|
|
62630
|
+
CurrentViews: number;
|
|
62631
|
+
|
|
62632
|
+
@Field()
|
|
62633
|
+
@MaxLength(36)
|
|
62634
|
+
UserID: string;
|
|
62635
|
+
|
|
62636
|
+
@Field(() => Boolean, {description: `Indicates if this link is currently active and accessible`})
|
|
62637
|
+
IsActive: boolean;
|
|
62638
|
+
|
|
62639
|
+
@Field()
|
|
62640
|
+
_mj__CreatedAt: Date;
|
|
62641
|
+
|
|
62642
|
+
@Field()
|
|
62643
|
+
_mj__UpdatedAt: Date;
|
|
62644
|
+
|
|
62645
|
+
@Field()
|
|
62646
|
+
@MaxLength(100)
|
|
62647
|
+
User: string;
|
|
62648
|
+
|
|
62649
|
+
}
|
|
62650
|
+
|
|
62651
|
+
//****************************************************************************
|
|
62652
|
+
// INPUT TYPE for MJ: Public Links
|
|
62653
|
+
//****************************************************************************
|
|
62654
|
+
@InputType()
|
|
62655
|
+
export class CreateMJPublicLinkInput {
|
|
62656
|
+
@Field({ nullable: true })
|
|
62657
|
+
ID?: string;
|
|
62658
|
+
|
|
62659
|
+
@Field({ nullable: true })
|
|
62660
|
+
ResourceType?: string;
|
|
62661
|
+
|
|
62662
|
+
@Field({ nullable: true })
|
|
62663
|
+
ResourceID?: string;
|
|
62664
|
+
|
|
62665
|
+
@Field({ nullable: true })
|
|
62666
|
+
Token?: string;
|
|
62667
|
+
|
|
62668
|
+
@Field({ nullable: true })
|
|
62669
|
+
PasswordHash: string | null;
|
|
62670
|
+
|
|
62671
|
+
@Field({ nullable: true })
|
|
62672
|
+
ExpiresAt: Date | null;
|
|
62673
|
+
|
|
62674
|
+
@Field(() => Int, { nullable: true })
|
|
62675
|
+
MaxViews: number | null;
|
|
62676
|
+
|
|
62677
|
+
@Field(() => Int, { nullable: true })
|
|
62678
|
+
CurrentViews?: number;
|
|
62679
|
+
|
|
62680
|
+
@Field({ nullable: true })
|
|
62681
|
+
UserID?: string;
|
|
62682
|
+
|
|
62683
|
+
@Field(() => Boolean, { nullable: true })
|
|
62684
|
+
IsActive?: boolean;
|
|
62685
|
+
|
|
62686
|
+
@Field(() => RestoreContextInput, { nullable: true })
|
|
62687
|
+
RestoreContext___?: RestoreContextInput;
|
|
62688
|
+
}
|
|
62689
|
+
|
|
62690
|
+
|
|
62691
|
+
//****************************************************************************
|
|
62692
|
+
// INPUT TYPE for MJ: Public Links
|
|
62693
|
+
//****************************************************************************
|
|
62694
|
+
@InputType()
|
|
62695
|
+
export class UpdateMJPublicLinkInput {
|
|
62696
|
+
@Field()
|
|
62697
|
+
ID: string;
|
|
62698
|
+
|
|
62699
|
+
@Field({ nullable: true })
|
|
62700
|
+
ResourceType?: string;
|
|
62701
|
+
|
|
62702
|
+
@Field({ nullable: true })
|
|
62703
|
+
ResourceID?: string;
|
|
62704
|
+
|
|
62705
|
+
@Field({ nullable: true })
|
|
62706
|
+
Token?: string;
|
|
62707
|
+
|
|
62708
|
+
@Field({ nullable: true })
|
|
62709
|
+
PasswordHash?: string | null;
|
|
62710
|
+
|
|
62711
|
+
@Field({ nullable: true })
|
|
62712
|
+
ExpiresAt?: Date | null;
|
|
62713
|
+
|
|
62714
|
+
@Field(() => Int, { nullable: true })
|
|
62715
|
+
MaxViews?: number | null;
|
|
62716
|
+
|
|
62717
|
+
@Field(() => Int, { nullable: true })
|
|
62718
|
+
CurrentViews?: number;
|
|
62719
|
+
|
|
62720
|
+
@Field({ nullable: true })
|
|
62721
|
+
UserID?: string;
|
|
62722
|
+
|
|
62723
|
+
@Field(() => Boolean, { nullable: true })
|
|
62724
|
+
IsActive?: boolean;
|
|
62725
|
+
|
|
62726
|
+
@Field(() => [KeyValuePairInput], { nullable: true })
|
|
62727
|
+
OldValues___?: KeyValuePairInput[];
|
|
62728
|
+
|
|
62729
|
+
@Field(() => RestoreContextInput, { nullable: true })
|
|
62730
|
+
RestoreContext___?: RestoreContextInput;
|
|
62731
|
+
}
|
|
62732
|
+
|
|
62733
|
+
//****************************************************************************
|
|
62734
|
+
// RESOLVER for MJ: Public Links
|
|
62735
|
+
//****************************************************************************
|
|
62736
|
+
@ObjectType()
|
|
62737
|
+
export class RunMJPublicLinkViewResult {
|
|
62738
|
+
@Field(() => [MJPublicLink_])
|
|
62739
|
+
Results: MJPublicLink_[];
|
|
62740
|
+
|
|
62741
|
+
@Field(() => String, {nullable: true})
|
|
62742
|
+
UserViewRunID?: string;
|
|
62743
|
+
|
|
62744
|
+
@Field(() => Int, {nullable: true})
|
|
62745
|
+
RowCount: number;
|
|
62746
|
+
|
|
62747
|
+
@Field(() => Int, {nullable: true})
|
|
62748
|
+
TotalRowCount: number;
|
|
62749
|
+
|
|
62750
|
+
@Field(() => Int, {nullable: true})
|
|
62751
|
+
ExecutionTime: number;
|
|
62752
|
+
|
|
62753
|
+
@Field({nullable: true})
|
|
62754
|
+
ErrorMessage?: string;
|
|
62755
|
+
|
|
62756
|
+
@Field(() => Boolean, {nullable: false})
|
|
62757
|
+
Success: boolean;
|
|
62758
|
+
}
|
|
62759
|
+
|
|
62760
|
+
@Resolver(MJPublicLink_)
|
|
62761
|
+
export class MJPublicLinkResolver extends ResolverBase {
|
|
62762
|
+
@Query(() => RunMJPublicLinkViewResult)
|
|
62763
|
+
async RunMJPublicLinkViewByID(@Arg('input', () => RunViewByIDInput) input: RunViewByIDInput, @Ctx() { providers, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
62764
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
62765
|
+
return super.RunViewByIDGeneric(input, provider, userPayload, pubSub);
|
|
62766
|
+
}
|
|
62767
|
+
|
|
62768
|
+
@Query(() => RunMJPublicLinkViewResult)
|
|
62769
|
+
async RunMJPublicLinkViewByName(@Arg('input', () => RunViewByNameInput) input: RunViewByNameInput, @Ctx() { providers, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
62770
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
62771
|
+
return super.RunViewByNameGeneric(input, provider, userPayload, pubSub);
|
|
62772
|
+
}
|
|
62773
|
+
|
|
62774
|
+
@Query(() => RunMJPublicLinkViewResult)
|
|
62775
|
+
async RunMJPublicLinkDynamicView(@Arg('input', () => RunDynamicViewInput) input: RunDynamicViewInput, @Ctx() { providers, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
62776
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
62777
|
+
input.EntityName = 'MJ: Public Links';
|
|
62778
|
+
return super.RunDynamicViewGeneric(input, provider, userPayload, pubSub);
|
|
62779
|
+
}
|
|
62780
|
+
@Query(() => MJPublicLink_, { nullable: true })
|
|
62781
|
+
async MJPublicLink(@Arg('ID', () => String) ID: string, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine): Promise<MJPublicLink_ | null> {
|
|
62782
|
+
this.CheckUserReadPermissions('MJ: Public Links', userPayload);
|
|
62783
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
62784
|
+
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwPublicLinks')} WHERE ${provider.QuoteIdentifier('ID')}=${provider.BuildParameterPlaceholder(0)} ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: Public Links', userPayload, EntityPermissionType.Read, 'AND');
|
|
62785
|
+
const rows = await provider.ExecuteSQL(sSQL, [ID], undefined, this.GetUserFromPayload(userPayload));
|
|
62786
|
+
const result = await this.MapFieldNamesToCodeNames('MJ: Public Links', rows && rows.length > 0 ? rows[0] : null, this.GetUserFromPayload(userPayload));
|
|
62787
|
+
return result;
|
|
62788
|
+
}
|
|
62789
|
+
|
|
62790
|
+
@Mutation(() => MJPublicLink_)
|
|
62791
|
+
async CreateMJPublicLink(
|
|
62792
|
+
@Arg('input', () => CreateMJPublicLinkInput) input: CreateMJPublicLinkInput,
|
|
62793
|
+
@Ctx() { providers, userPayload }: AppContext,
|
|
62794
|
+
@PubSub() pubSub: PubSubEngine
|
|
62795
|
+
) {
|
|
62796
|
+
const provider = GetReadWriteProvider(providers);
|
|
62797
|
+
return this.CreateRecord('MJ: Public Links', input, provider, userPayload, pubSub)
|
|
62798
|
+
}
|
|
62799
|
+
|
|
62800
|
+
@Mutation(() => MJPublicLink_)
|
|
62801
|
+
async UpdateMJPublicLink(
|
|
62802
|
+
@Arg('input', () => UpdateMJPublicLinkInput) input: UpdateMJPublicLinkInput,
|
|
62803
|
+
@Ctx() { providers, userPayload }: AppContext,
|
|
62804
|
+
@PubSub() pubSub: PubSubEngine
|
|
62805
|
+
) {
|
|
62806
|
+
const provider = GetReadWriteProvider(providers);
|
|
62807
|
+
return this.UpdateRecord('MJ: Public Links', input, provider, userPayload, pubSub);
|
|
62808
|
+
}
|
|
62809
|
+
|
|
62810
|
+
@Mutation(() => MJPublicLink_)
|
|
62811
|
+
async DeleteMJPublicLink(@Arg('ID', () => String) ID: string, @Arg('options___', () => DeleteOptionsInput) options: DeleteOptionsInput, @Ctx() { providers, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
62812
|
+
const provider = GetReadWriteProvider(providers);
|
|
62813
|
+
const key = new CompositeKey([{FieldName: 'ID', Value: ID}]);
|
|
62814
|
+
return this.DeleteRecord('MJ: Public Links', key, options, provider, userPayload, pubSub);
|
|
62815
|
+
}
|
|
62816
|
+
|
|
62817
|
+
}
|
|
62818
|
+
|
|
62819
|
+
//****************************************************************************
|
|
62820
|
+
// ENTITY CLASS for MJ: Queries
|
|
62821
|
+
//****************************************************************************
|
|
62822
|
+
@ObjectType({ description: `Catalog of stored queries. This is useful for any arbitrary query that is known to be performant and correct and can be reused. Queries can be viewed/run by a user, used programatically via RunQuery, and also used by AI systems for improved reliability instead of dynamically generated SQL. Queries can also improve security since they store the SQL instead of using dynamic SQL.` })
|
|
62823
|
+
export class MJQuery_ {
|
|
62824
|
+
@Field()
|
|
62825
|
+
@MaxLength(36)
|
|
62826
|
+
ID: string;
|
|
62827
|
+
|
|
62828
|
+
@Field()
|
|
62829
|
+
@MaxLength(255)
|
|
62830
|
+
Name: string;
|
|
62831
|
+
|
|
62832
|
+
@Field({nullable: true})
|
|
62833
|
+
@MaxLength(36)
|
|
62834
|
+
CategoryID?: string;
|
|
61987
62835
|
|
|
61988
62836
|
@Field({nullable: true, description: `The natural language question this query answers, used for AI query selection.`})
|
|
61989
62837
|
UserQuestion?: string;
|
|
@@ -66745,6 +67593,1410 @@ export class MJRecordMergeLogResolver extends ResolverBase {
|
|
|
66745
67593
|
|
|
66746
67594
|
}
|
|
66747
67595
|
|
|
67596
|
+
//****************************************************************************
|
|
67597
|
+
// ENTITY CLASS for MJ: Record Process Categories
|
|
67598
|
+
//****************************************************************************
|
|
67599
|
+
@ObjectType({ description: `Hierarchical folder for organizing Record Processes in the UI. Example: "Customer Lifecycle" with a child category "Retention".` })
|
|
67600
|
+
export class MJRecordProcessCategory_ {
|
|
67601
|
+
@Field()
|
|
67602
|
+
@MaxLength(36)
|
|
67603
|
+
ID: string;
|
|
67604
|
+
|
|
67605
|
+
@Field({description: `Display name of the category`})
|
|
67606
|
+
@MaxLength(255)
|
|
67607
|
+
Name: string;
|
|
67608
|
+
|
|
67609
|
+
@Field({nullable: true, description: `Optional description of what belongs in this category`})
|
|
67610
|
+
Description?: string;
|
|
67611
|
+
|
|
67612
|
+
@Field({nullable: true, description: `Self-referencing foreign key to the parent category, enabling a nested folder hierarchy (NULL for a top-level category)`})
|
|
67613
|
+
@MaxLength(36)
|
|
67614
|
+
ParentID?: string;
|
|
67615
|
+
|
|
67616
|
+
@Field()
|
|
67617
|
+
_mj__CreatedAt: Date;
|
|
67618
|
+
|
|
67619
|
+
@Field()
|
|
67620
|
+
_mj__UpdatedAt: Date;
|
|
67621
|
+
|
|
67622
|
+
@Field({nullable: true})
|
|
67623
|
+
@MaxLength(255)
|
|
67624
|
+
Parent?: string;
|
|
67625
|
+
|
|
67626
|
+
@Field({nullable: true})
|
|
67627
|
+
@MaxLength(36)
|
|
67628
|
+
RootParentID?: string;
|
|
67629
|
+
|
|
67630
|
+
@Field(() => [MJRecordProcessCategory_])
|
|
67631
|
+
MJRecordProcessCategories_ParentIDArray: MJRecordProcessCategory_[]; // Link to MJRecordProcessCategories
|
|
67632
|
+
|
|
67633
|
+
@Field(() => [MJRecordProcess_])
|
|
67634
|
+
MJRecordProcesses_CategoryIDArray: MJRecordProcess_[]; // Link to MJRecordProcesses
|
|
67635
|
+
|
|
67636
|
+
}
|
|
67637
|
+
|
|
67638
|
+
//****************************************************************************
|
|
67639
|
+
// INPUT TYPE for MJ: Record Process Categories
|
|
67640
|
+
//****************************************************************************
|
|
67641
|
+
@InputType()
|
|
67642
|
+
export class CreateMJRecordProcessCategoryInput {
|
|
67643
|
+
@Field({ nullable: true })
|
|
67644
|
+
ID?: string;
|
|
67645
|
+
|
|
67646
|
+
@Field({ nullable: true })
|
|
67647
|
+
Name?: string;
|
|
67648
|
+
|
|
67649
|
+
@Field({ nullable: true })
|
|
67650
|
+
Description: string | null;
|
|
67651
|
+
|
|
67652
|
+
@Field({ nullable: true })
|
|
67653
|
+
ParentID: string | null;
|
|
67654
|
+
|
|
67655
|
+
@Field(() => RestoreContextInput, { nullable: true })
|
|
67656
|
+
RestoreContext___?: RestoreContextInput;
|
|
67657
|
+
}
|
|
67658
|
+
|
|
67659
|
+
|
|
67660
|
+
//****************************************************************************
|
|
67661
|
+
// INPUT TYPE for MJ: Record Process Categories
|
|
67662
|
+
//****************************************************************************
|
|
67663
|
+
@InputType()
|
|
67664
|
+
export class UpdateMJRecordProcessCategoryInput {
|
|
67665
|
+
@Field()
|
|
67666
|
+
ID: string;
|
|
67667
|
+
|
|
67668
|
+
@Field({ nullable: true })
|
|
67669
|
+
Name?: string;
|
|
67670
|
+
|
|
67671
|
+
@Field({ nullable: true })
|
|
67672
|
+
Description?: string | null;
|
|
67673
|
+
|
|
67674
|
+
@Field({ nullable: true })
|
|
67675
|
+
ParentID?: string | null;
|
|
67676
|
+
|
|
67677
|
+
@Field(() => [KeyValuePairInput], { nullable: true })
|
|
67678
|
+
OldValues___?: KeyValuePairInput[];
|
|
67679
|
+
|
|
67680
|
+
@Field(() => RestoreContextInput, { nullable: true })
|
|
67681
|
+
RestoreContext___?: RestoreContextInput;
|
|
67682
|
+
}
|
|
67683
|
+
|
|
67684
|
+
//****************************************************************************
|
|
67685
|
+
// RESOLVER for MJ: Record Process Categories
|
|
67686
|
+
//****************************************************************************
|
|
67687
|
+
@ObjectType()
|
|
67688
|
+
export class RunMJRecordProcessCategoryViewResult {
|
|
67689
|
+
@Field(() => [MJRecordProcessCategory_])
|
|
67690
|
+
Results: MJRecordProcessCategory_[];
|
|
67691
|
+
|
|
67692
|
+
@Field(() => String, {nullable: true})
|
|
67693
|
+
UserViewRunID?: string;
|
|
67694
|
+
|
|
67695
|
+
@Field(() => Int, {nullable: true})
|
|
67696
|
+
RowCount: number;
|
|
67697
|
+
|
|
67698
|
+
@Field(() => Int, {nullable: true})
|
|
67699
|
+
TotalRowCount: number;
|
|
67700
|
+
|
|
67701
|
+
@Field(() => Int, {nullable: true})
|
|
67702
|
+
ExecutionTime: number;
|
|
67703
|
+
|
|
67704
|
+
@Field({nullable: true})
|
|
67705
|
+
ErrorMessage?: string;
|
|
67706
|
+
|
|
67707
|
+
@Field(() => Boolean, {nullable: false})
|
|
67708
|
+
Success: boolean;
|
|
67709
|
+
}
|
|
67710
|
+
|
|
67711
|
+
@Resolver(MJRecordProcessCategory_)
|
|
67712
|
+
export class MJRecordProcessCategoryResolver extends ResolverBase {
|
|
67713
|
+
@Query(() => RunMJRecordProcessCategoryViewResult)
|
|
67714
|
+
async RunMJRecordProcessCategoryViewByID(@Arg('input', () => RunViewByIDInput) input: RunViewByIDInput, @Ctx() { providers, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
67715
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
67716
|
+
return super.RunViewByIDGeneric(input, provider, userPayload, pubSub);
|
|
67717
|
+
}
|
|
67718
|
+
|
|
67719
|
+
@Query(() => RunMJRecordProcessCategoryViewResult)
|
|
67720
|
+
async RunMJRecordProcessCategoryViewByName(@Arg('input', () => RunViewByNameInput) input: RunViewByNameInput, @Ctx() { providers, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
67721
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
67722
|
+
return super.RunViewByNameGeneric(input, provider, userPayload, pubSub);
|
|
67723
|
+
}
|
|
67724
|
+
|
|
67725
|
+
@Query(() => RunMJRecordProcessCategoryViewResult)
|
|
67726
|
+
async RunMJRecordProcessCategoryDynamicView(@Arg('input', () => RunDynamicViewInput) input: RunDynamicViewInput, @Ctx() { providers, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
67727
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
67728
|
+
input.EntityName = 'MJ: Record Process Categories';
|
|
67729
|
+
return super.RunDynamicViewGeneric(input, provider, userPayload, pubSub);
|
|
67730
|
+
}
|
|
67731
|
+
@Query(() => MJRecordProcessCategory_, { nullable: true })
|
|
67732
|
+
async MJRecordProcessCategory(@Arg('ID', () => String) ID: string, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine): Promise<MJRecordProcessCategory_ | null> {
|
|
67733
|
+
this.CheckUserReadPermissions('MJ: Record Process Categories', userPayload);
|
|
67734
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
67735
|
+
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwRecordProcessCategories')} WHERE ${provider.QuoteIdentifier('ID')}=${provider.BuildParameterPlaceholder(0)} ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: Record Process Categories', userPayload, EntityPermissionType.Read, 'AND');
|
|
67736
|
+
const rows = await provider.ExecuteSQL(sSQL, [ID], undefined, this.GetUserFromPayload(userPayload));
|
|
67737
|
+
const result = await this.MapFieldNamesToCodeNames('MJ: Record Process Categories', rows && rows.length > 0 ? rows[0] : null, this.GetUserFromPayload(userPayload));
|
|
67738
|
+
return result;
|
|
67739
|
+
}
|
|
67740
|
+
|
|
67741
|
+
@FieldResolver(() => [MJRecordProcessCategory_])
|
|
67742
|
+
async MJRecordProcessCategories_ParentIDArray(@Root() mjrecordprocesscategory_: MJRecordProcessCategory_, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
67743
|
+
this.CheckUserReadPermissions('MJ: Record Process Categories', userPayload);
|
|
67744
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
67745
|
+
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwRecordProcessCategories')} WHERE ${provider.QuoteIdentifier('ParentID')}=${provider.BuildParameterPlaceholder(0)} ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: Record Process Categories', userPayload, EntityPermissionType.Read, 'AND');
|
|
67746
|
+
const rows = await provider.ExecuteSQL(sSQL, [mjrecordprocesscategory_.ID], undefined, this.GetUserFromPayload(userPayload));
|
|
67747
|
+
const result = await this.ArrayMapFieldNamesToCodeNames('MJ: Record Process Categories', rows, this.GetUserFromPayload(userPayload));
|
|
67748
|
+
return result;
|
|
67749
|
+
}
|
|
67750
|
+
|
|
67751
|
+
@FieldResolver(() => [MJRecordProcess_])
|
|
67752
|
+
async MJRecordProcesses_CategoryIDArray(@Root() mjrecordprocesscategory_: MJRecordProcessCategory_, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
67753
|
+
this.CheckUserReadPermissions('MJ: Record Processes', userPayload);
|
|
67754
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
67755
|
+
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwRecordProcesses')} WHERE ${provider.QuoteIdentifier('CategoryID')}=${provider.BuildParameterPlaceholder(0)} ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: Record Processes', userPayload, EntityPermissionType.Read, 'AND');
|
|
67756
|
+
const rows = await provider.ExecuteSQL(sSQL, [mjrecordprocesscategory_.ID], undefined, this.GetUserFromPayload(userPayload));
|
|
67757
|
+
const result = await this.ArrayMapFieldNamesToCodeNames('MJ: Record Processes', rows, this.GetUserFromPayload(userPayload));
|
|
67758
|
+
return result;
|
|
67759
|
+
}
|
|
67760
|
+
|
|
67761
|
+
@Mutation(() => MJRecordProcessCategory_)
|
|
67762
|
+
async CreateMJRecordProcessCategory(
|
|
67763
|
+
@Arg('input', () => CreateMJRecordProcessCategoryInput) input: CreateMJRecordProcessCategoryInput,
|
|
67764
|
+
@Ctx() { providers, userPayload }: AppContext,
|
|
67765
|
+
@PubSub() pubSub: PubSubEngine
|
|
67766
|
+
) {
|
|
67767
|
+
const provider = GetReadWriteProvider(providers);
|
|
67768
|
+
return this.CreateRecord('MJ: Record Process Categories', input, provider, userPayload, pubSub)
|
|
67769
|
+
}
|
|
67770
|
+
|
|
67771
|
+
@Mutation(() => MJRecordProcessCategory_)
|
|
67772
|
+
async UpdateMJRecordProcessCategory(
|
|
67773
|
+
@Arg('input', () => UpdateMJRecordProcessCategoryInput) input: UpdateMJRecordProcessCategoryInput,
|
|
67774
|
+
@Ctx() { providers, userPayload }: AppContext,
|
|
67775
|
+
@PubSub() pubSub: PubSubEngine
|
|
67776
|
+
) {
|
|
67777
|
+
const provider = GetReadWriteProvider(providers);
|
|
67778
|
+
return this.UpdateRecord('MJ: Record Process Categories', input, provider, userPayload, pubSub);
|
|
67779
|
+
}
|
|
67780
|
+
|
|
67781
|
+
@Mutation(() => MJRecordProcessCategory_)
|
|
67782
|
+
async DeleteMJRecordProcessCategory(@Arg('ID', () => String) ID: string, @Arg('options___', () => DeleteOptionsInput) options: DeleteOptionsInput, @Ctx() { providers, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
67783
|
+
const provider = GetReadWriteProvider(providers);
|
|
67784
|
+
const key = new CompositeKey([{FieldName: 'ID', Value: ID}]);
|
|
67785
|
+
return this.DeleteRecord('MJ: Record Process Categories', key, options, provider, userPayload, pubSub);
|
|
67786
|
+
}
|
|
67787
|
+
|
|
67788
|
+
}
|
|
67789
|
+
|
|
67790
|
+
//****************************************************************************
|
|
67791
|
+
// ENTITY CLASS for MJ: Record Process Watermarks
|
|
67792
|
+
//****************************************************************************
|
|
67793
|
+
@ObjectType({ description: `Per-record change-detection watermark backing WatermarkStrategy=Checksum. Stores the last content hash a Record Process processed for a given record so unchanged records are skipped on the next run. Only used by Checksum mode; UpdatedAt mode compares __mj_UpdatedAt and stores nothing here.` })
|
|
67794
|
+
export class MJRecordProcessWatermark_ {
|
|
67795
|
+
@Field()
|
|
67796
|
+
@MaxLength(36)
|
|
67797
|
+
ID: string;
|
|
67798
|
+
|
|
67799
|
+
@Field({description: `Foreign key to the Record Process this watermark belongs to`})
|
|
67800
|
+
@MaxLength(36)
|
|
67801
|
+
RecordProcessID: string;
|
|
67802
|
+
|
|
67803
|
+
@Field({description: `Foreign key to the entity of the watermarked record`})
|
|
67804
|
+
@MaxLength(36)
|
|
67805
|
+
EntityID: string;
|
|
67806
|
+
|
|
67807
|
+
@Field({description: `Primary key of the watermarked record, stored as text to remain composite-key safe`})
|
|
67808
|
+
@MaxLength(450)
|
|
67809
|
+
RecordID: string;
|
|
67810
|
+
|
|
67811
|
+
@Field({description: `Content hash of the record as of the last time it was processed by this Record Process`})
|
|
67812
|
+
@MaxLength(128)
|
|
67813
|
+
Hash: string;
|
|
67814
|
+
|
|
67815
|
+
@Field({description: `When this record was last processed by this Record Process`})
|
|
67816
|
+
LastProcessedAt: Date;
|
|
67817
|
+
|
|
67818
|
+
@Field()
|
|
67819
|
+
_mj__CreatedAt: Date;
|
|
67820
|
+
|
|
67821
|
+
@Field()
|
|
67822
|
+
_mj__UpdatedAt: Date;
|
|
67823
|
+
|
|
67824
|
+
@Field()
|
|
67825
|
+
@MaxLength(255)
|
|
67826
|
+
RecordProcess: string;
|
|
67827
|
+
|
|
67828
|
+
@Field()
|
|
67829
|
+
@MaxLength(255)
|
|
67830
|
+
Entity: string;
|
|
67831
|
+
|
|
67832
|
+
}
|
|
67833
|
+
|
|
67834
|
+
//****************************************************************************
|
|
67835
|
+
// INPUT TYPE for MJ: Record Process Watermarks
|
|
67836
|
+
//****************************************************************************
|
|
67837
|
+
@InputType()
|
|
67838
|
+
export class CreateMJRecordProcessWatermarkInput {
|
|
67839
|
+
@Field({ nullable: true })
|
|
67840
|
+
ID?: string;
|
|
67841
|
+
|
|
67842
|
+
@Field({ nullable: true })
|
|
67843
|
+
RecordProcessID?: string;
|
|
67844
|
+
|
|
67845
|
+
@Field({ nullable: true })
|
|
67846
|
+
EntityID?: string;
|
|
67847
|
+
|
|
67848
|
+
@Field({ nullable: true })
|
|
67849
|
+
RecordID?: string;
|
|
67850
|
+
|
|
67851
|
+
@Field({ nullable: true })
|
|
67852
|
+
Hash?: string;
|
|
67853
|
+
|
|
67854
|
+
@Field({ nullable: true })
|
|
67855
|
+
LastProcessedAt?: Date;
|
|
67856
|
+
|
|
67857
|
+
@Field(() => RestoreContextInput, { nullable: true })
|
|
67858
|
+
RestoreContext___?: RestoreContextInput;
|
|
67859
|
+
}
|
|
67860
|
+
|
|
67861
|
+
|
|
67862
|
+
//****************************************************************************
|
|
67863
|
+
// INPUT TYPE for MJ: Record Process Watermarks
|
|
67864
|
+
//****************************************************************************
|
|
67865
|
+
@InputType()
|
|
67866
|
+
export class UpdateMJRecordProcessWatermarkInput {
|
|
67867
|
+
@Field()
|
|
67868
|
+
ID: string;
|
|
67869
|
+
|
|
67870
|
+
@Field({ nullable: true })
|
|
67871
|
+
RecordProcessID?: string;
|
|
67872
|
+
|
|
67873
|
+
@Field({ nullable: true })
|
|
67874
|
+
EntityID?: string;
|
|
67875
|
+
|
|
67876
|
+
@Field({ nullable: true })
|
|
67877
|
+
RecordID?: string;
|
|
67878
|
+
|
|
67879
|
+
@Field({ nullable: true })
|
|
67880
|
+
Hash?: string;
|
|
67881
|
+
|
|
67882
|
+
@Field({ nullable: true })
|
|
67883
|
+
LastProcessedAt?: Date;
|
|
67884
|
+
|
|
67885
|
+
@Field(() => [KeyValuePairInput], { nullable: true })
|
|
67886
|
+
OldValues___?: KeyValuePairInput[];
|
|
67887
|
+
|
|
67888
|
+
@Field(() => RestoreContextInput, { nullable: true })
|
|
67889
|
+
RestoreContext___?: RestoreContextInput;
|
|
67890
|
+
}
|
|
67891
|
+
|
|
67892
|
+
//****************************************************************************
|
|
67893
|
+
// RESOLVER for MJ: Record Process Watermarks
|
|
67894
|
+
//****************************************************************************
|
|
67895
|
+
@ObjectType()
|
|
67896
|
+
export class RunMJRecordProcessWatermarkViewResult {
|
|
67897
|
+
@Field(() => [MJRecordProcessWatermark_])
|
|
67898
|
+
Results: MJRecordProcessWatermark_[];
|
|
67899
|
+
|
|
67900
|
+
@Field(() => String, {nullable: true})
|
|
67901
|
+
UserViewRunID?: string;
|
|
67902
|
+
|
|
67903
|
+
@Field(() => Int, {nullable: true})
|
|
67904
|
+
RowCount: number;
|
|
67905
|
+
|
|
67906
|
+
@Field(() => Int, {nullable: true})
|
|
67907
|
+
TotalRowCount: number;
|
|
67908
|
+
|
|
67909
|
+
@Field(() => Int, {nullable: true})
|
|
67910
|
+
ExecutionTime: number;
|
|
67911
|
+
|
|
67912
|
+
@Field({nullable: true})
|
|
67913
|
+
ErrorMessage?: string;
|
|
67914
|
+
|
|
67915
|
+
@Field(() => Boolean, {nullable: false})
|
|
67916
|
+
Success: boolean;
|
|
67917
|
+
}
|
|
67918
|
+
|
|
67919
|
+
@Resolver(MJRecordProcessWatermark_)
|
|
67920
|
+
export class MJRecordProcessWatermarkResolver extends ResolverBase {
|
|
67921
|
+
@Query(() => RunMJRecordProcessWatermarkViewResult)
|
|
67922
|
+
async RunMJRecordProcessWatermarkViewByID(@Arg('input', () => RunViewByIDInput) input: RunViewByIDInput, @Ctx() { providers, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
67923
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
67924
|
+
return super.RunViewByIDGeneric(input, provider, userPayload, pubSub);
|
|
67925
|
+
}
|
|
67926
|
+
|
|
67927
|
+
@Query(() => RunMJRecordProcessWatermarkViewResult)
|
|
67928
|
+
async RunMJRecordProcessWatermarkViewByName(@Arg('input', () => RunViewByNameInput) input: RunViewByNameInput, @Ctx() { providers, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
67929
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
67930
|
+
return super.RunViewByNameGeneric(input, provider, userPayload, pubSub);
|
|
67931
|
+
}
|
|
67932
|
+
|
|
67933
|
+
@Query(() => RunMJRecordProcessWatermarkViewResult)
|
|
67934
|
+
async RunMJRecordProcessWatermarkDynamicView(@Arg('input', () => RunDynamicViewInput) input: RunDynamicViewInput, @Ctx() { providers, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
67935
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
67936
|
+
input.EntityName = 'MJ: Record Process Watermarks';
|
|
67937
|
+
return super.RunDynamicViewGeneric(input, provider, userPayload, pubSub);
|
|
67938
|
+
}
|
|
67939
|
+
@Query(() => MJRecordProcessWatermark_, { nullable: true })
|
|
67940
|
+
async MJRecordProcessWatermark(@Arg('ID', () => String) ID: string, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine): Promise<MJRecordProcessWatermark_ | null> {
|
|
67941
|
+
this.CheckUserReadPermissions('MJ: Record Process Watermarks', userPayload);
|
|
67942
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
67943
|
+
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwRecordProcessWatermarks')} WHERE ${provider.QuoteIdentifier('ID')}=${provider.BuildParameterPlaceholder(0)} ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: Record Process Watermarks', userPayload, EntityPermissionType.Read, 'AND');
|
|
67944
|
+
const rows = await provider.ExecuteSQL(sSQL, [ID], undefined, this.GetUserFromPayload(userPayload));
|
|
67945
|
+
const result = await this.MapFieldNamesToCodeNames('MJ: Record Process Watermarks', rows && rows.length > 0 ? rows[0] : null, this.GetUserFromPayload(userPayload));
|
|
67946
|
+
return result;
|
|
67947
|
+
}
|
|
67948
|
+
|
|
67949
|
+
@Mutation(() => MJRecordProcessWatermark_)
|
|
67950
|
+
async CreateMJRecordProcessWatermark(
|
|
67951
|
+
@Arg('input', () => CreateMJRecordProcessWatermarkInput) input: CreateMJRecordProcessWatermarkInput,
|
|
67952
|
+
@Ctx() { providers, userPayload }: AppContext,
|
|
67953
|
+
@PubSub() pubSub: PubSubEngine
|
|
67954
|
+
) {
|
|
67955
|
+
const provider = GetReadWriteProvider(providers);
|
|
67956
|
+
return this.CreateRecord('MJ: Record Process Watermarks', input, provider, userPayload, pubSub)
|
|
67957
|
+
}
|
|
67958
|
+
|
|
67959
|
+
@Mutation(() => MJRecordProcessWatermark_)
|
|
67960
|
+
async UpdateMJRecordProcessWatermark(
|
|
67961
|
+
@Arg('input', () => UpdateMJRecordProcessWatermarkInput) input: UpdateMJRecordProcessWatermarkInput,
|
|
67962
|
+
@Ctx() { providers, userPayload }: AppContext,
|
|
67963
|
+
@PubSub() pubSub: PubSubEngine
|
|
67964
|
+
) {
|
|
67965
|
+
const provider = GetReadWriteProvider(providers);
|
|
67966
|
+
return this.UpdateRecord('MJ: Record Process Watermarks', input, provider, userPayload, pubSub);
|
|
67967
|
+
}
|
|
67968
|
+
|
|
67969
|
+
@Mutation(() => MJRecordProcessWatermark_)
|
|
67970
|
+
async DeleteMJRecordProcessWatermark(@Arg('ID', () => String) ID: string, @Arg('options___', () => DeleteOptionsInput) options: DeleteOptionsInput, @Ctx() { providers, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
67971
|
+
const provider = GetReadWriteProvider(providers);
|
|
67972
|
+
const key = new CompositeKey([{FieldName: 'ID', Value: ID}]);
|
|
67973
|
+
return this.DeleteRecord('MJ: Record Process Watermarks', key, options, provider, userPayload, pubSub);
|
|
67974
|
+
}
|
|
67975
|
+
|
|
67976
|
+
}
|
|
67977
|
+
|
|
67978
|
+
//****************************************************************************
|
|
67979
|
+
// ENTITY CLASS for MJ: Record Processes
|
|
67980
|
+
//****************************************************************************
|
|
67981
|
+
@ObjectType({ description: `A declarative, reusable job definition that binds three axes of a business process: WORK (an Action or an Agent) x SCOPE (a single record, a User View, a List, or an ad-hoc Filter) x TRIGGER (on-change save hooks, a cron schedule, and/or on demand). One row is one configured process; each execution of it produces a Process Run with per-record Process Run Details. EXAMPLE: a "Weekly Customer Health Summary" row runs the "Customer Summarizer" agent over the "Active Customers" view every Saturday 2am, also whenever a customer\'s NPS/support fields change, and on demand; for each customer it infers {satisfaction, sentiment, personalityStyle, summary} and writes satisfaction/sentiment back onto the Customer plus a summary into a Customer Insights child row, skipping customers unchanged since the last run.` })
|
|
67982
|
+
export class MJRecordProcess_ {
|
|
67983
|
+
@Field()
|
|
67984
|
+
@MaxLength(36)
|
|
67985
|
+
ID: string;
|
|
67986
|
+
|
|
67987
|
+
@Field({description: `Human-readable name of the process definition (e.g., "Weekly Customer Health Summary")`})
|
|
67988
|
+
@MaxLength(255)
|
|
67989
|
+
Name: string;
|
|
67990
|
+
|
|
67991
|
+
@Field({nullable: true, description: `Optional description of what this process does`})
|
|
67992
|
+
Description?: string;
|
|
67993
|
+
|
|
67994
|
+
@Field({nullable: true, description: `Optional hierarchical category for organizing this process in the UI`})
|
|
67995
|
+
@MaxLength(36)
|
|
67996
|
+
CategoryID?: string;
|
|
67997
|
+
|
|
67998
|
+
@Field({description: `Foreign key to the target entity whose records this process operates on`})
|
|
67999
|
+
@MaxLength(36)
|
|
68000
|
+
EntityID: string;
|
|
68001
|
+
|
|
68002
|
+
@Field({description: `Lifecycle status: Draft (not yet wired), Active (triggers live), or Disabled`})
|
|
68003
|
+
@MaxLength(20)
|
|
68004
|
+
Status: string;
|
|
68005
|
+
|
|
68006
|
+
@Field({description: `Whether the work is an Action, an Agent, or an Infer (per-record AI Prompt). Agents are dispatched through the Execute Agent action and must be top-level + ExposeAsAction; Infer runs the AI Prompt named by PromptID for each record and writes its structured output back via OutputMapping.`})
|
|
68007
|
+
@MaxLength(20)
|
|
68008
|
+
WorkType: string;
|
|
68009
|
+
|
|
68010
|
+
@Field({nullable: true, description: `Foreign key to the Action to run, when WorkType=Action`})
|
|
68011
|
+
@MaxLength(36)
|
|
68012
|
+
ActionID?: string;
|
|
68013
|
+
|
|
68014
|
+
@Field({nullable: true, description: `Foreign key to the AI Agent to run, when WorkType=Agent`})
|
|
68015
|
+
@MaxLength(36)
|
|
68016
|
+
AgentID?: string;
|
|
68017
|
+
|
|
68018
|
+
@Field({nullable: true, description: `Foreign key to the AI Prompt to run for each record, when WorkType=Infer. The prompt's structured output is written back to the data model via OutputMapping.`})
|
|
68019
|
+
@MaxLength(36)
|
|
68020
|
+
PromptID?: string;
|
|
68021
|
+
|
|
68022
|
+
@Field({description: `How the record set is scoped for the Schedule and On-Demand triggers: SingleRecord, View, List, or Filter. The On-Change trigger is always single-record and ignores this.`})
|
|
68023
|
+
@MaxLength(20)
|
|
68024
|
+
ScopeType: string;
|
|
68025
|
+
|
|
68026
|
+
@Field({nullable: true, description: `Foreign key to the User View defining the scope, when ScopeType=View`})
|
|
68027
|
+
@MaxLength(36)
|
|
68028
|
+
ScopeViewID?: string;
|
|
68029
|
+
|
|
68030
|
+
@Field({nullable: true, description: `Foreign key to the List defining the scope, when ScopeType=List`})
|
|
68031
|
+
@MaxLength(36)
|
|
68032
|
+
ScopeListID?: string;
|
|
68033
|
+
|
|
68034
|
+
@Field({nullable: true, description: `Ad-hoc WHERE clause used to resolve the record set, when ScopeType=Filter`})
|
|
68035
|
+
ScopeFilter?: string;
|
|
68036
|
+
|
|
68037
|
+
@Field(() => Boolean, {description: `When 1, the process runs per-record on save via an owned Entity Action`})
|
|
68038
|
+
OnChangeEnabled: boolean;
|
|
68039
|
+
|
|
68040
|
+
@Field({nullable: true, description: `Which save event fires the on-change trigger: AfterCreate, AfterUpdate, AfterDelete, or Validate`})
|
|
68041
|
+
@MaxLength(30)
|
|
68042
|
+
OnChangeInvocationType?: string;
|
|
68043
|
+
|
|
68044
|
+
@Field({nullable: true, description: `Gating expression evaluated against the changed record (with changed-fields context) that compiles into the owned Entity Action Filter; only when it passes does the on-change trigger fire`})
|
|
68045
|
+
OnChangeFilter?: string;
|
|
68046
|
+
|
|
68047
|
+
@Field(() => Boolean, {description: `When 1, the process runs on a cron schedule via an owned Scheduled Job`})
|
|
68048
|
+
ScheduleEnabled: boolean;
|
|
68049
|
+
|
|
68050
|
+
@Field({nullable: true, description: `Cron expression for the schedule trigger, when ScheduleEnabled=1`})
|
|
68051
|
+
@MaxLength(120)
|
|
68052
|
+
CronExpression?: string;
|
|
68053
|
+
|
|
68054
|
+
@Field({nullable: true, description: `IANA timezone for evaluating the cron expression (default UTC)`})
|
|
68055
|
+
@MaxLength(100)
|
|
68056
|
+
Timezone?: string;
|
|
68057
|
+
|
|
68058
|
+
@Field(() => Boolean, {description: `When 1, the process can be run on demand (button / resolver)`})
|
|
68059
|
+
OnDemandEnabled: boolean;
|
|
68060
|
+
|
|
68061
|
+
@Field({nullable: true, description: `JSON mapping describing how a record maps to the work inputs (optionally including an EntityDocumentID for render-to-text)`})
|
|
68062
|
+
InputMapping?: string;
|
|
68063
|
+
|
|
68064
|
+
@Field({nullable: true, description: `JSON mapping describing how the structured output payload writes back (to fields, a child record, or tags)`})
|
|
68065
|
+
OutputMapping?: string;
|
|
68066
|
+
|
|
68067
|
+
@Field(() => Boolean, {description: `When 1, records whose watermark indicates no change since the last run are skipped`})
|
|
68068
|
+
SkipUnchanged: boolean;
|
|
68069
|
+
|
|
68070
|
+
@Field({nullable: true, description: `How unchanged records are detected for SkipUnchanged: Checksum (per-record content hash, stored in RecordProcessWatermark), UpdatedAt (compares __mj_UpdatedAt, stores nothing), or None`})
|
|
68071
|
+
@MaxLength(20)
|
|
68072
|
+
WatermarkStrategy?: string;
|
|
68073
|
+
|
|
68074
|
+
@Field(() => Int, {nullable: true, description: `Number of records processed per batch (default 100)`})
|
|
68075
|
+
BatchSize?: number;
|
|
68076
|
+
|
|
68077
|
+
@Field(() => Int, {nullable: true, description: `Maximum number of records processed concurrently within a batch (default 1)`})
|
|
68078
|
+
MaxConcurrency?: number;
|
|
68079
|
+
|
|
68080
|
+
@Field()
|
|
68081
|
+
_mj__CreatedAt: Date;
|
|
68082
|
+
|
|
68083
|
+
@Field()
|
|
68084
|
+
_mj__UpdatedAt: Date;
|
|
68085
|
+
|
|
68086
|
+
@Field({nullable: true, description: `JSON configuration for the process's work, used by work types that need structured config beyond Input/Output mappings. For WorkType='FieldRules' this holds the serialized FieldRuleSet (the rules applied to each record). NULL for work types that do not use it.`})
|
|
68087
|
+
Configuration?: string;
|
|
68088
|
+
|
|
68089
|
+
@Field({nullable: true})
|
|
68090
|
+
@MaxLength(255)
|
|
68091
|
+
Category?: string;
|
|
68092
|
+
|
|
68093
|
+
@Field()
|
|
68094
|
+
@MaxLength(255)
|
|
68095
|
+
Entity: string;
|
|
68096
|
+
|
|
68097
|
+
@Field({nullable: true})
|
|
68098
|
+
@MaxLength(425)
|
|
68099
|
+
Action?: string;
|
|
68100
|
+
|
|
68101
|
+
@Field({nullable: true})
|
|
68102
|
+
@MaxLength(255)
|
|
68103
|
+
Agent?: string;
|
|
68104
|
+
|
|
68105
|
+
@Field({nullable: true})
|
|
68106
|
+
@MaxLength(255)
|
|
68107
|
+
Prompt?: string;
|
|
68108
|
+
|
|
68109
|
+
@Field({nullable: true})
|
|
68110
|
+
@MaxLength(100)
|
|
68111
|
+
ScopeView?: string;
|
|
68112
|
+
|
|
68113
|
+
@Field({nullable: true})
|
|
68114
|
+
@MaxLength(100)
|
|
68115
|
+
ScopeList?: string;
|
|
68116
|
+
|
|
68117
|
+
@Field(() => [MJRecordProcessWatermark_])
|
|
68118
|
+
MJRecordProcessWatermarks_RecordProcessIDArray: MJRecordProcessWatermark_[]; // Link to MJRecordProcessWatermarks
|
|
68119
|
+
|
|
68120
|
+
@Field(() => [MJProcessRun_])
|
|
68121
|
+
MJProcessRuns_RecordProcessIDArray: MJProcessRun_[]; // Link to MJProcessRuns
|
|
68122
|
+
|
|
68123
|
+
}
|
|
68124
|
+
|
|
68125
|
+
//****************************************************************************
|
|
68126
|
+
// INPUT TYPE for MJ: Record Processes
|
|
68127
|
+
//****************************************************************************
|
|
68128
|
+
@InputType()
|
|
68129
|
+
export class CreateMJRecordProcessInput {
|
|
68130
|
+
@Field({ nullable: true })
|
|
68131
|
+
ID?: string;
|
|
68132
|
+
|
|
68133
|
+
@Field({ nullable: true })
|
|
68134
|
+
Name?: string;
|
|
68135
|
+
|
|
68136
|
+
@Field({ nullable: true })
|
|
68137
|
+
Description: string | null;
|
|
68138
|
+
|
|
68139
|
+
@Field({ nullable: true })
|
|
68140
|
+
CategoryID: string | null;
|
|
68141
|
+
|
|
68142
|
+
@Field({ nullable: true })
|
|
68143
|
+
EntityID?: string;
|
|
68144
|
+
|
|
68145
|
+
@Field({ nullable: true })
|
|
68146
|
+
Status?: string;
|
|
68147
|
+
|
|
68148
|
+
@Field({ nullable: true })
|
|
68149
|
+
WorkType?: string;
|
|
68150
|
+
|
|
68151
|
+
@Field({ nullable: true })
|
|
68152
|
+
ActionID: string | null;
|
|
68153
|
+
|
|
68154
|
+
@Field({ nullable: true })
|
|
68155
|
+
AgentID: string | null;
|
|
68156
|
+
|
|
68157
|
+
@Field({ nullable: true })
|
|
68158
|
+
PromptID: string | null;
|
|
68159
|
+
|
|
68160
|
+
@Field({ nullable: true })
|
|
68161
|
+
ScopeType?: string;
|
|
68162
|
+
|
|
68163
|
+
@Field({ nullable: true })
|
|
68164
|
+
ScopeViewID: string | null;
|
|
68165
|
+
|
|
68166
|
+
@Field({ nullable: true })
|
|
68167
|
+
ScopeListID: string | null;
|
|
68168
|
+
|
|
68169
|
+
@Field({ nullable: true })
|
|
68170
|
+
ScopeFilter: string | null;
|
|
68171
|
+
|
|
68172
|
+
@Field(() => Boolean, { nullable: true })
|
|
68173
|
+
OnChangeEnabled?: boolean;
|
|
68174
|
+
|
|
68175
|
+
@Field({ nullable: true })
|
|
68176
|
+
OnChangeInvocationType: string | null;
|
|
68177
|
+
|
|
68178
|
+
@Field({ nullable: true })
|
|
68179
|
+
OnChangeFilter: string | null;
|
|
68180
|
+
|
|
68181
|
+
@Field(() => Boolean, { nullable: true })
|
|
68182
|
+
ScheduleEnabled?: boolean;
|
|
68183
|
+
|
|
68184
|
+
@Field({ nullable: true })
|
|
68185
|
+
CronExpression: string | null;
|
|
68186
|
+
|
|
68187
|
+
@Field({ nullable: true })
|
|
68188
|
+
Timezone?: string | null;
|
|
68189
|
+
|
|
68190
|
+
@Field(() => Boolean, { nullable: true })
|
|
68191
|
+
OnDemandEnabled?: boolean;
|
|
68192
|
+
|
|
68193
|
+
@Field({ nullable: true })
|
|
68194
|
+
InputMapping: string | null;
|
|
68195
|
+
|
|
68196
|
+
@Field({ nullable: true })
|
|
68197
|
+
OutputMapping: string | null;
|
|
68198
|
+
|
|
68199
|
+
@Field(() => Boolean, { nullable: true })
|
|
68200
|
+
SkipUnchanged?: boolean;
|
|
68201
|
+
|
|
68202
|
+
@Field({ nullable: true })
|
|
68203
|
+
WatermarkStrategy: string | null;
|
|
68204
|
+
|
|
68205
|
+
@Field(() => Int, { nullable: true })
|
|
68206
|
+
BatchSize?: number | null;
|
|
68207
|
+
|
|
68208
|
+
@Field(() => Int, { nullable: true })
|
|
68209
|
+
MaxConcurrency?: number | null;
|
|
68210
|
+
|
|
68211
|
+
@Field({ nullable: true })
|
|
68212
|
+
Configuration: string | null;
|
|
68213
|
+
|
|
68214
|
+
@Field(() => RestoreContextInput, { nullable: true })
|
|
68215
|
+
RestoreContext___?: RestoreContextInput;
|
|
68216
|
+
}
|
|
68217
|
+
|
|
68218
|
+
|
|
68219
|
+
//****************************************************************************
|
|
68220
|
+
// INPUT TYPE for MJ: Record Processes
|
|
68221
|
+
//****************************************************************************
|
|
68222
|
+
@InputType()
|
|
68223
|
+
export class UpdateMJRecordProcessInput {
|
|
68224
|
+
@Field()
|
|
68225
|
+
ID: string;
|
|
68226
|
+
|
|
68227
|
+
@Field({ nullable: true })
|
|
68228
|
+
Name?: string;
|
|
68229
|
+
|
|
68230
|
+
@Field({ nullable: true })
|
|
68231
|
+
Description?: string | null;
|
|
68232
|
+
|
|
68233
|
+
@Field({ nullable: true })
|
|
68234
|
+
CategoryID?: string | null;
|
|
68235
|
+
|
|
68236
|
+
@Field({ nullable: true })
|
|
68237
|
+
EntityID?: string;
|
|
68238
|
+
|
|
68239
|
+
@Field({ nullable: true })
|
|
68240
|
+
Status?: string;
|
|
68241
|
+
|
|
68242
|
+
@Field({ nullable: true })
|
|
68243
|
+
WorkType?: string;
|
|
68244
|
+
|
|
68245
|
+
@Field({ nullable: true })
|
|
68246
|
+
ActionID?: string | null;
|
|
68247
|
+
|
|
68248
|
+
@Field({ nullable: true })
|
|
68249
|
+
AgentID?: string | null;
|
|
68250
|
+
|
|
68251
|
+
@Field({ nullable: true })
|
|
68252
|
+
PromptID?: string | null;
|
|
68253
|
+
|
|
68254
|
+
@Field({ nullable: true })
|
|
68255
|
+
ScopeType?: string;
|
|
68256
|
+
|
|
68257
|
+
@Field({ nullable: true })
|
|
68258
|
+
ScopeViewID?: string | null;
|
|
68259
|
+
|
|
68260
|
+
@Field({ nullable: true })
|
|
68261
|
+
ScopeListID?: string | null;
|
|
68262
|
+
|
|
68263
|
+
@Field({ nullable: true })
|
|
68264
|
+
ScopeFilter?: string | null;
|
|
68265
|
+
|
|
68266
|
+
@Field(() => Boolean, { nullable: true })
|
|
68267
|
+
OnChangeEnabled?: boolean;
|
|
68268
|
+
|
|
68269
|
+
@Field({ nullable: true })
|
|
68270
|
+
OnChangeInvocationType?: string | null;
|
|
68271
|
+
|
|
68272
|
+
@Field({ nullable: true })
|
|
68273
|
+
OnChangeFilter?: string | null;
|
|
68274
|
+
|
|
68275
|
+
@Field(() => Boolean, { nullable: true })
|
|
68276
|
+
ScheduleEnabled?: boolean;
|
|
68277
|
+
|
|
68278
|
+
@Field({ nullable: true })
|
|
68279
|
+
CronExpression?: string | null;
|
|
68280
|
+
|
|
68281
|
+
@Field({ nullable: true })
|
|
68282
|
+
Timezone?: string | null;
|
|
68283
|
+
|
|
68284
|
+
@Field(() => Boolean, { nullable: true })
|
|
68285
|
+
OnDemandEnabled?: boolean;
|
|
68286
|
+
|
|
68287
|
+
@Field({ nullable: true })
|
|
68288
|
+
InputMapping?: string | null;
|
|
68289
|
+
|
|
68290
|
+
@Field({ nullable: true })
|
|
68291
|
+
OutputMapping?: string | null;
|
|
68292
|
+
|
|
68293
|
+
@Field(() => Boolean, { nullable: true })
|
|
68294
|
+
SkipUnchanged?: boolean;
|
|
68295
|
+
|
|
68296
|
+
@Field({ nullable: true })
|
|
68297
|
+
WatermarkStrategy?: string | null;
|
|
68298
|
+
|
|
68299
|
+
@Field(() => Int, { nullable: true })
|
|
68300
|
+
BatchSize?: number | null;
|
|
68301
|
+
|
|
68302
|
+
@Field(() => Int, { nullable: true })
|
|
68303
|
+
MaxConcurrency?: number | null;
|
|
68304
|
+
|
|
68305
|
+
@Field({ nullable: true })
|
|
68306
|
+
Configuration?: string | null;
|
|
68307
|
+
|
|
68308
|
+
@Field(() => [KeyValuePairInput], { nullable: true })
|
|
68309
|
+
OldValues___?: KeyValuePairInput[];
|
|
68310
|
+
|
|
68311
|
+
@Field(() => RestoreContextInput, { nullable: true })
|
|
68312
|
+
RestoreContext___?: RestoreContextInput;
|
|
68313
|
+
}
|
|
68314
|
+
|
|
68315
|
+
//****************************************************************************
|
|
68316
|
+
// RESOLVER for MJ: Record Processes
|
|
68317
|
+
//****************************************************************************
|
|
68318
|
+
@ObjectType()
|
|
68319
|
+
export class RunMJRecordProcessViewResult {
|
|
68320
|
+
@Field(() => [MJRecordProcess_])
|
|
68321
|
+
Results: MJRecordProcess_[];
|
|
68322
|
+
|
|
68323
|
+
@Field(() => String, {nullable: true})
|
|
68324
|
+
UserViewRunID?: string;
|
|
68325
|
+
|
|
68326
|
+
@Field(() => Int, {nullable: true})
|
|
68327
|
+
RowCount: number;
|
|
68328
|
+
|
|
68329
|
+
@Field(() => Int, {nullable: true})
|
|
68330
|
+
TotalRowCount: number;
|
|
68331
|
+
|
|
68332
|
+
@Field(() => Int, {nullable: true})
|
|
68333
|
+
ExecutionTime: number;
|
|
68334
|
+
|
|
68335
|
+
@Field({nullable: true})
|
|
68336
|
+
ErrorMessage?: string;
|
|
68337
|
+
|
|
68338
|
+
@Field(() => Boolean, {nullable: false})
|
|
68339
|
+
Success: boolean;
|
|
68340
|
+
}
|
|
68341
|
+
|
|
68342
|
+
@Resolver(MJRecordProcess_)
|
|
68343
|
+
export class MJRecordProcessResolver extends ResolverBase {
|
|
68344
|
+
@Query(() => RunMJRecordProcessViewResult)
|
|
68345
|
+
async RunMJRecordProcessViewByID(@Arg('input', () => RunViewByIDInput) input: RunViewByIDInput, @Ctx() { providers, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
68346
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
68347
|
+
return super.RunViewByIDGeneric(input, provider, userPayload, pubSub);
|
|
68348
|
+
}
|
|
68349
|
+
|
|
68350
|
+
@Query(() => RunMJRecordProcessViewResult)
|
|
68351
|
+
async RunMJRecordProcessViewByName(@Arg('input', () => RunViewByNameInput) input: RunViewByNameInput, @Ctx() { providers, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
68352
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
68353
|
+
return super.RunViewByNameGeneric(input, provider, userPayload, pubSub);
|
|
68354
|
+
}
|
|
68355
|
+
|
|
68356
|
+
@Query(() => RunMJRecordProcessViewResult)
|
|
68357
|
+
async RunMJRecordProcessDynamicView(@Arg('input', () => RunDynamicViewInput) input: RunDynamicViewInput, @Ctx() { providers, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
68358
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
68359
|
+
input.EntityName = 'MJ: Record Processes';
|
|
68360
|
+
return super.RunDynamicViewGeneric(input, provider, userPayload, pubSub);
|
|
68361
|
+
}
|
|
68362
|
+
@Query(() => MJRecordProcess_, { nullable: true })
|
|
68363
|
+
async MJRecordProcess(@Arg('ID', () => String) ID: string, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine): Promise<MJRecordProcess_ | null> {
|
|
68364
|
+
this.CheckUserReadPermissions('MJ: Record Processes', userPayload);
|
|
68365
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
68366
|
+
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwRecordProcesses')} WHERE ${provider.QuoteIdentifier('ID')}=${provider.BuildParameterPlaceholder(0)} ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: Record Processes', userPayload, EntityPermissionType.Read, 'AND');
|
|
68367
|
+
const rows = await provider.ExecuteSQL(sSQL, [ID], undefined, this.GetUserFromPayload(userPayload));
|
|
68368
|
+
const result = await this.MapFieldNamesToCodeNames('MJ: Record Processes', rows && rows.length > 0 ? rows[0] : null, this.GetUserFromPayload(userPayload));
|
|
68369
|
+
return result;
|
|
68370
|
+
}
|
|
68371
|
+
|
|
68372
|
+
@FieldResolver(() => [MJRecordProcessWatermark_])
|
|
68373
|
+
async MJRecordProcessWatermarks_RecordProcessIDArray(@Root() mjrecordprocess_: MJRecordProcess_, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
68374
|
+
this.CheckUserReadPermissions('MJ: Record Process Watermarks', userPayload);
|
|
68375
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
68376
|
+
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwRecordProcessWatermarks')} WHERE ${provider.QuoteIdentifier('RecordProcessID')}=${provider.BuildParameterPlaceholder(0)} ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: Record Process Watermarks', userPayload, EntityPermissionType.Read, 'AND');
|
|
68377
|
+
const rows = await provider.ExecuteSQL(sSQL, [mjrecordprocess_.ID], undefined, this.GetUserFromPayload(userPayload));
|
|
68378
|
+
const result = await this.ArrayMapFieldNamesToCodeNames('MJ: Record Process Watermarks', rows, this.GetUserFromPayload(userPayload));
|
|
68379
|
+
return result;
|
|
68380
|
+
}
|
|
68381
|
+
|
|
68382
|
+
@FieldResolver(() => [MJProcessRun_])
|
|
68383
|
+
async MJProcessRuns_RecordProcessIDArray(@Root() mjrecordprocess_: MJRecordProcess_, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
68384
|
+
this.CheckUserReadPermissions('MJ: Process Runs', userPayload);
|
|
68385
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
68386
|
+
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwProcessRuns')} WHERE ${provider.QuoteIdentifier('RecordProcessID')}=${provider.BuildParameterPlaceholder(0)} ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: Process Runs', userPayload, EntityPermissionType.Read, 'AND');
|
|
68387
|
+
const rows = await provider.ExecuteSQL(sSQL, [mjrecordprocess_.ID], undefined, this.GetUserFromPayload(userPayload));
|
|
68388
|
+
const result = await this.ArrayMapFieldNamesToCodeNames('MJ: Process Runs', rows, this.GetUserFromPayload(userPayload));
|
|
68389
|
+
return result;
|
|
68390
|
+
}
|
|
68391
|
+
|
|
68392
|
+
@Mutation(() => MJRecordProcess_)
|
|
68393
|
+
async CreateMJRecordProcess(
|
|
68394
|
+
@Arg('input', () => CreateMJRecordProcessInput) input: CreateMJRecordProcessInput,
|
|
68395
|
+
@Ctx() { providers, userPayload }: AppContext,
|
|
68396
|
+
@PubSub() pubSub: PubSubEngine
|
|
68397
|
+
) {
|
|
68398
|
+
const provider = GetReadWriteProvider(providers);
|
|
68399
|
+
return this.CreateRecord('MJ: Record Processes', input, provider, userPayload, pubSub)
|
|
68400
|
+
}
|
|
68401
|
+
|
|
68402
|
+
@Mutation(() => MJRecordProcess_)
|
|
68403
|
+
async UpdateMJRecordProcess(
|
|
68404
|
+
@Arg('input', () => UpdateMJRecordProcessInput) input: UpdateMJRecordProcessInput,
|
|
68405
|
+
@Ctx() { providers, userPayload }: AppContext,
|
|
68406
|
+
@PubSub() pubSub: PubSubEngine
|
|
68407
|
+
) {
|
|
68408
|
+
const provider = GetReadWriteProvider(providers);
|
|
68409
|
+
return this.UpdateRecord('MJ: Record Processes', input, provider, userPayload, pubSub);
|
|
68410
|
+
}
|
|
68411
|
+
|
|
68412
|
+
@Mutation(() => MJRecordProcess_)
|
|
68413
|
+
async DeleteMJRecordProcess(@Arg('ID', () => String) ID: string, @Arg('options___', () => DeleteOptionsInput) options: DeleteOptionsInput, @Ctx() { providers, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
68414
|
+
const provider = GetReadWriteProvider(providers);
|
|
68415
|
+
const key = new CompositeKey([{FieldName: 'ID', Value: ID}]);
|
|
68416
|
+
return this.DeleteRecord('MJ: Record Processes', key, options, provider, userPayload, pubSub);
|
|
68417
|
+
}
|
|
68418
|
+
|
|
68419
|
+
}
|
|
68420
|
+
|
|
68421
|
+
//****************************************************************************
|
|
68422
|
+
// ENTITY CLASS for MJ: Remote Operation Categories
|
|
68423
|
+
//****************************************************************************
|
|
68424
|
+
@ObjectType({ description: `Hierarchical folder for organizing Remote Operations in the UI. Example: "Record Processes" with a child category "Control" holding RunNow / Pause / Cancel.` })
|
|
68425
|
+
export class MJRemoteOperationCategory_ {
|
|
68426
|
+
@Field()
|
|
68427
|
+
@MaxLength(36)
|
|
68428
|
+
ID: string;
|
|
68429
|
+
|
|
68430
|
+
@Field({description: `Display name of the category`})
|
|
68431
|
+
@MaxLength(255)
|
|
68432
|
+
Name: string;
|
|
68433
|
+
|
|
68434
|
+
@Field({nullable: true, description: `Optional description of what belongs in this category`})
|
|
68435
|
+
Description?: string;
|
|
68436
|
+
|
|
68437
|
+
@Field({nullable: true, description: `Self-referencing foreign key to the parent category, enabling a nested folder hierarchy (NULL for a top-level category)`})
|
|
68438
|
+
@MaxLength(36)
|
|
68439
|
+
ParentID?: string;
|
|
68440
|
+
|
|
68441
|
+
@Field()
|
|
68442
|
+
_mj__CreatedAt: Date;
|
|
68443
|
+
|
|
68444
|
+
@Field()
|
|
68445
|
+
_mj__UpdatedAt: Date;
|
|
68446
|
+
|
|
68447
|
+
@Field({nullable: true})
|
|
68448
|
+
@MaxLength(255)
|
|
68449
|
+
Parent?: string;
|
|
68450
|
+
|
|
68451
|
+
@Field({nullable: true})
|
|
68452
|
+
@MaxLength(36)
|
|
68453
|
+
RootParentID?: string;
|
|
68454
|
+
|
|
68455
|
+
@Field(() => [MJRemoteOperationCategory_])
|
|
68456
|
+
MJRemoteOperationCategories_ParentIDArray: MJRemoteOperationCategory_[]; // Link to MJRemoteOperationCategories
|
|
68457
|
+
|
|
68458
|
+
@Field(() => [MJRemoteOperation_])
|
|
68459
|
+
MJRemoteOperations_CategoryIDArray: MJRemoteOperation_[]; // Link to MJRemoteOperations
|
|
68460
|
+
|
|
68461
|
+
}
|
|
68462
|
+
|
|
68463
|
+
//****************************************************************************
|
|
68464
|
+
// INPUT TYPE for MJ: Remote Operation Categories
|
|
68465
|
+
//****************************************************************************
|
|
68466
|
+
@InputType()
|
|
68467
|
+
export class CreateMJRemoteOperationCategoryInput {
|
|
68468
|
+
@Field({ nullable: true })
|
|
68469
|
+
ID?: string;
|
|
68470
|
+
|
|
68471
|
+
@Field({ nullable: true })
|
|
68472
|
+
Name?: string;
|
|
68473
|
+
|
|
68474
|
+
@Field({ nullable: true })
|
|
68475
|
+
Description: string | null;
|
|
68476
|
+
|
|
68477
|
+
@Field({ nullable: true })
|
|
68478
|
+
ParentID: string | null;
|
|
68479
|
+
|
|
68480
|
+
@Field(() => RestoreContextInput, { nullable: true })
|
|
68481
|
+
RestoreContext___?: RestoreContextInput;
|
|
68482
|
+
}
|
|
68483
|
+
|
|
68484
|
+
|
|
68485
|
+
//****************************************************************************
|
|
68486
|
+
// INPUT TYPE for MJ: Remote Operation Categories
|
|
68487
|
+
//****************************************************************************
|
|
68488
|
+
@InputType()
|
|
68489
|
+
export class UpdateMJRemoteOperationCategoryInput {
|
|
68490
|
+
@Field()
|
|
68491
|
+
ID: string;
|
|
68492
|
+
|
|
68493
|
+
@Field({ nullable: true })
|
|
68494
|
+
Name?: string;
|
|
68495
|
+
|
|
68496
|
+
@Field({ nullable: true })
|
|
68497
|
+
Description?: string | null;
|
|
68498
|
+
|
|
68499
|
+
@Field({ nullable: true })
|
|
68500
|
+
ParentID?: string | null;
|
|
68501
|
+
|
|
68502
|
+
@Field(() => [KeyValuePairInput], { nullable: true })
|
|
68503
|
+
OldValues___?: KeyValuePairInput[];
|
|
68504
|
+
|
|
68505
|
+
@Field(() => RestoreContextInput, { nullable: true })
|
|
68506
|
+
RestoreContext___?: RestoreContextInput;
|
|
68507
|
+
}
|
|
68508
|
+
|
|
68509
|
+
//****************************************************************************
|
|
68510
|
+
// RESOLVER for MJ: Remote Operation Categories
|
|
68511
|
+
//****************************************************************************
|
|
68512
|
+
@ObjectType()
|
|
68513
|
+
export class RunMJRemoteOperationCategoryViewResult {
|
|
68514
|
+
@Field(() => [MJRemoteOperationCategory_])
|
|
68515
|
+
Results: MJRemoteOperationCategory_[];
|
|
68516
|
+
|
|
68517
|
+
@Field(() => String, {nullable: true})
|
|
68518
|
+
UserViewRunID?: string;
|
|
68519
|
+
|
|
68520
|
+
@Field(() => Int, {nullable: true})
|
|
68521
|
+
RowCount: number;
|
|
68522
|
+
|
|
68523
|
+
@Field(() => Int, {nullable: true})
|
|
68524
|
+
TotalRowCount: number;
|
|
68525
|
+
|
|
68526
|
+
@Field(() => Int, {nullable: true})
|
|
68527
|
+
ExecutionTime: number;
|
|
68528
|
+
|
|
68529
|
+
@Field({nullable: true})
|
|
68530
|
+
ErrorMessage?: string;
|
|
68531
|
+
|
|
68532
|
+
@Field(() => Boolean, {nullable: false})
|
|
68533
|
+
Success: boolean;
|
|
68534
|
+
}
|
|
68535
|
+
|
|
68536
|
+
@Resolver(MJRemoteOperationCategory_)
|
|
68537
|
+
export class MJRemoteOperationCategoryResolver extends ResolverBase {
|
|
68538
|
+
@Query(() => RunMJRemoteOperationCategoryViewResult)
|
|
68539
|
+
async RunMJRemoteOperationCategoryViewByID(@Arg('input', () => RunViewByIDInput) input: RunViewByIDInput, @Ctx() { providers, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
68540
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
68541
|
+
return super.RunViewByIDGeneric(input, provider, userPayload, pubSub);
|
|
68542
|
+
}
|
|
68543
|
+
|
|
68544
|
+
@Query(() => RunMJRemoteOperationCategoryViewResult)
|
|
68545
|
+
async RunMJRemoteOperationCategoryViewByName(@Arg('input', () => RunViewByNameInput) input: RunViewByNameInput, @Ctx() { providers, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
68546
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
68547
|
+
return super.RunViewByNameGeneric(input, provider, userPayload, pubSub);
|
|
68548
|
+
}
|
|
68549
|
+
|
|
68550
|
+
@Query(() => RunMJRemoteOperationCategoryViewResult)
|
|
68551
|
+
async RunMJRemoteOperationCategoryDynamicView(@Arg('input', () => RunDynamicViewInput) input: RunDynamicViewInput, @Ctx() { providers, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
68552
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
68553
|
+
input.EntityName = 'MJ: Remote Operation Categories';
|
|
68554
|
+
return super.RunDynamicViewGeneric(input, provider, userPayload, pubSub);
|
|
68555
|
+
}
|
|
68556
|
+
@Query(() => MJRemoteOperationCategory_, { nullable: true })
|
|
68557
|
+
async MJRemoteOperationCategory(@Arg('ID', () => String) ID: string, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine): Promise<MJRemoteOperationCategory_ | null> {
|
|
68558
|
+
this.CheckUserReadPermissions('MJ: Remote Operation Categories', userPayload);
|
|
68559
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
68560
|
+
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwRemoteOperationCategories')} WHERE ${provider.QuoteIdentifier('ID')}=${provider.BuildParameterPlaceholder(0)} ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: Remote Operation Categories', userPayload, EntityPermissionType.Read, 'AND');
|
|
68561
|
+
const rows = await provider.ExecuteSQL(sSQL, [ID], undefined, this.GetUserFromPayload(userPayload));
|
|
68562
|
+
const result = await this.MapFieldNamesToCodeNames('MJ: Remote Operation Categories', rows && rows.length > 0 ? rows[0] : null, this.GetUserFromPayload(userPayload));
|
|
68563
|
+
return result;
|
|
68564
|
+
}
|
|
68565
|
+
|
|
68566
|
+
@FieldResolver(() => [MJRemoteOperationCategory_])
|
|
68567
|
+
async MJRemoteOperationCategories_ParentIDArray(@Root() mjremoteoperationcategory_: MJRemoteOperationCategory_, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
68568
|
+
this.CheckUserReadPermissions('MJ: Remote Operation Categories', userPayload);
|
|
68569
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
68570
|
+
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwRemoteOperationCategories')} WHERE ${provider.QuoteIdentifier('ParentID')}=${provider.BuildParameterPlaceholder(0)} ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: Remote Operation Categories', userPayload, EntityPermissionType.Read, 'AND');
|
|
68571
|
+
const rows = await provider.ExecuteSQL(sSQL, [mjremoteoperationcategory_.ID], undefined, this.GetUserFromPayload(userPayload));
|
|
68572
|
+
const result = await this.ArrayMapFieldNamesToCodeNames('MJ: Remote Operation Categories', rows, this.GetUserFromPayload(userPayload));
|
|
68573
|
+
return result;
|
|
68574
|
+
}
|
|
68575
|
+
|
|
68576
|
+
@FieldResolver(() => [MJRemoteOperation_])
|
|
68577
|
+
async MJRemoteOperations_CategoryIDArray(@Root() mjremoteoperationcategory_: MJRemoteOperationCategory_, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
68578
|
+
this.CheckUserReadPermissions('MJ: Remote Operations', userPayload);
|
|
68579
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
68580
|
+
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwRemoteOperations')} WHERE ${provider.QuoteIdentifier('CategoryID')}=${provider.BuildParameterPlaceholder(0)} ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: Remote Operations', userPayload, EntityPermissionType.Read, 'AND');
|
|
68581
|
+
const rows = await provider.ExecuteSQL(sSQL, [mjremoteoperationcategory_.ID], undefined, this.GetUserFromPayload(userPayload));
|
|
68582
|
+
const result = await this.ArrayMapFieldNamesToCodeNames('MJ: Remote Operations', rows, this.GetUserFromPayload(userPayload));
|
|
68583
|
+
return result;
|
|
68584
|
+
}
|
|
68585
|
+
|
|
68586
|
+
@Mutation(() => MJRemoteOperationCategory_)
|
|
68587
|
+
async CreateMJRemoteOperationCategory(
|
|
68588
|
+
@Arg('input', () => CreateMJRemoteOperationCategoryInput) input: CreateMJRemoteOperationCategoryInput,
|
|
68589
|
+
@Ctx() { providers, userPayload }: AppContext,
|
|
68590
|
+
@PubSub() pubSub: PubSubEngine
|
|
68591
|
+
) {
|
|
68592
|
+
const provider = GetReadWriteProvider(providers);
|
|
68593
|
+
return this.CreateRecord('MJ: Remote Operation Categories', input, provider, userPayload, pubSub)
|
|
68594
|
+
}
|
|
68595
|
+
|
|
68596
|
+
@Mutation(() => MJRemoteOperationCategory_)
|
|
68597
|
+
async UpdateMJRemoteOperationCategory(
|
|
68598
|
+
@Arg('input', () => UpdateMJRemoteOperationCategoryInput) input: UpdateMJRemoteOperationCategoryInput,
|
|
68599
|
+
@Ctx() { providers, userPayload }: AppContext,
|
|
68600
|
+
@PubSub() pubSub: PubSubEngine
|
|
68601
|
+
) {
|
|
68602
|
+
const provider = GetReadWriteProvider(providers);
|
|
68603
|
+
return this.UpdateRecord('MJ: Remote Operation Categories', input, provider, userPayload, pubSub);
|
|
68604
|
+
}
|
|
68605
|
+
|
|
68606
|
+
@Mutation(() => MJRemoteOperationCategory_)
|
|
68607
|
+
async DeleteMJRemoteOperationCategory(@Arg('ID', () => String) ID: string, @Arg('options___', () => DeleteOptionsInput) options: DeleteOptionsInput, @Ctx() { providers, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
68608
|
+
const provider = GetReadWriteProvider(providers);
|
|
68609
|
+
const key = new CompositeKey([{FieldName: 'ID', Value: ID}]);
|
|
68610
|
+
return this.DeleteRecord('MJ: Remote Operation Categories', key, options, provider, userPayload, pubSub);
|
|
68611
|
+
}
|
|
68612
|
+
|
|
68613
|
+
}
|
|
68614
|
+
|
|
68615
|
+
//****************************************************************************
|
|
68616
|
+
// ENTITY CLASS for MJ: Remote Operations
|
|
68617
|
+
//****************************************************************************
|
|
68618
|
+
@ObjectType({ description: `Definition of a typed, provider-routed server operation invoked identically from the client (marshalled over GraphQL) and the server (dispatched in-process) - the typed peer of BaseEntity (CRUD) and RunView (set reads) for arbitrary capabilities. Input/output types are declared here and emitted by CodeGen into a typed base class; the body may be hand-written or AI-authored from Description. EXAMPLE: "RecordProcess.RunNow" (ExecutionMode=LongRunning) takes {recordProcessID} and returns {processRunID}, authorized by the recordprocess:execute scope plus the caller\'s entity permissions.` })
|
|
68619
|
+
export class MJRemoteOperation_ {
|
|
68620
|
+
@Field()
|
|
68621
|
+
@MaxLength(36)
|
|
68622
|
+
ID: string;
|
|
68623
|
+
|
|
68624
|
+
@Field({description: `Human-readable name of the operation`})
|
|
68625
|
+
@MaxLength(255)
|
|
68626
|
+
Name: string;
|
|
68627
|
+
|
|
68628
|
+
@Field({description: `Stable, unique registry key and wire token used to dispatch the operation (e.g., "RecordProcess.RunNow"). Namespaced by convention.`})
|
|
68629
|
+
@MaxLength(255)
|
|
68630
|
+
OperationKey: string;
|
|
68631
|
+
|
|
68632
|
+
@Field({nullable: true, description: `Optional hierarchical category for organizing this operation in the UI`})
|
|
68633
|
+
@MaxLength(36)
|
|
68634
|
+
CategoryID?: string;
|
|
68635
|
+
|
|
68636
|
+
@Field({nullable: true, description: `Human description of the operation; also the seed for AI-generated implementation code when GenerationType=AI`})
|
|
68637
|
+
Description?: string;
|
|
68638
|
+
|
|
68639
|
+
@Field({nullable: true, description: `TypeScript type name for the operation input (emitted by CodeGen as the TInput interface)`})
|
|
68640
|
+
@MaxLength(255)
|
|
68641
|
+
InputTypeName?: string;
|
|
68642
|
+
|
|
68643
|
+
@Field({nullable: true, description: `Raw TypeScript interface/type source defining the input shape (same mechanism as EntityField JSON-type definitions)`})
|
|
68644
|
+
InputTypeDefinition?: string;
|
|
68645
|
+
|
|
68646
|
+
@Field(() => Boolean, {description: `When 1, the input type is emitted as an array (TInput[])`})
|
|
68647
|
+
InputTypeIsArray: boolean;
|
|
68648
|
+
|
|
68649
|
+
@Field({nullable: true, description: `TypeScript type name for the operation output (emitted by CodeGen as the TOutput interface)`})
|
|
68650
|
+
@MaxLength(255)
|
|
68651
|
+
OutputTypeName?: string;
|
|
68652
|
+
|
|
68653
|
+
@Field({nullable: true, description: `Raw TypeScript interface/type source defining the output shape`})
|
|
68654
|
+
OutputTypeDefinition?: string;
|
|
68655
|
+
|
|
68656
|
+
@Field(() => Boolean, {description: `When 1, the output type is emitted as an array (TOutput[])`})
|
|
68657
|
+
OutputTypeIsArray: boolean;
|
|
68658
|
+
|
|
68659
|
+
@Field({description: `Sync (request/response) or LongRunning (returns a handle; supports detached and attached consumption)`})
|
|
68660
|
+
@MaxLength(20)
|
|
68661
|
+
ExecutionMode: string;
|
|
68662
|
+
|
|
68663
|
+
@Field({nullable: true, description: `Optional API-key scope string (e.g., recordprocess:execute) enforced for API-key/MCP callers; NULL means no scope gate (interactive users are still bounded by their entity permissions)`})
|
|
68664
|
+
@MaxLength(255)
|
|
68665
|
+
RequiredScope?: string;
|
|
68666
|
+
|
|
68667
|
+
@Field(() => Boolean, {description: `When 1, only the system user may invoke this operation`})
|
|
68668
|
+
RequiresSystemUser: boolean;
|
|
68669
|
+
|
|
68670
|
+
@Field({description: `How the server implementation is provided: Manual (hand-written subclass), AI (generated from Description), or Default (standard generated plumbing)`})
|
|
68671
|
+
@MaxLength(20)
|
|
68672
|
+
GenerationType: string;
|
|
68673
|
+
|
|
68674
|
+
@Field({nullable: true, description: `The AI-generated implementation body (when GenerationType=AI); regenerated only when Description changes`})
|
|
68675
|
+
Code?: string;
|
|
68676
|
+
|
|
68677
|
+
@Field({description: `Human approval gate for AI-generated code: Pending, Approved, or Rejected. Only Approved AI code is emitted and routable.`})
|
|
68678
|
+
@MaxLength(20)
|
|
68679
|
+
CodeApprovalStatus: string;
|
|
68680
|
+
|
|
68681
|
+
@Field({nullable: true, description: `Foreign key to the user who approved the generated code`})
|
|
68682
|
+
@MaxLength(36)
|
|
68683
|
+
CodeApprovedByUserID?: string;
|
|
68684
|
+
|
|
68685
|
+
@Field({nullable: true, description: `When the generated code was approved`})
|
|
68686
|
+
CodeApprovedAt?: Date;
|
|
68687
|
+
|
|
68688
|
+
@Field({nullable: true, description: `Fingerprint of the input/output contract; carried in the wire envelope so the server can reject a stale client loudly instead of mis-deserializing`})
|
|
68689
|
+
@MaxLength(100)
|
|
68690
|
+
ContractFingerprint?: string;
|
|
68691
|
+
|
|
68692
|
+
@Field({description: `Lifecycle status: Active (routable), Disabled, or Pending. Only Active operations can be invoked.`})
|
|
68693
|
+
@MaxLength(20)
|
|
68694
|
+
Status: string;
|
|
68695
|
+
|
|
68696
|
+
@Field(() => Int, {nullable: true, description: `Optional result cache TTL in seconds (NULL = no caching)`})
|
|
68697
|
+
CacheTTLSeconds?: number;
|
|
68698
|
+
|
|
68699
|
+
@Field(() => Int, {nullable: true, description: `Optional execution timeout in milliseconds`})
|
|
68700
|
+
TimeoutMS?: number;
|
|
68701
|
+
|
|
68702
|
+
@Field(() => Int, {nullable: true, description: `Optional cap on concurrent executions of this operation`})
|
|
68703
|
+
MaxConcurrency?: number;
|
|
68704
|
+
|
|
68705
|
+
@Field()
|
|
68706
|
+
_mj__CreatedAt: Date;
|
|
68707
|
+
|
|
68708
|
+
@Field()
|
|
68709
|
+
_mj__UpdatedAt: Date;
|
|
68710
|
+
|
|
68711
|
+
@Field(() => Boolean, {description: `When 1, the AI-generated Code is frozen and Save() will not regenerate it even if Description changes (the Generated-Actions CodeLocked analog). Default 0.`})
|
|
68712
|
+
CodeLocked: boolean;
|
|
68713
|
+
|
|
68714
|
+
@Field({nullable: true, description: `The model's explanation / comments for the AI-generated Code (populated alongside Code when GenerationType=AI). Human-facing review aid.`})
|
|
68715
|
+
CodeComments?: string;
|
|
68716
|
+
|
|
68717
|
+
@Field({nullable: true, description: `JSON array of the libraries the generated body imports: [{ "Library": "@memberjunction/ai-prompts", "ItemsUsed": ["AIPromptRunner"] }, ...]. Bound to the RemoteOperationLibrary JSONType via metadata sync so CodeGen emits a typed LibrariesObject accessor; CodeGen uses it to emit the imports at the top of the generated remote_operations.ts. NULL/empty = only the default always-available libraries are imported.`})
|
|
68718
|
+
Libraries?: string;
|
|
68719
|
+
|
|
68720
|
+
@Field({nullable: true})
|
|
68721
|
+
@MaxLength(255)
|
|
68722
|
+
Category?: string;
|
|
68723
|
+
|
|
68724
|
+
@Field({nullable: true})
|
|
68725
|
+
@MaxLength(100)
|
|
68726
|
+
CodeApprovedByUser?: string;
|
|
68727
|
+
|
|
68728
|
+
}
|
|
68729
|
+
|
|
68730
|
+
//****************************************************************************
|
|
68731
|
+
// INPUT TYPE for MJ: Remote Operations
|
|
68732
|
+
//****************************************************************************
|
|
68733
|
+
@InputType()
|
|
68734
|
+
export class CreateMJRemoteOperationInput {
|
|
68735
|
+
@Field({ nullable: true })
|
|
68736
|
+
ID?: string;
|
|
68737
|
+
|
|
68738
|
+
@Field({ nullable: true })
|
|
68739
|
+
Name?: string;
|
|
68740
|
+
|
|
68741
|
+
@Field({ nullable: true })
|
|
68742
|
+
OperationKey?: string;
|
|
68743
|
+
|
|
68744
|
+
@Field({ nullable: true })
|
|
68745
|
+
CategoryID: string | null;
|
|
68746
|
+
|
|
68747
|
+
@Field({ nullable: true })
|
|
68748
|
+
Description: string | null;
|
|
68749
|
+
|
|
68750
|
+
@Field({ nullable: true })
|
|
68751
|
+
InputTypeName: string | null;
|
|
68752
|
+
|
|
68753
|
+
@Field({ nullable: true })
|
|
68754
|
+
InputTypeDefinition: string | null;
|
|
68755
|
+
|
|
68756
|
+
@Field(() => Boolean, { nullable: true })
|
|
68757
|
+
InputTypeIsArray?: boolean;
|
|
68758
|
+
|
|
68759
|
+
@Field({ nullable: true })
|
|
68760
|
+
OutputTypeName: string | null;
|
|
68761
|
+
|
|
68762
|
+
@Field({ nullable: true })
|
|
68763
|
+
OutputTypeDefinition: string | null;
|
|
68764
|
+
|
|
68765
|
+
@Field(() => Boolean, { nullable: true })
|
|
68766
|
+
OutputTypeIsArray?: boolean;
|
|
68767
|
+
|
|
68768
|
+
@Field({ nullable: true })
|
|
68769
|
+
ExecutionMode?: string;
|
|
68770
|
+
|
|
68771
|
+
@Field({ nullable: true })
|
|
68772
|
+
RequiredScope: string | null;
|
|
68773
|
+
|
|
68774
|
+
@Field(() => Boolean, { nullable: true })
|
|
68775
|
+
RequiresSystemUser?: boolean;
|
|
68776
|
+
|
|
68777
|
+
@Field({ nullable: true })
|
|
68778
|
+
GenerationType?: string;
|
|
68779
|
+
|
|
68780
|
+
@Field({ nullable: true })
|
|
68781
|
+
Code: string | null;
|
|
68782
|
+
|
|
68783
|
+
@Field({ nullable: true })
|
|
68784
|
+
CodeApprovalStatus?: string;
|
|
68785
|
+
|
|
68786
|
+
@Field({ nullable: true })
|
|
68787
|
+
CodeApprovedByUserID: string | null;
|
|
68788
|
+
|
|
68789
|
+
@Field({ nullable: true })
|
|
68790
|
+
CodeApprovedAt: Date | null;
|
|
68791
|
+
|
|
68792
|
+
@Field({ nullable: true })
|
|
68793
|
+
ContractFingerprint: string | null;
|
|
68794
|
+
|
|
68795
|
+
@Field({ nullable: true })
|
|
68796
|
+
Status?: string;
|
|
68797
|
+
|
|
68798
|
+
@Field(() => Int, { nullable: true })
|
|
68799
|
+
CacheTTLSeconds: number | null;
|
|
68800
|
+
|
|
68801
|
+
@Field(() => Int, { nullable: true })
|
|
68802
|
+
TimeoutMS: number | null;
|
|
68803
|
+
|
|
68804
|
+
@Field(() => Int, { nullable: true })
|
|
68805
|
+
MaxConcurrency: number | null;
|
|
68806
|
+
|
|
68807
|
+
@Field(() => Boolean, { nullable: true })
|
|
68808
|
+
CodeLocked?: boolean;
|
|
68809
|
+
|
|
68810
|
+
@Field({ nullable: true })
|
|
68811
|
+
CodeComments: string | null;
|
|
68812
|
+
|
|
68813
|
+
@Field({ nullable: true })
|
|
68814
|
+
Libraries: string | null;
|
|
68815
|
+
|
|
68816
|
+
@Field(() => RestoreContextInput, { nullable: true })
|
|
68817
|
+
RestoreContext___?: RestoreContextInput;
|
|
68818
|
+
}
|
|
68819
|
+
|
|
68820
|
+
|
|
68821
|
+
//****************************************************************************
|
|
68822
|
+
// INPUT TYPE for MJ: Remote Operations
|
|
68823
|
+
//****************************************************************************
|
|
68824
|
+
@InputType()
|
|
68825
|
+
export class UpdateMJRemoteOperationInput {
|
|
68826
|
+
@Field()
|
|
68827
|
+
ID: string;
|
|
68828
|
+
|
|
68829
|
+
@Field({ nullable: true })
|
|
68830
|
+
Name?: string;
|
|
68831
|
+
|
|
68832
|
+
@Field({ nullable: true })
|
|
68833
|
+
OperationKey?: string;
|
|
68834
|
+
|
|
68835
|
+
@Field({ nullable: true })
|
|
68836
|
+
CategoryID?: string | null;
|
|
68837
|
+
|
|
68838
|
+
@Field({ nullable: true })
|
|
68839
|
+
Description?: string | null;
|
|
68840
|
+
|
|
68841
|
+
@Field({ nullable: true })
|
|
68842
|
+
InputTypeName?: string | null;
|
|
68843
|
+
|
|
68844
|
+
@Field({ nullable: true })
|
|
68845
|
+
InputTypeDefinition?: string | null;
|
|
68846
|
+
|
|
68847
|
+
@Field(() => Boolean, { nullable: true })
|
|
68848
|
+
InputTypeIsArray?: boolean;
|
|
68849
|
+
|
|
68850
|
+
@Field({ nullable: true })
|
|
68851
|
+
OutputTypeName?: string | null;
|
|
68852
|
+
|
|
68853
|
+
@Field({ nullable: true })
|
|
68854
|
+
OutputTypeDefinition?: string | null;
|
|
68855
|
+
|
|
68856
|
+
@Field(() => Boolean, { nullable: true })
|
|
68857
|
+
OutputTypeIsArray?: boolean;
|
|
68858
|
+
|
|
68859
|
+
@Field({ nullable: true })
|
|
68860
|
+
ExecutionMode?: string;
|
|
68861
|
+
|
|
68862
|
+
@Field({ nullable: true })
|
|
68863
|
+
RequiredScope?: string | null;
|
|
68864
|
+
|
|
68865
|
+
@Field(() => Boolean, { nullable: true })
|
|
68866
|
+
RequiresSystemUser?: boolean;
|
|
68867
|
+
|
|
68868
|
+
@Field({ nullable: true })
|
|
68869
|
+
GenerationType?: string;
|
|
68870
|
+
|
|
68871
|
+
@Field({ nullable: true })
|
|
68872
|
+
Code?: string | null;
|
|
68873
|
+
|
|
68874
|
+
@Field({ nullable: true })
|
|
68875
|
+
CodeApprovalStatus?: string;
|
|
68876
|
+
|
|
68877
|
+
@Field({ nullable: true })
|
|
68878
|
+
CodeApprovedByUserID?: string | null;
|
|
68879
|
+
|
|
68880
|
+
@Field({ nullable: true })
|
|
68881
|
+
CodeApprovedAt?: Date | null;
|
|
68882
|
+
|
|
68883
|
+
@Field({ nullable: true })
|
|
68884
|
+
ContractFingerprint?: string | null;
|
|
68885
|
+
|
|
68886
|
+
@Field({ nullable: true })
|
|
68887
|
+
Status?: string;
|
|
68888
|
+
|
|
68889
|
+
@Field(() => Int, { nullable: true })
|
|
68890
|
+
CacheTTLSeconds?: number | null;
|
|
68891
|
+
|
|
68892
|
+
@Field(() => Int, { nullable: true })
|
|
68893
|
+
TimeoutMS?: number | null;
|
|
68894
|
+
|
|
68895
|
+
@Field(() => Int, { nullable: true })
|
|
68896
|
+
MaxConcurrency?: number | null;
|
|
68897
|
+
|
|
68898
|
+
@Field(() => Boolean, { nullable: true })
|
|
68899
|
+
CodeLocked?: boolean;
|
|
68900
|
+
|
|
68901
|
+
@Field({ nullable: true })
|
|
68902
|
+
CodeComments?: string | null;
|
|
68903
|
+
|
|
68904
|
+
@Field({ nullable: true })
|
|
68905
|
+
Libraries?: string | null;
|
|
68906
|
+
|
|
68907
|
+
@Field(() => [KeyValuePairInput], { nullable: true })
|
|
68908
|
+
OldValues___?: KeyValuePairInput[];
|
|
68909
|
+
|
|
68910
|
+
@Field(() => RestoreContextInput, { nullable: true })
|
|
68911
|
+
RestoreContext___?: RestoreContextInput;
|
|
68912
|
+
}
|
|
68913
|
+
|
|
68914
|
+
//****************************************************************************
|
|
68915
|
+
// RESOLVER for MJ: Remote Operations
|
|
68916
|
+
//****************************************************************************
|
|
68917
|
+
@ObjectType()
|
|
68918
|
+
export class RunMJRemoteOperationViewResult {
|
|
68919
|
+
@Field(() => [MJRemoteOperation_])
|
|
68920
|
+
Results: MJRemoteOperation_[];
|
|
68921
|
+
|
|
68922
|
+
@Field(() => String, {nullable: true})
|
|
68923
|
+
UserViewRunID?: string;
|
|
68924
|
+
|
|
68925
|
+
@Field(() => Int, {nullable: true})
|
|
68926
|
+
RowCount: number;
|
|
68927
|
+
|
|
68928
|
+
@Field(() => Int, {nullable: true})
|
|
68929
|
+
TotalRowCount: number;
|
|
68930
|
+
|
|
68931
|
+
@Field(() => Int, {nullable: true})
|
|
68932
|
+
ExecutionTime: number;
|
|
68933
|
+
|
|
68934
|
+
@Field({nullable: true})
|
|
68935
|
+
ErrorMessage?: string;
|
|
68936
|
+
|
|
68937
|
+
@Field(() => Boolean, {nullable: false})
|
|
68938
|
+
Success: boolean;
|
|
68939
|
+
}
|
|
68940
|
+
|
|
68941
|
+
@Resolver(MJRemoteOperation_)
|
|
68942
|
+
export class MJRemoteOperationResolver extends ResolverBase {
|
|
68943
|
+
@Query(() => RunMJRemoteOperationViewResult)
|
|
68944
|
+
async RunMJRemoteOperationViewByID(@Arg('input', () => RunViewByIDInput) input: RunViewByIDInput, @Ctx() { providers, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
68945
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
68946
|
+
return super.RunViewByIDGeneric(input, provider, userPayload, pubSub);
|
|
68947
|
+
}
|
|
68948
|
+
|
|
68949
|
+
@Query(() => RunMJRemoteOperationViewResult)
|
|
68950
|
+
async RunMJRemoteOperationViewByName(@Arg('input', () => RunViewByNameInput) input: RunViewByNameInput, @Ctx() { providers, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
68951
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
68952
|
+
return super.RunViewByNameGeneric(input, provider, userPayload, pubSub);
|
|
68953
|
+
}
|
|
68954
|
+
|
|
68955
|
+
@Query(() => RunMJRemoteOperationViewResult)
|
|
68956
|
+
async RunMJRemoteOperationDynamicView(@Arg('input', () => RunDynamicViewInput) input: RunDynamicViewInput, @Ctx() { providers, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
68957
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
68958
|
+
input.EntityName = 'MJ: Remote Operations';
|
|
68959
|
+
return super.RunDynamicViewGeneric(input, provider, userPayload, pubSub);
|
|
68960
|
+
}
|
|
68961
|
+
@Query(() => MJRemoteOperation_, { nullable: true })
|
|
68962
|
+
async MJRemoteOperation(@Arg('ID', () => String) ID: string, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine): Promise<MJRemoteOperation_ | null> {
|
|
68963
|
+
this.CheckUserReadPermissions('MJ: Remote Operations', userPayload);
|
|
68964
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
68965
|
+
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwRemoteOperations')} WHERE ${provider.QuoteIdentifier('ID')}=${provider.BuildParameterPlaceholder(0)} ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: Remote Operations', userPayload, EntityPermissionType.Read, 'AND');
|
|
68966
|
+
const rows = await provider.ExecuteSQL(sSQL, [ID], undefined, this.GetUserFromPayload(userPayload));
|
|
68967
|
+
const result = await this.MapFieldNamesToCodeNames('MJ: Remote Operations', rows && rows.length > 0 ? rows[0] : null, this.GetUserFromPayload(userPayload));
|
|
68968
|
+
return result;
|
|
68969
|
+
}
|
|
68970
|
+
|
|
68971
|
+
@Mutation(() => MJRemoteOperation_)
|
|
68972
|
+
async CreateMJRemoteOperation(
|
|
68973
|
+
@Arg('input', () => CreateMJRemoteOperationInput) input: CreateMJRemoteOperationInput,
|
|
68974
|
+
@Ctx() { providers, userPayload }: AppContext,
|
|
68975
|
+
@PubSub() pubSub: PubSubEngine
|
|
68976
|
+
) {
|
|
68977
|
+
const provider = GetReadWriteProvider(providers);
|
|
68978
|
+
return this.CreateRecord('MJ: Remote Operations', input, provider, userPayload, pubSub)
|
|
68979
|
+
}
|
|
68980
|
+
|
|
68981
|
+
@Mutation(() => MJRemoteOperation_)
|
|
68982
|
+
async UpdateMJRemoteOperation(
|
|
68983
|
+
@Arg('input', () => UpdateMJRemoteOperationInput) input: UpdateMJRemoteOperationInput,
|
|
68984
|
+
@Ctx() { providers, userPayload }: AppContext,
|
|
68985
|
+
@PubSub() pubSub: PubSubEngine
|
|
68986
|
+
) {
|
|
68987
|
+
const provider = GetReadWriteProvider(providers);
|
|
68988
|
+
return this.UpdateRecord('MJ: Remote Operations', input, provider, userPayload, pubSub);
|
|
68989
|
+
}
|
|
68990
|
+
|
|
68991
|
+
@Mutation(() => MJRemoteOperation_)
|
|
68992
|
+
async DeleteMJRemoteOperation(@Arg('ID', () => String) ID: string, @Arg('options___', () => DeleteOptionsInput) options: DeleteOptionsInput, @Ctx() { providers, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
68993
|
+
const provider = GetReadWriteProvider(providers);
|
|
68994
|
+
const key = new CompositeKey([{FieldName: 'ID', Value: ID}]);
|
|
68995
|
+
return this.DeleteRecord('MJ: Remote Operations', key, options, provider, userPayload, pubSub);
|
|
68996
|
+
}
|
|
68997
|
+
|
|
68998
|
+
}
|
|
68999
|
+
|
|
66748
69000
|
//****************************************************************************
|
|
66749
69001
|
// ENTITY CLASS for MJ: Report Categories
|
|
66750
69002
|
//****************************************************************************
|
|
@@ -69669,6 +71921,9 @@ export class MJScheduledJobRun_ {
|
|
|
69669
71921
|
@MaxLength(100)
|
|
69670
71922
|
ExecutedByUser?: string;
|
|
69671
71923
|
|
|
71924
|
+
@Field(() => [MJProcessRun_])
|
|
71925
|
+
MJProcessRuns_ScheduledJobRunIDArray: MJProcessRun_[]; // Link to MJProcessRuns
|
|
71926
|
+
|
|
69672
71927
|
@Field(() => [MJAIAgentRun_])
|
|
69673
71928
|
MJAIAgentRuns_ScheduledJobRunIDArray: MJAIAgentRun_[]; // Link to MJAIAgentRuns
|
|
69674
71929
|
|
|
@@ -69816,6 +72071,16 @@ export class MJScheduledJobRunResolver extends ResolverBase {
|
|
|
69816
72071
|
return result;
|
|
69817
72072
|
}
|
|
69818
72073
|
|
|
72074
|
+
@FieldResolver(() => [MJProcessRun_])
|
|
72075
|
+
async MJProcessRuns_ScheduledJobRunIDArray(@Root() mjscheduledjobrun_: MJScheduledJobRun_, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
72076
|
+
this.CheckUserReadPermissions('MJ: Process Runs', userPayload);
|
|
72077
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
72078
|
+
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwProcessRuns')} WHERE ${provider.QuoteIdentifier('ScheduledJobRunID')}=${provider.BuildParameterPlaceholder(0)} ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: Process Runs', userPayload, EntityPermissionType.Read, 'AND');
|
|
72079
|
+
const rows = await provider.ExecuteSQL(sSQL, [mjscheduledjobrun_.ID], undefined, this.GetUserFromPayload(userPayload));
|
|
72080
|
+
const result = await this.ArrayMapFieldNamesToCodeNames('MJ: Process Runs', rows, this.GetUserFromPayload(userPayload));
|
|
72081
|
+
return result;
|
|
72082
|
+
}
|
|
72083
|
+
|
|
69819
72084
|
@FieldResolver(() => [MJAIAgentRun_])
|
|
69820
72085
|
async MJAIAgentRuns_ScheduledJobRunIDArray(@Root() mjscheduledjobrun_: MJScheduledJobRun_, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
69821
72086
|
this.CheckUserReadPermissions('MJ: AI Agent Runs', userPayload);
|
|
@@ -83255,6 +85520,9 @@ export class MJUserView_ {
|
|
|
83255
85520
|
@Field(() => [MJList_])
|
|
83256
85521
|
MJLists_SourceViewIDArray: MJList_[]; // Link to MJLists
|
|
83257
85522
|
|
|
85523
|
+
@Field(() => [MJRecordProcess_])
|
|
85524
|
+
MJRecordProcesses_ScopeViewIDArray: MJRecordProcess_[]; // Link to MJRecordProcesses
|
|
85525
|
+
|
|
83258
85526
|
}
|
|
83259
85527
|
|
|
83260
85528
|
//****************************************************************************
|
|
@@ -83518,6 +85786,16 @@ export class MJUserViewResolverBase extends ResolverBase {
|
|
|
83518
85786
|
return result;
|
|
83519
85787
|
}
|
|
83520
85788
|
|
|
85789
|
+
@FieldResolver(() => [MJRecordProcess_])
|
|
85790
|
+
async MJRecordProcesses_ScopeViewIDArray(@Root() mjuserview_: MJUserView_, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
85791
|
+
this.CheckUserReadPermissions('MJ: Record Processes', userPayload);
|
|
85792
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
85793
|
+
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwRecordProcesses')} WHERE ${provider.QuoteIdentifier('ScopeViewID')}=${provider.BuildParameterPlaceholder(0)} ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: Record Processes', userPayload, EntityPermissionType.Read, 'AND');
|
|
85794
|
+
const rows = await provider.ExecuteSQL(sSQL, [mjuserview_.ID], undefined, this.GetUserFromPayload(userPayload));
|
|
85795
|
+
const result = await this.ArrayMapFieldNamesToCodeNames('MJ: Record Processes', rows, this.GetUserFromPayload(userPayload));
|
|
85796
|
+
return result;
|
|
85797
|
+
}
|
|
85798
|
+
|
|
83521
85799
|
@Mutation(() => MJUserView_)
|
|
83522
85800
|
async CreateMJUserView(
|
|
83523
85801
|
@Arg('input', () => CreateMJUserViewInput) input: CreateMJUserViewInput,
|
|
@@ -83945,6 +86223,12 @@ export class MJUser_ {
|
|
|
83945
86223
|
@Field(() => [MJAIAgentSessionBridgeParticipant_])
|
|
83946
86224
|
MJAIAgentSessionBridgeParticipants_UserIDArray: MJAIAgentSessionBridgeParticipant_[]; // Link to MJAIAgentSessionBridgeParticipants
|
|
83947
86225
|
|
|
86226
|
+
@Field(() => [MJRemoteOperation_])
|
|
86227
|
+
MJRemoteOperations_CodeApprovedByUserIDArray: MJRemoteOperation_[]; // Link to MJRemoteOperations
|
|
86228
|
+
|
|
86229
|
+
@Field(() => [MJProcessRun_])
|
|
86230
|
+
MJProcessRuns_StartedByUserIDArray: MJProcessRun_[]; // Link to MJProcessRuns
|
|
86231
|
+
|
|
83948
86232
|
}
|
|
83949
86233
|
|
|
83950
86234
|
//****************************************************************************
|
|
@@ -85150,6 +87434,26 @@ export class MJUserResolverBase extends ResolverBase {
|
|
|
85150
87434
|
return result;
|
|
85151
87435
|
}
|
|
85152
87436
|
|
|
87437
|
+
@FieldResolver(() => [MJRemoteOperation_])
|
|
87438
|
+
async MJRemoteOperations_CodeApprovedByUserIDArray(@Root() mjuser_: MJUser_, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
87439
|
+
this.CheckUserReadPermissions('MJ: Remote Operations', userPayload);
|
|
87440
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
87441
|
+
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwRemoteOperations')} WHERE ${provider.QuoteIdentifier('CodeApprovedByUserID')}=${provider.BuildParameterPlaceholder(0)} ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: Remote Operations', userPayload, EntityPermissionType.Read, 'AND');
|
|
87442
|
+
const rows = await provider.ExecuteSQL(sSQL, [mjuser_.ID], undefined, this.GetUserFromPayload(userPayload));
|
|
87443
|
+
const result = await this.ArrayMapFieldNamesToCodeNames('MJ: Remote Operations', rows, this.GetUserFromPayload(userPayload));
|
|
87444
|
+
return result;
|
|
87445
|
+
}
|
|
87446
|
+
|
|
87447
|
+
@FieldResolver(() => [MJProcessRun_])
|
|
87448
|
+
async MJProcessRuns_StartedByUserIDArray(@Root() mjuser_: MJUser_, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
87449
|
+
this.CheckUserReadPermissions('MJ: Process Runs', userPayload);
|
|
87450
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
87451
|
+
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwProcessRuns')} WHERE ${provider.QuoteIdentifier('StartedByUserID')}=${provider.BuildParameterPlaceholder(0)} ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: Process Runs', userPayload, EntityPermissionType.Read, 'AND');
|
|
87452
|
+
const rows = await provider.ExecuteSQL(sSQL, [mjuser_.ID], undefined, this.GetUserFromPayload(userPayload));
|
|
87453
|
+
const result = await this.ArrayMapFieldNamesToCodeNames('MJ: Process Runs', rows, this.GetUserFromPayload(userPayload));
|
|
87454
|
+
return result;
|
|
87455
|
+
}
|
|
87456
|
+
|
|
85153
87457
|
@Mutation(() => MJUser_)
|
|
85154
87458
|
async CreateMJUser(
|
|
85155
87459
|
@Arg('input', () => CreateMJUserInput) input: CreateMJUserInput,
|