@memberjunction/server 5.41.0 → 5.42.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/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 +591 -0
- package/dist/generated/generated.d.ts.map +1 -1
- package/dist/generated/generated.js +6832 -3610
- package/dist/generated/generated.js.map +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +33 -16
- 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 +27 -0
- package/dist/resolvers/ExecuteRemoteOperationResolver.d.ts.map +1 -0
- package/dist/resolvers/ExecuteRemoteOperationResolver.js +136 -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 +544 -42
- package/dist/resolvers/IntegrationDiscoveryResolver.js.map +1 -1
- package/dist/resolvers/RealtimeBridgeResolver.d.ts +121 -0
- package/dist/resolvers/RealtimeBridgeResolver.d.ts.map +1 -0
- package/dist/resolvers/RealtimeBridgeResolver.js +533 -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/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/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 +2444 -205
- package/src/index.ts +33 -16
- package/src/integration/CustomColumnPromoter.ts +597 -0
- package/src/logging/StartupLogger.ts +130 -6
- package/src/resolvers/ExecuteRemoteOperationResolver.ts +108 -0
- package/src/resolvers/IntegrationDiscoveryResolver.ts +396 -37
- package/src/resolvers/RealtimeBridgeResolver.ts +450 -0
- package/src/resolvers/RemoteBrowserActionResolver.ts +232 -17
- package/src/resolvers/RunAIAgentResolver.ts +1 -9
- 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,
|
|
@@ -53203,6 +53320,26 @@ export class MJIntegrationObject_ {
|
|
|
53203
53320
|
@MaxLength(20)
|
|
53204
53321
|
MetadataSource: string;
|
|
53205
53322
|
|
|
53323
|
+
@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.`})
|
|
53324
|
+
SupportsCreate: boolean;
|
|
53325
|
+
|
|
53326
|
+
@Field(() => Boolean, {description: `Whether this object supports record updates in the external system (per-operation granularity beyond SupportsWrite).`})
|
|
53327
|
+
SupportsUpdate: boolean;
|
|
53328
|
+
|
|
53329
|
+
@Field(() => Boolean, {description: `Whether this object supports record deletion/tombstoning in the external system (per-operation granularity beyond SupportsWrite).`})
|
|
53330
|
+
SupportsDelete: boolean;
|
|
53331
|
+
|
|
53332
|
+
@Field({nullable: true, description: `Declared incremental sync strategy for this object (e.g. WatermarkIncremental, ContentHash, FullSnapshot). Informs how the engine narrows subsequent syncs.`})
|
|
53333
|
+
@MaxLength(50)
|
|
53334
|
+
SyncStrategy?: string;
|
|
53335
|
+
|
|
53336
|
+
@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.`})
|
|
53337
|
+
ContentHashApplicable: boolean;
|
|
53338
|
+
|
|
53339
|
+
@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.`})
|
|
53340
|
+
@MaxLength(255)
|
|
53341
|
+
StableOrderingKey?: string;
|
|
53342
|
+
|
|
53206
53343
|
@Field()
|
|
53207
53344
|
@MaxLength(100)
|
|
53208
53345
|
Integration: string;
|
|
@@ -53325,6 +53462,24 @@ export class CreateMJIntegrationObjectInput {
|
|
|
53325
53462
|
@Field({ nullable: true })
|
|
53326
53463
|
MetadataSource?: string;
|
|
53327
53464
|
|
|
53465
|
+
@Field(() => Boolean, { nullable: true })
|
|
53466
|
+
SupportsCreate?: boolean;
|
|
53467
|
+
|
|
53468
|
+
@Field(() => Boolean, { nullable: true })
|
|
53469
|
+
SupportsUpdate?: boolean;
|
|
53470
|
+
|
|
53471
|
+
@Field(() => Boolean, { nullable: true })
|
|
53472
|
+
SupportsDelete?: boolean;
|
|
53473
|
+
|
|
53474
|
+
@Field({ nullable: true })
|
|
53475
|
+
SyncStrategy: string | null;
|
|
53476
|
+
|
|
53477
|
+
@Field(() => Boolean, { nullable: true })
|
|
53478
|
+
ContentHashApplicable?: boolean;
|
|
53479
|
+
|
|
53480
|
+
@Field({ nullable: true })
|
|
53481
|
+
StableOrderingKey: string | null;
|
|
53482
|
+
|
|
53328
53483
|
@Field(() => RestoreContextInput, { nullable: true })
|
|
53329
53484
|
RestoreContext___?: RestoreContextInput;
|
|
53330
53485
|
}
|
|
@@ -53440,6 +53595,24 @@ export class UpdateMJIntegrationObjectInput {
|
|
|
53440
53595
|
@Field({ nullable: true })
|
|
53441
53596
|
MetadataSource?: string;
|
|
53442
53597
|
|
|
53598
|
+
@Field(() => Boolean, { nullable: true })
|
|
53599
|
+
SupportsCreate?: boolean;
|
|
53600
|
+
|
|
53601
|
+
@Field(() => Boolean, { nullable: true })
|
|
53602
|
+
SupportsUpdate?: boolean;
|
|
53603
|
+
|
|
53604
|
+
@Field(() => Boolean, { nullable: true })
|
|
53605
|
+
SupportsDelete?: boolean;
|
|
53606
|
+
|
|
53607
|
+
@Field({ nullable: true })
|
|
53608
|
+
SyncStrategy?: string | null;
|
|
53609
|
+
|
|
53610
|
+
@Field(() => Boolean, { nullable: true })
|
|
53611
|
+
ContentHashApplicable?: boolean;
|
|
53612
|
+
|
|
53613
|
+
@Field({ nullable: true })
|
|
53614
|
+
StableOrderingKey?: string | null;
|
|
53615
|
+
|
|
53443
53616
|
@Field(() => [KeyValuePairInput], { nullable: true })
|
|
53444
53617
|
OldValues___?: KeyValuePairInput[];
|
|
53445
53618
|
|
|
@@ -53986,6 +54159,9 @@ export class MJIntegration_ {
|
|
|
53986
54159
|
@Field({nullable: true, description: `Icon for the integration. Supports Font Awesome CSS classes, image URLs, or base64 data URIs.`})
|
|
53987
54160
|
Icon?: string;
|
|
53988
54161
|
|
|
54162
|
+
@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.`})
|
|
54163
|
+
Configuration?: string;
|
|
54164
|
+
|
|
53989
54165
|
@Field({nullable: true})
|
|
53990
54166
|
@MaxLength(100)
|
|
53991
54167
|
CredentialType?: string;
|
|
@@ -54039,6 +54215,9 @@ export class CreateMJIntegrationInput {
|
|
|
54039
54215
|
@Field({ nullable: true })
|
|
54040
54216
|
Icon: string | null;
|
|
54041
54217
|
|
|
54218
|
+
@Field({ nullable: true })
|
|
54219
|
+
Configuration: string | null;
|
|
54220
|
+
|
|
54042
54221
|
@Field(() => RestoreContextInput, { nullable: true })
|
|
54043
54222
|
RestoreContext___?: RestoreContextInput;
|
|
54044
54223
|
}
|
|
@@ -54079,6 +54258,9 @@ export class UpdateMJIntegrationInput {
|
|
|
54079
54258
|
@Field({ nullable: true })
|
|
54080
54259
|
Icon?: string | null;
|
|
54081
54260
|
|
|
54261
|
+
@Field({ nullable: true })
|
|
54262
|
+
Configuration?: string | null;
|
|
54263
|
+
|
|
54082
54264
|
@Field(() => [KeyValuePairInput], { nullable: true })
|
|
54083
54265
|
OldValues___?: KeyValuePairInput[];
|
|
54084
54266
|
|
|
@@ -55669,6 +55851,9 @@ export class MJList_ {
|
|
|
55669
55851
|
@Field(() => [MJListShare_])
|
|
55670
55852
|
MJListShares_ListIDArray: MJListShare_[]; // Link to MJListShares
|
|
55671
55853
|
|
|
55854
|
+
@Field(() => [MJRecordProcess_])
|
|
55855
|
+
MJRecordProcesses_ScopeListIDArray: MJRecordProcess_[]; // Link to MJRecordProcesses
|
|
55856
|
+
|
|
55672
55857
|
}
|
|
55673
55858
|
|
|
55674
55859
|
//****************************************************************************
|
|
@@ -55874,6 +56059,16 @@ export class MJListResolver extends ResolverBase {
|
|
|
55874
56059
|
return result;
|
|
55875
56060
|
}
|
|
55876
56061
|
|
|
56062
|
+
@FieldResolver(() => [MJRecordProcess_])
|
|
56063
|
+
async MJRecordProcesses_ScopeListIDArray(@Root() mjlist_: MJList_, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
56064
|
+
this.CheckUserReadPermissions('MJ: Record Processes', userPayload);
|
|
56065
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
56066
|
+
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');
|
|
56067
|
+
const rows = await provider.ExecuteSQL(sSQL, [mjlist_.ID], undefined, this.GetUserFromPayload(userPayload));
|
|
56068
|
+
const result = await this.ArrayMapFieldNamesToCodeNames('MJ: Record Processes', rows, this.GetUserFromPayload(userPayload));
|
|
56069
|
+
return result;
|
|
56070
|
+
}
|
|
56071
|
+
|
|
55877
56072
|
@Mutation(() => MJList_)
|
|
55878
56073
|
async CreateMJList(
|
|
55879
56074
|
@Arg('input', () => CreateMJListInput) input: CreateMJListInput,
|
|
@@ -61498,39 +61693,55 @@ export class MJPermissionDomainResolver extends ResolverBase {
|
|
|
61498
61693
|
}
|
|
61499
61694
|
|
|
61500
61695
|
//****************************************************************************
|
|
61501
|
-
// ENTITY CLASS for MJ:
|
|
61696
|
+
// ENTITY CLASS for MJ: Process Run Details
|
|
61502
61697
|
//****************************************************************************
|
|
61503
|
-
@ObjectType({ description: `
|
|
61504
|
-
export class
|
|
61698
|
+
@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".` })
|
|
61699
|
+
export class MJProcessRunDetail_ {
|
|
61505
61700
|
@Field()
|
|
61506
61701
|
@MaxLength(36)
|
|
61507
61702
|
ID: string;
|
|
61508
61703
|
|
|
61509
|
-
@Field()
|
|
61704
|
+
@Field({description: `Foreign key to the parent Process Run`})
|
|
61510
61705
|
@MaxLength(36)
|
|
61511
|
-
|
|
61706
|
+
ProcessRunID: string;
|
|
61512
61707
|
|
|
61513
|
-
@Field({
|
|
61708
|
+
@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
61709
|
@MaxLength(36)
|
|
61515
|
-
|
|
61710
|
+
EntityID: string;
|
|
61516
61711
|
|
|
61517
|
-
@Field({description: `
|
|
61518
|
-
@MaxLength(
|
|
61519
|
-
|
|
61712
|
+
@Field({description: `Primary key of the processed record, stored as text to remain composite-key safe`})
|
|
61713
|
+
@MaxLength(450)
|
|
61714
|
+
RecordID: string;
|
|
61520
61715
|
|
|
61521
|
-
@Field({
|
|
61522
|
-
|
|
61716
|
+
@Field({description: `Per-record status: Pending, Succeeded, Failed, or Skipped`})
|
|
61717
|
+
@MaxLength(20)
|
|
61718
|
+
Status: string;
|
|
61523
61719
|
|
|
61524
|
-
@Field({nullable: true, description: `
|
|
61525
|
-
|
|
61526
|
-
Color?: string;
|
|
61720
|
+
@Field({nullable: true, description: `When processing of this record started`})
|
|
61721
|
+
StartedAt?: Date;
|
|
61527
61722
|
|
|
61528
|
-
@Field({nullable: true, description: `
|
|
61529
|
-
|
|
61530
|
-
Icon?: string;
|
|
61723
|
+
@Field({nullable: true, description: `When processing of this record completed`})
|
|
61724
|
+
CompletedAt?: Date;
|
|
61531
61725
|
|
|
61532
|
-
@Field(() =>
|
|
61533
|
-
|
|
61726
|
+
@Field(() => Int, {nullable: true, description: `Processing duration for this record in milliseconds`})
|
|
61727
|
+
DurationMs?: number;
|
|
61728
|
+
|
|
61729
|
+
@Field(() => Int, {description: `Number of processing attempts for this record (supports retry)`})
|
|
61730
|
+
AttemptCount: number;
|
|
61731
|
+
|
|
61732
|
+
@Field({nullable: true, description: `Structured output payload (JSON) produced for this record`})
|
|
61733
|
+
ResultPayload?: string;
|
|
61734
|
+
|
|
61735
|
+
@Field({nullable: true, description: `Per-record error message when Status=Failed`})
|
|
61736
|
+
ErrorMessage?: string;
|
|
61737
|
+
|
|
61738
|
+
@Field({nullable: true, description: `Foreign key to the Action Execution Log for deep tracing, when the work was an Action`})
|
|
61739
|
+
@MaxLength(36)
|
|
61740
|
+
ActionExecutionLogID?: string;
|
|
61741
|
+
|
|
61742
|
+
@Field({nullable: true, description: `Foreign key to the AI Agent Run for deep tracing, when the work was an Agent`})
|
|
61743
|
+
@MaxLength(36)
|
|
61744
|
+
AIAgentRunID?: string;
|
|
61534
61745
|
|
|
61535
61746
|
@Field()
|
|
61536
61747
|
_mj__CreatedAt: Date;
|
|
@@ -61540,55 +61751,61 @@ export class MJProject_ {
|
|
|
61540
61751
|
|
|
61541
61752
|
@Field()
|
|
61542
61753
|
@MaxLength(255)
|
|
61543
|
-
|
|
61754
|
+
Entity: string;
|
|
61544
61755
|
|
|
61545
61756
|
@Field({nullable: true})
|
|
61546
|
-
@MaxLength(
|
|
61547
|
-
|
|
61757
|
+
@MaxLength(425)
|
|
61758
|
+
ActionExecutionLog?: string;
|
|
61548
61759
|
|
|
61549
61760
|
@Field({nullable: true})
|
|
61550
|
-
@MaxLength(
|
|
61551
|
-
|
|
61761
|
+
@MaxLength(255)
|
|
61762
|
+
AIAgentRun?: string;
|
|
61552
61763
|
|
|
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
61764
|
}
|
|
61563
61765
|
|
|
61564
61766
|
//****************************************************************************
|
|
61565
|
-
// INPUT TYPE for MJ:
|
|
61767
|
+
// INPUT TYPE for MJ: Process Run Details
|
|
61566
61768
|
//****************************************************************************
|
|
61567
61769
|
@InputType()
|
|
61568
|
-
export class
|
|
61770
|
+
export class CreateMJProcessRunDetailInput {
|
|
61569
61771
|
@Field({ nullable: true })
|
|
61570
61772
|
ID?: string;
|
|
61571
61773
|
|
|
61572
61774
|
@Field({ nullable: true })
|
|
61573
|
-
|
|
61775
|
+
ProcessRunID?: string;
|
|
61574
61776
|
|
|
61575
61777
|
@Field({ nullable: true })
|
|
61576
|
-
|
|
61778
|
+
EntityID?: string;
|
|
61577
61779
|
|
|
61578
61780
|
@Field({ nullable: true })
|
|
61579
|
-
|
|
61781
|
+
RecordID?: string;
|
|
61580
61782
|
|
|
61581
61783
|
@Field({ nullable: true })
|
|
61582
|
-
|
|
61784
|
+
Status?: string;
|
|
61583
61785
|
|
|
61584
61786
|
@Field({ nullable: true })
|
|
61585
|
-
|
|
61787
|
+
StartedAt: Date | null;
|
|
61586
61788
|
|
|
61587
61789
|
@Field({ nullable: true })
|
|
61588
|
-
|
|
61790
|
+
CompletedAt: Date | null;
|
|
61589
61791
|
|
|
61590
|
-
@Field(() =>
|
|
61591
|
-
|
|
61792
|
+
@Field(() => Int, { nullable: true })
|
|
61793
|
+
DurationMs: number | null;
|
|
61794
|
+
|
|
61795
|
+
@Field(() => Int, { nullable: true })
|
|
61796
|
+
AttemptCount?: number;
|
|
61797
|
+
|
|
61798
|
+
@Field({ nullable: true })
|
|
61799
|
+
ResultPayload: string | null;
|
|
61800
|
+
|
|
61801
|
+
@Field({ nullable: true })
|
|
61802
|
+
ErrorMessage: string | null;
|
|
61803
|
+
|
|
61804
|
+
@Field({ nullable: true })
|
|
61805
|
+
ActionExecutionLogID: string | null;
|
|
61806
|
+
|
|
61807
|
+
@Field({ nullable: true })
|
|
61808
|
+
AIAgentRunID: string | null;
|
|
61592
61809
|
|
|
61593
61810
|
@Field(() => RestoreContextInput, { nullable: true })
|
|
61594
61811
|
RestoreContext___?: RestoreContextInput;
|
|
@@ -61596,33 +61813,48 @@ export class CreateMJProjectInput {
|
|
|
61596
61813
|
|
|
61597
61814
|
|
|
61598
61815
|
//****************************************************************************
|
|
61599
|
-
// INPUT TYPE for MJ:
|
|
61816
|
+
// INPUT TYPE for MJ: Process Run Details
|
|
61600
61817
|
//****************************************************************************
|
|
61601
61818
|
@InputType()
|
|
61602
|
-
export class
|
|
61819
|
+
export class UpdateMJProcessRunDetailInput {
|
|
61603
61820
|
@Field()
|
|
61604
61821
|
ID: string;
|
|
61605
61822
|
|
|
61606
61823
|
@Field({ nullable: true })
|
|
61607
|
-
|
|
61824
|
+
ProcessRunID?: string;
|
|
61608
61825
|
|
|
61609
61826
|
@Field({ nullable: true })
|
|
61610
|
-
|
|
61827
|
+
EntityID?: string;
|
|
61611
61828
|
|
|
61612
61829
|
@Field({ nullable: true })
|
|
61613
|
-
|
|
61830
|
+
RecordID?: string;
|
|
61614
61831
|
|
|
61615
61832
|
@Field({ nullable: true })
|
|
61616
|
-
|
|
61833
|
+
Status?: string;
|
|
61617
61834
|
|
|
61618
61835
|
@Field({ nullable: true })
|
|
61619
|
-
|
|
61836
|
+
StartedAt?: Date | null;
|
|
61620
61837
|
|
|
61621
61838
|
@Field({ nullable: true })
|
|
61622
|
-
|
|
61839
|
+
CompletedAt?: Date | null;
|
|
61623
61840
|
|
|
61624
|
-
@Field(() =>
|
|
61625
|
-
|
|
61841
|
+
@Field(() => Int, { nullable: true })
|
|
61842
|
+
DurationMs?: number | null;
|
|
61843
|
+
|
|
61844
|
+
@Field(() => Int, { nullable: true })
|
|
61845
|
+
AttemptCount?: number;
|
|
61846
|
+
|
|
61847
|
+
@Field({ nullable: true })
|
|
61848
|
+
ResultPayload?: string | null;
|
|
61849
|
+
|
|
61850
|
+
@Field({ nullable: true })
|
|
61851
|
+
ErrorMessage?: string | null;
|
|
61852
|
+
|
|
61853
|
+
@Field({ nullable: true })
|
|
61854
|
+
ActionExecutionLogID?: string | null;
|
|
61855
|
+
|
|
61856
|
+
@Field({ nullable: true })
|
|
61857
|
+
AIAgentRunID?: string | null;
|
|
61626
61858
|
|
|
61627
61859
|
@Field(() => [KeyValuePairInput], { nullable: true })
|
|
61628
61860
|
OldValues___?: KeyValuePairInput[];
|
|
@@ -61632,12 +61864,12 @@ export class UpdateMJProjectInput {
|
|
|
61632
61864
|
}
|
|
61633
61865
|
|
|
61634
61866
|
//****************************************************************************
|
|
61635
|
-
// RESOLVER for MJ:
|
|
61867
|
+
// RESOLVER for MJ: Process Run Details
|
|
61636
61868
|
//****************************************************************************
|
|
61637
61869
|
@ObjectType()
|
|
61638
|
-
export class
|
|
61639
|
-
@Field(() => [
|
|
61640
|
-
Results:
|
|
61870
|
+
export class RunMJProcessRunDetailViewResult {
|
|
61871
|
+
@Field(() => [MJProcessRunDetail_])
|
|
61872
|
+
Results: MJProcessRunDetail_[];
|
|
61641
61873
|
|
|
61642
61874
|
@Field(() => String, {nullable: true})
|
|
61643
61875
|
UserViewRunID?: string;
|
|
@@ -61658,135 +61890,148 @@ export class RunMJProjectViewResult {
|
|
|
61658
61890
|
Success: boolean;
|
|
61659
61891
|
}
|
|
61660
61892
|
|
|
61661
|
-
@Resolver(
|
|
61662
|
-
export class
|
|
61663
|
-
@Query(() =>
|
|
61664
|
-
async
|
|
61893
|
+
@Resolver(MJProcessRunDetail_)
|
|
61894
|
+
export class MJProcessRunDetailResolver extends ResolverBase {
|
|
61895
|
+
@Query(() => RunMJProcessRunDetailViewResult)
|
|
61896
|
+
async RunMJProcessRunDetailViewByID(@Arg('input', () => RunViewByIDInput) input: RunViewByIDInput, @Ctx() { providers, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
61665
61897
|
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
61666
61898
|
return super.RunViewByIDGeneric(input, provider, userPayload, pubSub);
|
|
61667
61899
|
}
|
|
61668
61900
|
|
|
61669
|
-
@Query(() =>
|
|
61670
|
-
async
|
|
61901
|
+
@Query(() => RunMJProcessRunDetailViewResult)
|
|
61902
|
+
async RunMJProcessRunDetailViewByName(@Arg('input', () => RunViewByNameInput) input: RunViewByNameInput, @Ctx() { providers, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
61671
61903
|
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
61672
61904
|
return super.RunViewByNameGeneric(input, provider, userPayload, pubSub);
|
|
61673
61905
|
}
|
|
61674
61906
|
|
|
61675
|
-
@Query(() =>
|
|
61676
|
-
async
|
|
61907
|
+
@Query(() => RunMJProcessRunDetailViewResult)
|
|
61908
|
+
async RunMJProcessRunDetailDynamicView(@Arg('input', () => RunDynamicViewInput) input: RunDynamicViewInput, @Ctx() { providers, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
61677
61909
|
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
61678
|
-
input.EntityName = 'MJ:
|
|
61910
|
+
input.EntityName = 'MJ: Process Run Details';
|
|
61679
61911
|
return super.RunDynamicViewGeneric(input, provider, userPayload, pubSub);
|
|
61680
61912
|
}
|
|
61681
|
-
@Query(() =>
|
|
61682
|
-
async
|
|
61683
|
-
this.CheckUserReadPermissions('MJ:
|
|
61913
|
+
@Query(() => MJProcessRunDetail_, { nullable: true })
|
|
61914
|
+
async MJProcessRunDetail(@Arg('ID', () => String) ID: string, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine): Promise<MJProcessRunDetail_ | null> {
|
|
61915
|
+
this.CheckUserReadPermissions('MJ: Process Run Details', userPayload);
|
|
61684
61916
|
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
61685
|
-
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, '
|
|
61917
|
+
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
61918
|
const rows = await provider.ExecuteSQL(sSQL, [ID], undefined, this.GetUserFromPayload(userPayload));
|
|
61687
|
-
const result = await this.MapFieldNamesToCodeNames('MJ:
|
|
61919
|
+
const result = await this.MapFieldNamesToCodeNames('MJ: Process Run Details', rows && rows.length > 0 ? rows[0] : null, this.GetUserFromPayload(userPayload));
|
|
61688
61920
|
return result;
|
|
61689
61921
|
}
|
|
61690
61922
|
|
|
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,
|
|
61923
|
+
@Mutation(() => MJProcessRunDetail_)
|
|
61924
|
+
async CreateMJProcessRunDetail(
|
|
61925
|
+
@Arg('input', () => CreateMJProcessRunDetailInput) input: CreateMJProcessRunDetailInput,
|
|
61724
61926
|
@Ctx() { providers, userPayload }: AppContext,
|
|
61725
61927
|
@PubSub() pubSub: PubSubEngine
|
|
61726
61928
|
) {
|
|
61727
61929
|
const provider = GetReadWriteProvider(providers);
|
|
61728
|
-
return this.CreateRecord('MJ:
|
|
61930
|
+
return this.CreateRecord('MJ: Process Run Details', input, provider, userPayload, pubSub)
|
|
61729
61931
|
}
|
|
61730
61932
|
|
|
61731
|
-
@Mutation(() =>
|
|
61732
|
-
async
|
|
61733
|
-
@Arg('input', () =>
|
|
61933
|
+
@Mutation(() => MJProcessRunDetail_)
|
|
61934
|
+
async UpdateMJProcessRunDetail(
|
|
61935
|
+
@Arg('input', () => UpdateMJProcessRunDetailInput) input: UpdateMJProcessRunDetailInput,
|
|
61734
61936
|
@Ctx() { providers, userPayload }: AppContext,
|
|
61735
61937
|
@PubSub() pubSub: PubSubEngine
|
|
61736
61938
|
) {
|
|
61737
61939
|
const provider = GetReadWriteProvider(providers);
|
|
61738
|
-
return this.UpdateRecord('MJ:
|
|
61940
|
+
return this.UpdateRecord('MJ: Process Run Details', input, provider, userPayload, pubSub);
|
|
61739
61941
|
}
|
|
61740
61942
|
|
|
61741
|
-
@Mutation(() =>
|
|
61742
|
-
async
|
|
61943
|
+
@Mutation(() => MJProcessRunDetail_)
|
|
61944
|
+
async DeleteMJProcessRunDetail(@Arg('ID', () => String) ID: string, @Arg('options___', () => DeleteOptionsInput) options: DeleteOptionsInput, @Ctx() { providers, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
61743
61945
|
const provider = GetReadWriteProvider(providers);
|
|
61744
61946
|
const key = new CompositeKey([{FieldName: 'ID', Value: ID}]);
|
|
61745
|
-
return this.DeleteRecord('MJ:
|
|
61947
|
+
return this.DeleteRecord('MJ: Process Run Details', key, options, provider, userPayload, pubSub);
|
|
61746
61948
|
}
|
|
61747
61949
|
|
|
61748
61950
|
}
|
|
61749
61951
|
|
|
61750
61952
|
//****************************************************************************
|
|
61751
|
-
// ENTITY CLASS for MJ:
|
|
61953
|
+
// ENTITY CLASS for MJ: Process Runs
|
|
61752
61954
|
//****************************************************************************
|
|
61753
|
-
@ObjectType({ description: `
|
|
61754
|
-
export class
|
|
61955
|
+
@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).` })
|
|
61956
|
+
export class MJProcessRun_ {
|
|
61755
61957
|
@Field()
|
|
61756
61958
|
@MaxLength(36)
|
|
61757
61959
|
ID: string;
|
|
61758
61960
|
|
|
61759
|
-
@Field({description: `
|
|
61760
|
-
@MaxLength(50)
|
|
61761
|
-
ResourceType: string;
|
|
61762
|
-
|
|
61763
|
-
@Field()
|
|
61961
|
+
@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
61962
|
@MaxLength(36)
|
|
61765
|
-
|
|
61963
|
+
RecordProcessID?: string;
|
|
61766
61964
|
|
|
61767
|
-
@Field({description: `
|
|
61768
|
-
@MaxLength(
|
|
61769
|
-
|
|
61965
|
+
@Field({nullable: true, description: `Foreign key to the entity processed by this run, when the run is entity-scoped`})
|
|
61966
|
+
@MaxLength(36)
|
|
61967
|
+
EntityID?: string;
|
|
61770
61968
|
|
|
61771
|
-
@Field({
|
|
61772
|
-
@MaxLength(
|
|
61773
|
-
|
|
61969
|
+
@Field({description: `What triggered this run: OnChange, Schedule, OnDemand, or Manual`})
|
|
61970
|
+
@MaxLength(20)
|
|
61971
|
+
TriggeredBy: string;
|
|
61774
61972
|
|
|
61775
|
-
@Field({
|
|
61776
|
-
|
|
61973
|
+
@Field({description: `The kind of record-set source resolved for this run: View, List, Filter, Array, Keyset, or SingleRecord`})
|
|
61974
|
+
@MaxLength(20)
|
|
61975
|
+
SourceType: string;
|
|
61777
61976
|
|
|
61778
|
-
@Field(
|
|
61779
|
-
|
|
61977
|
+
@Field({nullable: true, description: `Polymorphic source identifier (e.g., ViewID or ListID) when applicable; no FK because it spans entities`})
|
|
61978
|
+
@MaxLength(36)
|
|
61979
|
+
SourceID?: string;
|
|
61780
61980
|
|
|
61781
|
-
@Field(
|
|
61782
|
-
|
|
61981
|
+
@Field({nullable: true, description: `Resolved filter snapshot used to materialize the record set for this run`})
|
|
61982
|
+
SourceFilter?: string;
|
|
61783
61983
|
|
|
61784
|
-
@Field()
|
|
61984
|
+
@Field({nullable: true, description: `Foreign key to the Scheduled Job Run that launched this run, when scheduler-launched`})
|
|
61785
61985
|
@MaxLength(36)
|
|
61786
|
-
|
|
61986
|
+
ScheduledJobRunID?: string;
|
|
61787
61987
|
|
|
61788
|
-
@Field(
|
|
61789
|
-
|
|
61988
|
+
@Field({description: `Run status: Pending, Running, Paused, Completed, Failed, or Cancelled`})
|
|
61989
|
+
@MaxLength(20)
|
|
61990
|
+
Status: string;
|
|
61991
|
+
|
|
61992
|
+
@Field({nullable: true, description: `When the run started`})
|
|
61993
|
+
StartTime?: Date;
|
|
61994
|
+
|
|
61995
|
+
@Field({nullable: true, description: `When the run ended`})
|
|
61996
|
+
EndTime?: Date;
|
|
61997
|
+
|
|
61998
|
+
@Field(() => Int, {nullable: true, description: `Estimated or known total number of records to process`})
|
|
61999
|
+
TotalItemCount?: number;
|
|
62000
|
+
|
|
62001
|
+
@Field(() => Int, {description: `Count of records processed so far`})
|
|
62002
|
+
ProcessedItems: number;
|
|
62003
|
+
|
|
62004
|
+
@Field(() => Int, {description: `Count of records processed successfully`})
|
|
62005
|
+
SuccessCount: number;
|
|
62006
|
+
|
|
62007
|
+
@Field(() => Int, {description: `Count of records that failed processing`})
|
|
62008
|
+
ErrorCount: number;
|
|
62009
|
+
|
|
62010
|
+
@Field(() => Int, {description: `Count of records skipped (e.g., unchanged per watermark)`})
|
|
62011
|
+
SkippedCount: number;
|
|
62012
|
+
|
|
62013
|
+
@Field(() => Int, {nullable: true, description: `Offset-based resume cursor (StartRow) for sources that paginate by offset`})
|
|
62014
|
+
LastProcessedOffset?: number;
|
|
62015
|
+
|
|
62016
|
+
@Field({nullable: true, description: `Keyset-based resume cursor (AfterKey) for sources that paginate by seek`})
|
|
62017
|
+
@MaxLength(450)
|
|
62018
|
+
LastProcessedKey?: string;
|
|
62019
|
+
|
|
62020
|
+
@Field(() => Int, {nullable: true, description: `Effective batch size for this run`})
|
|
62021
|
+
BatchSize?: number;
|
|
62022
|
+
|
|
62023
|
+
@Field(() => Boolean, {description: `Pause/cancel handshake flag honored by the processor between batches`})
|
|
62024
|
+
CancellationRequested: boolean;
|
|
62025
|
+
|
|
62026
|
+
@Field({nullable: true, description: `JSON snapshot of the effective configuration for this run`})
|
|
62027
|
+
Configuration?: string;
|
|
62028
|
+
|
|
62029
|
+
@Field({nullable: true, description: `Run-level error message when Status=Failed`})
|
|
62030
|
+
ErrorMessage?: string;
|
|
62031
|
+
|
|
62032
|
+
@Field({nullable: true, description: `Foreign key to the user who started the run`})
|
|
62033
|
+
@MaxLength(36)
|
|
62034
|
+
StartedByUserID?: string;
|
|
61790
62035
|
|
|
61791
62036
|
@Field()
|
|
61792
62037
|
_mj__CreatedAt: Date;
|
|
@@ -61794,46 +62039,100 @@ export class MJPublicLink_ {
|
|
|
61794
62039
|
@Field()
|
|
61795
62040
|
_mj__UpdatedAt: Date;
|
|
61796
62041
|
|
|
61797
|
-
@Field()
|
|
62042
|
+
@Field({nullable: true})
|
|
62043
|
+
@MaxLength(255)
|
|
62044
|
+
RecordProcess?: string;
|
|
62045
|
+
|
|
62046
|
+
@Field({nullable: true})
|
|
62047
|
+
@MaxLength(255)
|
|
62048
|
+
Entity?: string;
|
|
62049
|
+
|
|
62050
|
+
@Field({nullable: true})
|
|
62051
|
+
@MaxLength(200)
|
|
62052
|
+
ScheduledJobRun?: string;
|
|
62053
|
+
|
|
62054
|
+
@Field({nullable: true})
|
|
61798
62055
|
@MaxLength(100)
|
|
61799
|
-
|
|
62056
|
+
StartedByUser?: string;
|
|
61800
62057
|
|
|
62058
|
+
@Field(() => [MJProcessRunDetail_])
|
|
62059
|
+
MJProcessRunDetails_ProcessRunIDArray: MJProcessRunDetail_[]; // Link to MJProcessRunDetails
|
|
62060
|
+
|
|
61801
62061
|
}
|
|
61802
62062
|
|
|
61803
62063
|
//****************************************************************************
|
|
61804
|
-
// INPUT TYPE for MJ:
|
|
62064
|
+
// INPUT TYPE for MJ: Process Runs
|
|
61805
62065
|
//****************************************************************************
|
|
61806
62066
|
@InputType()
|
|
61807
|
-
export class
|
|
62067
|
+
export class CreateMJProcessRunInput {
|
|
61808
62068
|
@Field({ nullable: true })
|
|
61809
62069
|
ID?: string;
|
|
61810
62070
|
|
|
61811
62071
|
@Field({ nullable: true })
|
|
61812
|
-
|
|
62072
|
+
RecordProcessID: string | null;
|
|
61813
62073
|
|
|
61814
62074
|
@Field({ nullable: true })
|
|
61815
|
-
|
|
62075
|
+
EntityID: string | null;
|
|
61816
62076
|
|
|
61817
62077
|
@Field({ nullable: true })
|
|
61818
|
-
|
|
62078
|
+
TriggeredBy?: string;
|
|
61819
62079
|
|
|
61820
62080
|
@Field({ nullable: true })
|
|
61821
|
-
|
|
62081
|
+
SourceType?: string;
|
|
61822
62082
|
|
|
61823
62083
|
@Field({ nullable: true })
|
|
61824
|
-
|
|
62084
|
+
SourceID: string | null;
|
|
62085
|
+
|
|
62086
|
+
@Field({ nullable: true })
|
|
62087
|
+
SourceFilter: string | null;
|
|
62088
|
+
|
|
62089
|
+
@Field({ nullable: true })
|
|
62090
|
+
ScheduledJobRunID: string | null;
|
|
62091
|
+
|
|
62092
|
+
@Field({ nullable: true })
|
|
62093
|
+
Status?: string;
|
|
62094
|
+
|
|
62095
|
+
@Field({ nullable: true })
|
|
62096
|
+
StartTime: Date | null;
|
|
62097
|
+
|
|
62098
|
+
@Field({ nullable: true })
|
|
62099
|
+
EndTime: Date | null;
|
|
61825
62100
|
|
|
61826
62101
|
@Field(() => Int, { nullable: true })
|
|
61827
|
-
|
|
62102
|
+
TotalItemCount: number | null;
|
|
61828
62103
|
|
|
61829
62104
|
@Field(() => Int, { nullable: true })
|
|
61830
|
-
|
|
62105
|
+
ProcessedItems?: number;
|
|
62106
|
+
|
|
62107
|
+
@Field(() => Int, { nullable: true })
|
|
62108
|
+
SuccessCount?: number;
|
|
62109
|
+
|
|
62110
|
+
@Field(() => Int, { nullable: true })
|
|
62111
|
+
ErrorCount?: number;
|
|
62112
|
+
|
|
62113
|
+
@Field(() => Int, { nullable: true })
|
|
62114
|
+
SkippedCount?: number;
|
|
62115
|
+
|
|
62116
|
+
@Field(() => Int, { nullable: true })
|
|
62117
|
+
LastProcessedOffset: number | null;
|
|
61831
62118
|
|
|
61832
62119
|
@Field({ nullable: true })
|
|
61833
|
-
|
|
62120
|
+
LastProcessedKey: string | null;
|
|
62121
|
+
|
|
62122
|
+
@Field(() => Int, { nullable: true })
|
|
62123
|
+
BatchSize: number | null;
|
|
61834
62124
|
|
|
61835
62125
|
@Field(() => Boolean, { nullable: true })
|
|
61836
|
-
|
|
62126
|
+
CancellationRequested?: boolean;
|
|
62127
|
+
|
|
62128
|
+
@Field({ nullable: true })
|
|
62129
|
+
Configuration: string | null;
|
|
62130
|
+
|
|
62131
|
+
@Field({ nullable: true })
|
|
62132
|
+
ErrorMessage: string | null;
|
|
62133
|
+
|
|
62134
|
+
@Field({ nullable: true })
|
|
62135
|
+
StartedByUserID: string | null;
|
|
61837
62136
|
|
|
61838
62137
|
@Field(() => RestoreContextInput, { nullable: true })
|
|
61839
62138
|
RestoreContext___?: RestoreContextInput;
|
|
@@ -61841,39 +62140,78 @@ export class CreateMJPublicLinkInput {
|
|
|
61841
62140
|
|
|
61842
62141
|
|
|
61843
62142
|
//****************************************************************************
|
|
61844
|
-
// INPUT TYPE for MJ:
|
|
62143
|
+
// INPUT TYPE for MJ: Process Runs
|
|
61845
62144
|
//****************************************************************************
|
|
61846
62145
|
@InputType()
|
|
61847
|
-
export class
|
|
62146
|
+
export class UpdateMJProcessRunInput {
|
|
61848
62147
|
@Field()
|
|
61849
62148
|
ID: string;
|
|
61850
62149
|
|
|
61851
62150
|
@Field({ nullable: true })
|
|
61852
|
-
|
|
62151
|
+
RecordProcessID?: string | null;
|
|
61853
62152
|
|
|
61854
62153
|
@Field({ nullable: true })
|
|
61855
|
-
|
|
62154
|
+
EntityID?: string | null;
|
|
61856
62155
|
|
|
61857
62156
|
@Field({ nullable: true })
|
|
61858
|
-
|
|
62157
|
+
TriggeredBy?: string;
|
|
61859
62158
|
|
|
61860
62159
|
@Field({ nullable: true })
|
|
61861
|
-
|
|
62160
|
+
SourceType?: string;
|
|
61862
62161
|
|
|
61863
62162
|
@Field({ nullable: true })
|
|
61864
|
-
|
|
62163
|
+
SourceID?: string | null;
|
|
62164
|
+
|
|
62165
|
+
@Field({ nullable: true })
|
|
62166
|
+
SourceFilter?: string | null;
|
|
62167
|
+
|
|
62168
|
+
@Field({ nullable: true })
|
|
62169
|
+
ScheduledJobRunID?: string | null;
|
|
62170
|
+
|
|
62171
|
+
@Field({ nullable: true })
|
|
62172
|
+
Status?: string;
|
|
62173
|
+
|
|
62174
|
+
@Field({ nullable: true })
|
|
62175
|
+
StartTime?: Date | null;
|
|
62176
|
+
|
|
62177
|
+
@Field({ nullable: true })
|
|
62178
|
+
EndTime?: Date | null;
|
|
61865
62179
|
|
|
61866
62180
|
@Field(() => Int, { nullable: true })
|
|
61867
|
-
|
|
62181
|
+
TotalItemCount?: number | null;
|
|
61868
62182
|
|
|
61869
62183
|
@Field(() => Int, { nullable: true })
|
|
61870
|
-
|
|
62184
|
+
ProcessedItems?: number;
|
|
62185
|
+
|
|
62186
|
+
@Field(() => Int, { nullable: true })
|
|
62187
|
+
SuccessCount?: number;
|
|
62188
|
+
|
|
62189
|
+
@Field(() => Int, { nullable: true })
|
|
62190
|
+
ErrorCount?: number;
|
|
62191
|
+
|
|
62192
|
+
@Field(() => Int, { nullable: true })
|
|
62193
|
+
SkippedCount?: number;
|
|
62194
|
+
|
|
62195
|
+
@Field(() => Int, { nullable: true })
|
|
62196
|
+
LastProcessedOffset?: number | null;
|
|
61871
62197
|
|
|
61872
62198
|
@Field({ nullable: true })
|
|
61873
|
-
|
|
62199
|
+
LastProcessedKey?: string | null;
|
|
62200
|
+
|
|
62201
|
+
@Field(() => Int, { nullable: true })
|
|
62202
|
+
BatchSize?: number | null;
|
|
61874
62203
|
|
|
61875
62204
|
@Field(() => Boolean, { nullable: true })
|
|
61876
|
-
|
|
62205
|
+
CancellationRequested?: boolean;
|
|
62206
|
+
|
|
62207
|
+
@Field({ nullable: true })
|
|
62208
|
+
Configuration?: string | null;
|
|
62209
|
+
|
|
62210
|
+
@Field({ nullable: true })
|
|
62211
|
+
ErrorMessage?: string | null;
|
|
62212
|
+
|
|
62213
|
+
@Field({ nullable: true })
|
|
62214
|
+
StartedByUserID?: string | null;
|
|
61877
62215
|
|
|
61878
62216
|
@Field(() => [KeyValuePairInput], { nullable: true })
|
|
61879
62217
|
OldValues___?: KeyValuePairInput[];
|
|
@@ -61883,12 +62221,12 @@ export class UpdateMJPublicLinkInput {
|
|
|
61883
62221
|
}
|
|
61884
62222
|
|
|
61885
62223
|
//****************************************************************************
|
|
61886
|
-
// RESOLVER for MJ:
|
|
62224
|
+
// RESOLVER for MJ: Process Runs
|
|
61887
62225
|
//****************************************************************************
|
|
61888
62226
|
@ObjectType()
|
|
61889
|
-
export class
|
|
61890
|
-
@Field(() => [
|
|
61891
|
-
Results:
|
|
62227
|
+
export class RunMJProcessRunViewResult {
|
|
62228
|
+
@Field(() => [MJProcessRun_])
|
|
62229
|
+
Results: MJProcessRun_[];
|
|
61892
62230
|
|
|
61893
62231
|
@Field(() => String, {nullable: true})
|
|
61894
62232
|
UserViewRunID?: string;
|
|
@@ -61909,93 +62247,574 @@ export class RunMJPublicLinkViewResult {
|
|
|
61909
62247
|
Success: boolean;
|
|
61910
62248
|
}
|
|
61911
62249
|
|
|
61912
|
-
@Resolver(
|
|
61913
|
-
export class
|
|
61914
|
-
@Query(() =>
|
|
61915
|
-
async
|
|
62250
|
+
@Resolver(MJProcessRun_)
|
|
62251
|
+
export class MJProcessRunResolver extends ResolverBase {
|
|
62252
|
+
@Query(() => RunMJProcessRunViewResult)
|
|
62253
|
+
async RunMJProcessRunViewByID(@Arg('input', () => RunViewByIDInput) input: RunViewByIDInput, @Ctx() { providers, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
61916
62254
|
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
61917
62255
|
return super.RunViewByIDGeneric(input, provider, userPayload, pubSub);
|
|
61918
62256
|
}
|
|
61919
62257
|
|
|
61920
|
-
@Query(() =>
|
|
61921
|
-
async
|
|
62258
|
+
@Query(() => RunMJProcessRunViewResult)
|
|
62259
|
+
async RunMJProcessRunViewByName(@Arg('input', () => RunViewByNameInput) input: RunViewByNameInput, @Ctx() { providers, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
61922
62260
|
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
61923
62261
|
return super.RunViewByNameGeneric(input, provider, userPayload, pubSub);
|
|
61924
62262
|
}
|
|
61925
62263
|
|
|
61926
|
-
@Query(() =>
|
|
61927
|
-
async
|
|
62264
|
+
@Query(() => RunMJProcessRunViewResult)
|
|
62265
|
+
async RunMJProcessRunDynamicView(@Arg('input', () => RunDynamicViewInput) input: RunDynamicViewInput, @Ctx() { providers, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
61928
62266
|
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
61929
|
-
input.EntityName = 'MJ:
|
|
62267
|
+
input.EntityName = 'MJ: Process Runs';
|
|
61930
62268
|
return super.RunDynamicViewGeneric(input, provider, userPayload, pubSub);
|
|
61931
62269
|
}
|
|
61932
|
-
@Query(() =>
|
|
61933
|
-
async
|
|
61934
|
-
this.CheckUserReadPermissions('MJ:
|
|
62270
|
+
@Query(() => MJProcessRun_, { nullable: true })
|
|
62271
|
+
async MJProcessRun(@Arg('ID', () => String) ID: string, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine): Promise<MJProcessRun_ | null> {
|
|
62272
|
+
this.CheckUserReadPermissions('MJ: Process Runs', userPayload);
|
|
61935
62273
|
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
61936
|
-
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, '
|
|
62274
|
+
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
62275
|
const rows = await provider.ExecuteSQL(sSQL, [ID], undefined, this.GetUserFromPayload(userPayload));
|
|
61938
|
-
const result = await this.MapFieldNamesToCodeNames('MJ:
|
|
62276
|
+
const result = await this.MapFieldNamesToCodeNames('MJ: Process Runs', rows && rows.length > 0 ? rows[0] : null, this.GetUserFromPayload(userPayload));
|
|
61939
62277
|
return result;
|
|
61940
62278
|
}
|
|
61941
62279
|
|
|
61942
|
-
@
|
|
61943
|
-
async
|
|
61944
|
-
|
|
62280
|
+
@FieldResolver(() => [MJProcessRunDetail_])
|
|
62281
|
+
async MJProcessRunDetails_ProcessRunIDArray(@Root() mjprocessrun_: MJProcessRun_, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
62282
|
+
this.CheckUserReadPermissions('MJ: Process Run Details', userPayload);
|
|
62283
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
62284
|
+
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');
|
|
62285
|
+
const rows = await provider.ExecuteSQL(sSQL, [mjprocessrun_.ID], undefined, this.GetUserFromPayload(userPayload));
|
|
62286
|
+
const result = await this.ArrayMapFieldNamesToCodeNames('MJ: Process Run Details', rows, this.GetUserFromPayload(userPayload));
|
|
62287
|
+
return result;
|
|
62288
|
+
}
|
|
62289
|
+
|
|
62290
|
+
@Mutation(() => MJProcessRun_)
|
|
62291
|
+
async CreateMJProcessRun(
|
|
62292
|
+
@Arg('input', () => CreateMJProcessRunInput) input: CreateMJProcessRunInput,
|
|
61945
62293
|
@Ctx() { providers, userPayload }: AppContext,
|
|
61946
62294
|
@PubSub() pubSub: PubSubEngine
|
|
61947
62295
|
) {
|
|
61948
62296
|
const provider = GetReadWriteProvider(providers);
|
|
61949
|
-
return this.CreateRecord('MJ:
|
|
62297
|
+
return this.CreateRecord('MJ: Process Runs', input, provider, userPayload, pubSub)
|
|
61950
62298
|
}
|
|
61951
62299
|
|
|
61952
|
-
@Mutation(() =>
|
|
61953
|
-
async
|
|
61954
|
-
@Arg('input', () =>
|
|
62300
|
+
@Mutation(() => MJProcessRun_)
|
|
62301
|
+
async UpdateMJProcessRun(
|
|
62302
|
+
@Arg('input', () => UpdateMJProcessRunInput) input: UpdateMJProcessRunInput,
|
|
61955
62303
|
@Ctx() { providers, userPayload }: AppContext,
|
|
61956
62304
|
@PubSub() pubSub: PubSubEngine
|
|
61957
62305
|
) {
|
|
61958
62306
|
const provider = GetReadWriteProvider(providers);
|
|
61959
|
-
return this.UpdateRecord('MJ:
|
|
62307
|
+
return this.UpdateRecord('MJ: Process Runs', input, provider, userPayload, pubSub);
|
|
61960
62308
|
}
|
|
61961
62309
|
|
|
61962
|
-
@Mutation(() =>
|
|
61963
|
-
async
|
|
62310
|
+
@Mutation(() => MJProcessRun_)
|
|
62311
|
+
async DeleteMJProcessRun(@Arg('ID', () => String) ID: string, @Arg('options___', () => DeleteOptionsInput) options: DeleteOptionsInput, @Ctx() { providers, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
61964
62312
|
const provider = GetReadWriteProvider(providers);
|
|
61965
62313
|
const key = new CompositeKey([{FieldName: 'ID', Value: ID}]);
|
|
61966
|
-
return this.DeleteRecord('MJ:
|
|
62314
|
+
return this.DeleteRecord('MJ: Process Runs', key, options, provider, userPayload, pubSub);
|
|
61967
62315
|
}
|
|
61968
62316
|
|
|
61969
62317
|
}
|
|
61970
62318
|
|
|
61971
62319
|
//****************************************************************************
|
|
61972
|
-
// ENTITY CLASS for MJ:
|
|
62320
|
+
// ENTITY CLASS for MJ: Projects
|
|
61973
62321
|
//****************************************************************************
|
|
61974
|
-
@ObjectType({ description: `
|
|
61975
|
-
export class
|
|
62322
|
+
@ObjectType({ description: `Container for grouping related conversations around a common topic, client, or initiative. Supports nesting for sub-projects.` })
|
|
62323
|
+
export class MJProject_ {
|
|
61976
62324
|
@Field()
|
|
61977
62325
|
@MaxLength(36)
|
|
61978
62326
|
ID: string;
|
|
61979
62327
|
|
|
61980
62328
|
@Field()
|
|
61981
|
-
@MaxLength(
|
|
61982
|
-
|
|
62329
|
+
@MaxLength(36)
|
|
62330
|
+
EnvironmentID: string;
|
|
61983
62331
|
|
|
61984
62332
|
@Field({nullable: true})
|
|
61985
62333
|
@MaxLength(36)
|
|
61986
|
-
|
|
62334
|
+
ParentID?: string;
|
|
61987
62335
|
|
|
61988
|
-
@Field({
|
|
61989
|
-
|
|
62336
|
+
@Field({description: `Display name for the project`})
|
|
62337
|
+
@MaxLength(255)
|
|
62338
|
+
Name: string;
|
|
61990
62339
|
|
|
61991
|
-
@Field({nullable: true})
|
|
62340
|
+
@Field({nullable: true, description: `Detailed description of the project goals and scope`})
|
|
61992
62341
|
Description?: string;
|
|
61993
62342
|
|
|
61994
|
-
@Field({nullable: true, description: `
|
|
61995
|
-
|
|
62343
|
+
@Field({nullable: true, description: `Hex color code for project badges in UI (#RRGGBB format)`})
|
|
62344
|
+
@MaxLength(7)
|
|
62345
|
+
Color?: string;
|
|
61996
62346
|
|
|
61997
|
-
@Field({nullable: true, description: `
|
|
61998
|
-
|
|
62347
|
+
@Field({nullable: true, description: `Font Awesome icon class for UI display`})
|
|
62348
|
+
@MaxLength(50)
|
|
62349
|
+
Icon?: string;
|
|
62350
|
+
|
|
62351
|
+
@Field(() => Boolean, {description: `Indicates if this project is archived and should be hidden from active lists`})
|
|
62352
|
+
IsArchived: boolean;
|
|
62353
|
+
|
|
62354
|
+
@Field()
|
|
62355
|
+
_mj__CreatedAt: Date;
|
|
62356
|
+
|
|
62357
|
+
@Field()
|
|
62358
|
+
_mj__UpdatedAt: Date;
|
|
62359
|
+
|
|
62360
|
+
@Field()
|
|
62361
|
+
@MaxLength(255)
|
|
62362
|
+
Environment: string;
|
|
62363
|
+
|
|
62364
|
+
@Field({nullable: true})
|
|
62365
|
+
@MaxLength(255)
|
|
62366
|
+
Parent?: string;
|
|
62367
|
+
|
|
62368
|
+
@Field({nullable: true})
|
|
62369
|
+
@MaxLength(36)
|
|
62370
|
+
RootParentID?: string;
|
|
62371
|
+
|
|
62372
|
+
@Field(() => [MJProject_])
|
|
62373
|
+
MJProjects_ParentIDArray: MJProject_[]; // Link to MJProjects
|
|
62374
|
+
|
|
62375
|
+
@Field(() => [MJConversation_])
|
|
62376
|
+
MJConversations_ProjectIDArray: MJConversation_[]; // Link to MJConversations
|
|
62377
|
+
|
|
62378
|
+
@Field(() => [MJTask_])
|
|
62379
|
+
MJTasks_ProjectIDArray: MJTask_[]; // Link to MJTasks
|
|
62380
|
+
|
|
62381
|
+
}
|
|
62382
|
+
|
|
62383
|
+
//****************************************************************************
|
|
62384
|
+
// INPUT TYPE for MJ: Projects
|
|
62385
|
+
//****************************************************************************
|
|
62386
|
+
@InputType()
|
|
62387
|
+
export class CreateMJProjectInput {
|
|
62388
|
+
@Field({ nullable: true })
|
|
62389
|
+
ID?: string;
|
|
62390
|
+
|
|
62391
|
+
@Field({ nullable: true })
|
|
62392
|
+
EnvironmentID?: string;
|
|
62393
|
+
|
|
62394
|
+
@Field({ nullable: true })
|
|
62395
|
+
ParentID: string | null;
|
|
62396
|
+
|
|
62397
|
+
@Field({ nullable: true })
|
|
62398
|
+
Name?: string;
|
|
62399
|
+
|
|
62400
|
+
@Field({ nullable: true })
|
|
62401
|
+
Description: string | null;
|
|
62402
|
+
|
|
62403
|
+
@Field({ nullable: true })
|
|
62404
|
+
Color: string | null;
|
|
62405
|
+
|
|
62406
|
+
@Field({ nullable: true })
|
|
62407
|
+
Icon: string | null;
|
|
62408
|
+
|
|
62409
|
+
@Field(() => Boolean, { nullable: true })
|
|
62410
|
+
IsArchived?: boolean;
|
|
62411
|
+
|
|
62412
|
+
@Field(() => RestoreContextInput, { nullable: true })
|
|
62413
|
+
RestoreContext___?: RestoreContextInput;
|
|
62414
|
+
}
|
|
62415
|
+
|
|
62416
|
+
|
|
62417
|
+
//****************************************************************************
|
|
62418
|
+
// INPUT TYPE for MJ: Projects
|
|
62419
|
+
//****************************************************************************
|
|
62420
|
+
@InputType()
|
|
62421
|
+
export class UpdateMJProjectInput {
|
|
62422
|
+
@Field()
|
|
62423
|
+
ID: string;
|
|
62424
|
+
|
|
62425
|
+
@Field({ nullable: true })
|
|
62426
|
+
EnvironmentID?: string;
|
|
62427
|
+
|
|
62428
|
+
@Field({ nullable: true })
|
|
62429
|
+
ParentID?: string | null;
|
|
62430
|
+
|
|
62431
|
+
@Field({ nullable: true })
|
|
62432
|
+
Name?: string;
|
|
62433
|
+
|
|
62434
|
+
@Field({ nullable: true })
|
|
62435
|
+
Description?: string | null;
|
|
62436
|
+
|
|
62437
|
+
@Field({ nullable: true })
|
|
62438
|
+
Color?: string | null;
|
|
62439
|
+
|
|
62440
|
+
@Field({ nullable: true })
|
|
62441
|
+
Icon?: string | null;
|
|
62442
|
+
|
|
62443
|
+
@Field(() => Boolean, { nullable: true })
|
|
62444
|
+
IsArchived?: boolean;
|
|
62445
|
+
|
|
62446
|
+
@Field(() => [KeyValuePairInput], { nullable: true })
|
|
62447
|
+
OldValues___?: KeyValuePairInput[];
|
|
62448
|
+
|
|
62449
|
+
@Field(() => RestoreContextInput, { nullable: true })
|
|
62450
|
+
RestoreContext___?: RestoreContextInput;
|
|
62451
|
+
}
|
|
62452
|
+
|
|
62453
|
+
//****************************************************************************
|
|
62454
|
+
// RESOLVER for MJ: Projects
|
|
62455
|
+
//****************************************************************************
|
|
62456
|
+
@ObjectType()
|
|
62457
|
+
export class RunMJProjectViewResult {
|
|
62458
|
+
@Field(() => [MJProject_])
|
|
62459
|
+
Results: MJProject_[];
|
|
62460
|
+
|
|
62461
|
+
@Field(() => String, {nullable: true})
|
|
62462
|
+
UserViewRunID?: string;
|
|
62463
|
+
|
|
62464
|
+
@Field(() => Int, {nullable: true})
|
|
62465
|
+
RowCount: number;
|
|
62466
|
+
|
|
62467
|
+
@Field(() => Int, {nullable: true})
|
|
62468
|
+
TotalRowCount: number;
|
|
62469
|
+
|
|
62470
|
+
@Field(() => Int, {nullable: true})
|
|
62471
|
+
ExecutionTime: number;
|
|
62472
|
+
|
|
62473
|
+
@Field({nullable: true})
|
|
62474
|
+
ErrorMessage?: string;
|
|
62475
|
+
|
|
62476
|
+
@Field(() => Boolean, {nullable: false})
|
|
62477
|
+
Success: boolean;
|
|
62478
|
+
}
|
|
62479
|
+
|
|
62480
|
+
@Resolver(MJProject_)
|
|
62481
|
+
export class MJProjectResolver extends ResolverBase {
|
|
62482
|
+
@Query(() => RunMJProjectViewResult)
|
|
62483
|
+
async RunMJProjectViewByID(@Arg('input', () => RunViewByIDInput) input: RunViewByIDInput, @Ctx() { providers, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
62484
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
62485
|
+
return super.RunViewByIDGeneric(input, provider, userPayload, pubSub);
|
|
62486
|
+
}
|
|
62487
|
+
|
|
62488
|
+
@Query(() => RunMJProjectViewResult)
|
|
62489
|
+
async RunMJProjectViewByName(@Arg('input', () => RunViewByNameInput) input: RunViewByNameInput, @Ctx() { providers, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
62490
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
62491
|
+
return super.RunViewByNameGeneric(input, provider, userPayload, pubSub);
|
|
62492
|
+
}
|
|
62493
|
+
|
|
62494
|
+
@Query(() => RunMJProjectViewResult)
|
|
62495
|
+
async RunMJProjectDynamicView(@Arg('input', () => RunDynamicViewInput) input: RunDynamicViewInput, @Ctx() { providers, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
62496
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
62497
|
+
input.EntityName = 'MJ: Projects';
|
|
62498
|
+
return super.RunDynamicViewGeneric(input, provider, userPayload, pubSub);
|
|
62499
|
+
}
|
|
62500
|
+
@Query(() => MJProject_, { nullable: true })
|
|
62501
|
+
async MJProject(@Arg('ID', () => String) ID: string, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine): Promise<MJProject_ | null> {
|
|
62502
|
+
this.CheckUserReadPermissions('MJ: Projects', userPayload);
|
|
62503
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
62504
|
+
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');
|
|
62505
|
+
const rows = await provider.ExecuteSQL(sSQL, [ID], undefined, this.GetUserFromPayload(userPayload));
|
|
62506
|
+
const result = await this.MapFieldNamesToCodeNames('MJ: Projects', rows && rows.length > 0 ? rows[0] : null, this.GetUserFromPayload(userPayload));
|
|
62507
|
+
return result;
|
|
62508
|
+
}
|
|
62509
|
+
|
|
62510
|
+
@FieldResolver(() => [MJProject_])
|
|
62511
|
+
async MJProjects_ParentIDArray(@Root() mjproject_: MJProject_, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
62512
|
+
this.CheckUserReadPermissions('MJ: Projects', userPayload);
|
|
62513
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
62514
|
+
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');
|
|
62515
|
+
const rows = await provider.ExecuteSQL(sSQL, [mjproject_.ID], undefined, this.GetUserFromPayload(userPayload));
|
|
62516
|
+
const result = await this.ArrayMapFieldNamesToCodeNames('MJ: Projects', rows, this.GetUserFromPayload(userPayload));
|
|
62517
|
+
return result;
|
|
62518
|
+
}
|
|
62519
|
+
|
|
62520
|
+
@FieldResolver(() => [MJConversation_])
|
|
62521
|
+
async MJConversations_ProjectIDArray(@Root() mjproject_: MJProject_, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
62522
|
+
this.CheckUserReadPermissions('MJ: Conversations', userPayload);
|
|
62523
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
62524
|
+
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');
|
|
62525
|
+
const rows = await provider.ExecuteSQL(sSQL, [mjproject_.ID], undefined, this.GetUserFromPayload(userPayload));
|
|
62526
|
+
const result = await this.ArrayMapFieldNamesToCodeNames('MJ: Conversations', rows, this.GetUserFromPayload(userPayload));
|
|
62527
|
+
return result;
|
|
62528
|
+
}
|
|
62529
|
+
|
|
62530
|
+
@FieldResolver(() => [MJTask_])
|
|
62531
|
+
async MJTasks_ProjectIDArray(@Root() mjproject_: MJProject_, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
62532
|
+
this.CheckUserReadPermissions('MJ: Tasks', userPayload);
|
|
62533
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
62534
|
+
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');
|
|
62535
|
+
const rows = await provider.ExecuteSQL(sSQL, [mjproject_.ID], undefined, this.GetUserFromPayload(userPayload));
|
|
62536
|
+
const result = await this.ArrayMapFieldNamesToCodeNames('MJ: Tasks', rows, this.GetUserFromPayload(userPayload));
|
|
62537
|
+
return result;
|
|
62538
|
+
}
|
|
62539
|
+
|
|
62540
|
+
@Mutation(() => MJProject_)
|
|
62541
|
+
async CreateMJProject(
|
|
62542
|
+
@Arg('input', () => CreateMJProjectInput) input: CreateMJProjectInput,
|
|
62543
|
+
@Ctx() { providers, userPayload }: AppContext,
|
|
62544
|
+
@PubSub() pubSub: PubSubEngine
|
|
62545
|
+
) {
|
|
62546
|
+
const provider = GetReadWriteProvider(providers);
|
|
62547
|
+
return this.CreateRecord('MJ: Projects', input, provider, userPayload, pubSub)
|
|
62548
|
+
}
|
|
62549
|
+
|
|
62550
|
+
@Mutation(() => MJProject_)
|
|
62551
|
+
async UpdateMJProject(
|
|
62552
|
+
@Arg('input', () => UpdateMJProjectInput) input: UpdateMJProjectInput,
|
|
62553
|
+
@Ctx() { providers, userPayload }: AppContext,
|
|
62554
|
+
@PubSub() pubSub: PubSubEngine
|
|
62555
|
+
) {
|
|
62556
|
+
const provider = GetReadWriteProvider(providers);
|
|
62557
|
+
return this.UpdateRecord('MJ: Projects', input, provider, userPayload, pubSub);
|
|
62558
|
+
}
|
|
62559
|
+
|
|
62560
|
+
@Mutation(() => MJProject_)
|
|
62561
|
+
async DeleteMJProject(@Arg('ID', () => String) ID: string, @Arg('options___', () => DeleteOptionsInput) options: DeleteOptionsInput, @Ctx() { providers, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
62562
|
+
const provider = GetReadWriteProvider(providers);
|
|
62563
|
+
const key = new CompositeKey([{FieldName: 'ID', Value: ID}]);
|
|
62564
|
+
return this.DeleteRecord('MJ: Projects', key, options, provider, userPayload, pubSub);
|
|
62565
|
+
}
|
|
62566
|
+
|
|
62567
|
+
}
|
|
62568
|
+
|
|
62569
|
+
//****************************************************************************
|
|
62570
|
+
// ENTITY CLASS for MJ: Public Links
|
|
62571
|
+
//****************************************************************************
|
|
62572
|
+
@ObjectType({ description: `Shareable links for external access to artifacts and other resources. Supports password protection and expiration.` })
|
|
62573
|
+
export class MJPublicLink_ {
|
|
62574
|
+
@Field()
|
|
62575
|
+
@MaxLength(36)
|
|
62576
|
+
ID: string;
|
|
62577
|
+
|
|
62578
|
+
@Field({description: `Type of resource being shared (Artifact, Conversation, Collection)`})
|
|
62579
|
+
@MaxLength(50)
|
|
62580
|
+
ResourceType: string;
|
|
62581
|
+
|
|
62582
|
+
@Field()
|
|
62583
|
+
@MaxLength(36)
|
|
62584
|
+
ResourceID: string;
|
|
62585
|
+
|
|
62586
|
+
@Field({description: `Unique token for accessing the shared resource via URL`})
|
|
62587
|
+
@MaxLength(255)
|
|
62588
|
+
Token: string;
|
|
62589
|
+
|
|
62590
|
+
@Field({nullable: true, description: `SHA256 hash of optional password for additional security`})
|
|
62591
|
+
@MaxLength(255)
|
|
62592
|
+
PasswordHash?: string;
|
|
62593
|
+
|
|
62594
|
+
@Field({nullable: true, description: `Optional expiration date/time for this public link`})
|
|
62595
|
+
ExpiresAt?: Date;
|
|
62596
|
+
|
|
62597
|
+
@Field(() => Int, {nullable: true, description: `Maximum number of times this link can be viewed`})
|
|
62598
|
+
MaxViews?: number;
|
|
62599
|
+
|
|
62600
|
+
@Field(() => Int, {description: `Current count of how many times this link has been viewed`})
|
|
62601
|
+
CurrentViews: number;
|
|
62602
|
+
|
|
62603
|
+
@Field()
|
|
62604
|
+
@MaxLength(36)
|
|
62605
|
+
UserID: string;
|
|
62606
|
+
|
|
62607
|
+
@Field(() => Boolean, {description: `Indicates if this link is currently active and accessible`})
|
|
62608
|
+
IsActive: boolean;
|
|
62609
|
+
|
|
62610
|
+
@Field()
|
|
62611
|
+
_mj__CreatedAt: Date;
|
|
62612
|
+
|
|
62613
|
+
@Field()
|
|
62614
|
+
_mj__UpdatedAt: Date;
|
|
62615
|
+
|
|
62616
|
+
@Field()
|
|
62617
|
+
@MaxLength(100)
|
|
62618
|
+
User: string;
|
|
62619
|
+
|
|
62620
|
+
}
|
|
62621
|
+
|
|
62622
|
+
//****************************************************************************
|
|
62623
|
+
// INPUT TYPE for MJ: Public Links
|
|
62624
|
+
//****************************************************************************
|
|
62625
|
+
@InputType()
|
|
62626
|
+
export class CreateMJPublicLinkInput {
|
|
62627
|
+
@Field({ nullable: true })
|
|
62628
|
+
ID?: string;
|
|
62629
|
+
|
|
62630
|
+
@Field({ nullable: true })
|
|
62631
|
+
ResourceType?: string;
|
|
62632
|
+
|
|
62633
|
+
@Field({ nullable: true })
|
|
62634
|
+
ResourceID?: string;
|
|
62635
|
+
|
|
62636
|
+
@Field({ nullable: true })
|
|
62637
|
+
Token?: string;
|
|
62638
|
+
|
|
62639
|
+
@Field({ nullable: true })
|
|
62640
|
+
PasswordHash: string | null;
|
|
62641
|
+
|
|
62642
|
+
@Field({ nullable: true })
|
|
62643
|
+
ExpiresAt: Date | null;
|
|
62644
|
+
|
|
62645
|
+
@Field(() => Int, { nullable: true })
|
|
62646
|
+
MaxViews: number | null;
|
|
62647
|
+
|
|
62648
|
+
@Field(() => Int, { nullable: true })
|
|
62649
|
+
CurrentViews?: number;
|
|
62650
|
+
|
|
62651
|
+
@Field({ nullable: true })
|
|
62652
|
+
UserID?: string;
|
|
62653
|
+
|
|
62654
|
+
@Field(() => Boolean, { nullable: true })
|
|
62655
|
+
IsActive?: boolean;
|
|
62656
|
+
|
|
62657
|
+
@Field(() => RestoreContextInput, { nullable: true })
|
|
62658
|
+
RestoreContext___?: RestoreContextInput;
|
|
62659
|
+
}
|
|
62660
|
+
|
|
62661
|
+
|
|
62662
|
+
//****************************************************************************
|
|
62663
|
+
// INPUT TYPE for MJ: Public Links
|
|
62664
|
+
//****************************************************************************
|
|
62665
|
+
@InputType()
|
|
62666
|
+
export class UpdateMJPublicLinkInput {
|
|
62667
|
+
@Field()
|
|
62668
|
+
ID: string;
|
|
62669
|
+
|
|
62670
|
+
@Field({ nullable: true })
|
|
62671
|
+
ResourceType?: string;
|
|
62672
|
+
|
|
62673
|
+
@Field({ nullable: true })
|
|
62674
|
+
ResourceID?: string;
|
|
62675
|
+
|
|
62676
|
+
@Field({ nullable: true })
|
|
62677
|
+
Token?: string;
|
|
62678
|
+
|
|
62679
|
+
@Field({ nullable: true })
|
|
62680
|
+
PasswordHash?: string | null;
|
|
62681
|
+
|
|
62682
|
+
@Field({ nullable: true })
|
|
62683
|
+
ExpiresAt?: Date | null;
|
|
62684
|
+
|
|
62685
|
+
@Field(() => Int, { nullable: true })
|
|
62686
|
+
MaxViews?: number | null;
|
|
62687
|
+
|
|
62688
|
+
@Field(() => Int, { nullable: true })
|
|
62689
|
+
CurrentViews?: number;
|
|
62690
|
+
|
|
62691
|
+
@Field({ nullable: true })
|
|
62692
|
+
UserID?: string;
|
|
62693
|
+
|
|
62694
|
+
@Field(() => Boolean, { nullable: true })
|
|
62695
|
+
IsActive?: boolean;
|
|
62696
|
+
|
|
62697
|
+
@Field(() => [KeyValuePairInput], { nullable: true })
|
|
62698
|
+
OldValues___?: KeyValuePairInput[];
|
|
62699
|
+
|
|
62700
|
+
@Field(() => RestoreContextInput, { nullable: true })
|
|
62701
|
+
RestoreContext___?: RestoreContextInput;
|
|
62702
|
+
}
|
|
62703
|
+
|
|
62704
|
+
//****************************************************************************
|
|
62705
|
+
// RESOLVER for MJ: Public Links
|
|
62706
|
+
//****************************************************************************
|
|
62707
|
+
@ObjectType()
|
|
62708
|
+
export class RunMJPublicLinkViewResult {
|
|
62709
|
+
@Field(() => [MJPublicLink_])
|
|
62710
|
+
Results: MJPublicLink_[];
|
|
62711
|
+
|
|
62712
|
+
@Field(() => String, {nullable: true})
|
|
62713
|
+
UserViewRunID?: string;
|
|
62714
|
+
|
|
62715
|
+
@Field(() => Int, {nullable: true})
|
|
62716
|
+
RowCount: number;
|
|
62717
|
+
|
|
62718
|
+
@Field(() => Int, {nullable: true})
|
|
62719
|
+
TotalRowCount: number;
|
|
62720
|
+
|
|
62721
|
+
@Field(() => Int, {nullable: true})
|
|
62722
|
+
ExecutionTime: number;
|
|
62723
|
+
|
|
62724
|
+
@Field({nullable: true})
|
|
62725
|
+
ErrorMessage?: string;
|
|
62726
|
+
|
|
62727
|
+
@Field(() => Boolean, {nullable: false})
|
|
62728
|
+
Success: boolean;
|
|
62729
|
+
}
|
|
62730
|
+
|
|
62731
|
+
@Resolver(MJPublicLink_)
|
|
62732
|
+
export class MJPublicLinkResolver extends ResolverBase {
|
|
62733
|
+
@Query(() => RunMJPublicLinkViewResult)
|
|
62734
|
+
async RunMJPublicLinkViewByID(@Arg('input', () => RunViewByIDInput) input: RunViewByIDInput, @Ctx() { providers, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
62735
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
62736
|
+
return super.RunViewByIDGeneric(input, provider, userPayload, pubSub);
|
|
62737
|
+
}
|
|
62738
|
+
|
|
62739
|
+
@Query(() => RunMJPublicLinkViewResult)
|
|
62740
|
+
async RunMJPublicLinkViewByName(@Arg('input', () => RunViewByNameInput) input: RunViewByNameInput, @Ctx() { providers, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
62741
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
62742
|
+
return super.RunViewByNameGeneric(input, provider, userPayload, pubSub);
|
|
62743
|
+
}
|
|
62744
|
+
|
|
62745
|
+
@Query(() => RunMJPublicLinkViewResult)
|
|
62746
|
+
async RunMJPublicLinkDynamicView(@Arg('input', () => RunDynamicViewInput) input: RunDynamicViewInput, @Ctx() { providers, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
62747
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
62748
|
+
input.EntityName = 'MJ: Public Links';
|
|
62749
|
+
return super.RunDynamicViewGeneric(input, provider, userPayload, pubSub);
|
|
62750
|
+
}
|
|
62751
|
+
@Query(() => MJPublicLink_, { nullable: true })
|
|
62752
|
+
async MJPublicLink(@Arg('ID', () => String) ID: string, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine): Promise<MJPublicLink_ | null> {
|
|
62753
|
+
this.CheckUserReadPermissions('MJ: Public Links', userPayload);
|
|
62754
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
62755
|
+
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');
|
|
62756
|
+
const rows = await provider.ExecuteSQL(sSQL, [ID], undefined, this.GetUserFromPayload(userPayload));
|
|
62757
|
+
const result = await this.MapFieldNamesToCodeNames('MJ: Public Links', rows && rows.length > 0 ? rows[0] : null, this.GetUserFromPayload(userPayload));
|
|
62758
|
+
return result;
|
|
62759
|
+
}
|
|
62760
|
+
|
|
62761
|
+
@Mutation(() => MJPublicLink_)
|
|
62762
|
+
async CreateMJPublicLink(
|
|
62763
|
+
@Arg('input', () => CreateMJPublicLinkInput) input: CreateMJPublicLinkInput,
|
|
62764
|
+
@Ctx() { providers, userPayload }: AppContext,
|
|
62765
|
+
@PubSub() pubSub: PubSubEngine
|
|
62766
|
+
) {
|
|
62767
|
+
const provider = GetReadWriteProvider(providers);
|
|
62768
|
+
return this.CreateRecord('MJ: Public Links', input, provider, userPayload, pubSub)
|
|
62769
|
+
}
|
|
62770
|
+
|
|
62771
|
+
@Mutation(() => MJPublicLink_)
|
|
62772
|
+
async UpdateMJPublicLink(
|
|
62773
|
+
@Arg('input', () => UpdateMJPublicLinkInput) input: UpdateMJPublicLinkInput,
|
|
62774
|
+
@Ctx() { providers, userPayload }: AppContext,
|
|
62775
|
+
@PubSub() pubSub: PubSubEngine
|
|
62776
|
+
) {
|
|
62777
|
+
const provider = GetReadWriteProvider(providers);
|
|
62778
|
+
return this.UpdateRecord('MJ: Public Links', input, provider, userPayload, pubSub);
|
|
62779
|
+
}
|
|
62780
|
+
|
|
62781
|
+
@Mutation(() => MJPublicLink_)
|
|
62782
|
+
async DeleteMJPublicLink(@Arg('ID', () => String) ID: string, @Arg('options___', () => DeleteOptionsInput) options: DeleteOptionsInput, @Ctx() { providers, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
62783
|
+
const provider = GetReadWriteProvider(providers);
|
|
62784
|
+
const key = new CompositeKey([{FieldName: 'ID', Value: ID}]);
|
|
62785
|
+
return this.DeleteRecord('MJ: Public Links', key, options, provider, userPayload, pubSub);
|
|
62786
|
+
}
|
|
62787
|
+
|
|
62788
|
+
}
|
|
62789
|
+
|
|
62790
|
+
//****************************************************************************
|
|
62791
|
+
// ENTITY CLASS for MJ: Queries
|
|
62792
|
+
//****************************************************************************
|
|
62793
|
+
@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.` })
|
|
62794
|
+
export class MJQuery_ {
|
|
62795
|
+
@Field()
|
|
62796
|
+
@MaxLength(36)
|
|
62797
|
+
ID: string;
|
|
62798
|
+
|
|
62799
|
+
@Field()
|
|
62800
|
+
@MaxLength(255)
|
|
62801
|
+
Name: string;
|
|
62802
|
+
|
|
62803
|
+
@Field({nullable: true})
|
|
62804
|
+
@MaxLength(36)
|
|
62805
|
+
CategoryID?: string;
|
|
62806
|
+
|
|
62807
|
+
@Field({nullable: true, description: `The natural language question this query answers, used for AI query selection.`})
|
|
62808
|
+
UserQuestion?: string;
|
|
62809
|
+
|
|
62810
|
+
@Field({nullable: true})
|
|
62811
|
+
Description?: string;
|
|
62812
|
+
|
|
62813
|
+
@Field({nullable: true, description: `The actual SQL query text to execute, may include parameters.`})
|
|
62814
|
+
SQL?: string;
|
|
62815
|
+
|
|
62816
|
+
@Field({nullable: true, description: `Technical documentation of the query logic, performance considerations, and parameter usage.`})
|
|
62817
|
+
TechnicalDescription?: string;
|
|
61999
62818
|
|
|
62000
62819
|
@Field({nullable: true, description: `The original SQL before any optimization or modification, kept for reference.`})
|
|
62001
62820
|
OriginalSQL?: string;
|
|
@@ -66745,6 +67564,1374 @@ export class MJRecordMergeLogResolver extends ResolverBase {
|
|
|
66745
67564
|
|
|
66746
67565
|
}
|
|
66747
67566
|
|
|
67567
|
+
//****************************************************************************
|
|
67568
|
+
// ENTITY CLASS for MJ: Record Process Categories
|
|
67569
|
+
//****************************************************************************
|
|
67570
|
+
@ObjectType({ description: `Hierarchical folder for organizing Record Processes in the UI. Example: "Customer Lifecycle" with a child category "Retention".` })
|
|
67571
|
+
export class MJRecordProcessCategory_ {
|
|
67572
|
+
@Field()
|
|
67573
|
+
@MaxLength(36)
|
|
67574
|
+
ID: string;
|
|
67575
|
+
|
|
67576
|
+
@Field({description: `Display name of the category`})
|
|
67577
|
+
@MaxLength(255)
|
|
67578
|
+
Name: string;
|
|
67579
|
+
|
|
67580
|
+
@Field({nullable: true, description: `Optional description of what belongs in this category`})
|
|
67581
|
+
Description?: string;
|
|
67582
|
+
|
|
67583
|
+
@Field({nullable: true, description: `Self-referencing foreign key to the parent category, enabling a nested folder hierarchy (NULL for a top-level category)`})
|
|
67584
|
+
@MaxLength(36)
|
|
67585
|
+
ParentID?: string;
|
|
67586
|
+
|
|
67587
|
+
@Field()
|
|
67588
|
+
_mj__CreatedAt: Date;
|
|
67589
|
+
|
|
67590
|
+
@Field()
|
|
67591
|
+
_mj__UpdatedAt: Date;
|
|
67592
|
+
|
|
67593
|
+
@Field({nullable: true})
|
|
67594
|
+
@MaxLength(255)
|
|
67595
|
+
Parent?: string;
|
|
67596
|
+
|
|
67597
|
+
@Field({nullable: true})
|
|
67598
|
+
@MaxLength(36)
|
|
67599
|
+
RootParentID?: string;
|
|
67600
|
+
|
|
67601
|
+
@Field(() => [MJRecordProcessCategory_])
|
|
67602
|
+
MJRecordProcessCategories_ParentIDArray: MJRecordProcessCategory_[]; // Link to MJRecordProcessCategories
|
|
67603
|
+
|
|
67604
|
+
@Field(() => [MJRecordProcess_])
|
|
67605
|
+
MJRecordProcesses_CategoryIDArray: MJRecordProcess_[]; // Link to MJRecordProcesses
|
|
67606
|
+
|
|
67607
|
+
}
|
|
67608
|
+
|
|
67609
|
+
//****************************************************************************
|
|
67610
|
+
// INPUT TYPE for MJ: Record Process Categories
|
|
67611
|
+
//****************************************************************************
|
|
67612
|
+
@InputType()
|
|
67613
|
+
export class CreateMJRecordProcessCategoryInput {
|
|
67614
|
+
@Field({ nullable: true })
|
|
67615
|
+
ID?: string;
|
|
67616
|
+
|
|
67617
|
+
@Field({ nullable: true })
|
|
67618
|
+
Name?: string;
|
|
67619
|
+
|
|
67620
|
+
@Field({ nullable: true })
|
|
67621
|
+
Description: string | null;
|
|
67622
|
+
|
|
67623
|
+
@Field({ nullable: true })
|
|
67624
|
+
ParentID: string | null;
|
|
67625
|
+
|
|
67626
|
+
@Field(() => RestoreContextInput, { nullable: true })
|
|
67627
|
+
RestoreContext___?: RestoreContextInput;
|
|
67628
|
+
}
|
|
67629
|
+
|
|
67630
|
+
|
|
67631
|
+
//****************************************************************************
|
|
67632
|
+
// INPUT TYPE for MJ: Record Process Categories
|
|
67633
|
+
//****************************************************************************
|
|
67634
|
+
@InputType()
|
|
67635
|
+
export class UpdateMJRecordProcessCategoryInput {
|
|
67636
|
+
@Field()
|
|
67637
|
+
ID: string;
|
|
67638
|
+
|
|
67639
|
+
@Field({ nullable: true })
|
|
67640
|
+
Name?: string;
|
|
67641
|
+
|
|
67642
|
+
@Field({ nullable: true })
|
|
67643
|
+
Description?: string | null;
|
|
67644
|
+
|
|
67645
|
+
@Field({ nullable: true })
|
|
67646
|
+
ParentID?: string | null;
|
|
67647
|
+
|
|
67648
|
+
@Field(() => [KeyValuePairInput], { nullable: true })
|
|
67649
|
+
OldValues___?: KeyValuePairInput[];
|
|
67650
|
+
|
|
67651
|
+
@Field(() => RestoreContextInput, { nullable: true })
|
|
67652
|
+
RestoreContext___?: RestoreContextInput;
|
|
67653
|
+
}
|
|
67654
|
+
|
|
67655
|
+
//****************************************************************************
|
|
67656
|
+
// RESOLVER for MJ: Record Process Categories
|
|
67657
|
+
//****************************************************************************
|
|
67658
|
+
@ObjectType()
|
|
67659
|
+
export class RunMJRecordProcessCategoryViewResult {
|
|
67660
|
+
@Field(() => [MJRecordProcessCategory_])
|
|
67661
|
+
Results: MJRecordProcessCategory_[];
|
|
67662
|
+
|
|
67663
|
+
@Field(() => String, {nullable: true})
|
|
67664
|
+
UserViewRunID?: string;
|
|
67665
|
+
|
|
67666
|
+
@Field(() => Int, {nullable: true})
|
|
67667
|
+
RowCount: number;
|
|
67668
|
+
|
|
67669
|
+
@Field(() => Int, {nullable: true})
|
|
67670
|
+
TotalRowCount: number;
|
|
67671
|
+
|
|
67672
|
+
@Field(() => Int, {nullable: true})
|
|
67673
|
+
ExecutionTime: number;
|
|
67674
|
+
|
|
67675
|
+
@Field({nullable: true})
|
|
67676
|
+
ErrorMessage?: string;
|
|
67677
|
+
|
|
67678
|
+
@Field(() => Boolean, {nullable: false})
|
|
67679
|
+
Success: boolean;
|
|
67680
|
+
}
|
|
67681
|
+
|
|
67682
|
+
@Resolver(MJRecordProcessCategory_)
|
|
67683
|
+
export class MJRecordProcessCategoryResolver extends ResolverBase {
|
|
67684
|
+
@Query(() => RunMJRecordProcessCategoryViewResult)
|
|
67685
|
+
async RunMJRecordProcessCategoryViewByID(@Arg('input', () => RunViewByIDInput) input: RunViewByIDInput, @Ctx() { providers, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
67686
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
67687
|
+
return super.RunViewByIDGeneric(input, provider, userPayload, pubSub);
|
|
67688
|
+
}
|
|
67689
|
+
|
|
67690
|
+
@Query(() => RunMJRecordProcessCategoryViewResult)
|
|
67691
|
+
async RunMJRecordProcessCategoryViewByName(@Arg('input', () => RunViewByNameInput) input: RunViewByNameInput, @Ctx() { providers, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
67692
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
67693
|
+
return super.RunViewByNameGeneric(input, provider, userPayload, pubSub);
|
|
67694
|
+
}
|
|
67695
|
+
|
|
67696
|
+
@Query(() => RunMJRecordProcessCategoryViewResult)
|
|
67697
|
+
async RunMJRecordProcessCategoryDynamicView(@Arg('input', () => RunDynamicViewInput) input: RunDynamicViewInput, @Ctx() { providers, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
67698
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
67699
|
+
input.EntityName = 'MJ: Record Process Categories';
|
|
67700
|
+
return super.RunDynamicViewGeneric(input, provider, userPayload, pubSub);
|
|
67701
|
+
}
|
|
67702
|
+
@Query(() => MJRecordProcessCategory_, { nullable: true })
|
|
67703
|
+
async MJRecordProcessCategory(@Arg('ID', () => String) ID: string, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine): Promise<MJRecordProcessCategory_ | null> {
|
|
67704
|
+
this.CheckUserReadPermissions('MJ: Record Process Categories', userPayload);
|
|
67705
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
67706
|
+
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');
|
|
67707
|
+
const rows = await provider.ExecuteSQL(sSQL, [ID], undefined, this.GetUserFromPayload(userPayload));
|
|
67708
|
+
const result = await this.MapFieldNamesToCodeNames('MJ: Record Process Categories', rows && rows.length > 0 ? rows[0] : null, this.GetUserFromPayload(userPayload));
|
|
67709
|
+
return result;
|
|
67710
|
+
}
|
|
67711
|
+
|
|
67712
|
+
@FieldResolver(() => [MJRecordProcessCategory_])
|
|
67713
|
+
async MJRecordProcessCategories_ParentIDArray(@Root() mjrecordprocesscategory_: MJRecordProcessCategory_, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
67714
|
+
this.CheckUserReadPermissions('MJ: Record Process Categories', userPayload);
|
|
67715
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
67716
|
+
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');
|
|
67717
|
+
const rows = await provider.ExecuteSQL(sSQL, [mjrecordprocesscategory_.ID], undefined, this.GetUserFromPayload(userPayload));
|
|
67718
|
+
const result = await this.ArrayMapFieldNamesToCodeNames('MJ: Record Process Categories', rows, this.GetUserFromPayload(userPayload));
|
|
67719
|
+
return result;
|
|
67720
|
+
}
|
|
67721
|
+
|
|
67722
|
+
@FieldResolver(() => [MJRecordProcess_])
|
|
67723
|
+
async MJRecordProcesses_CategoryIDArray(@Root() mjrecordprocesscategory_: MJRecordProcessCategory_, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
67724
|
+
this.CheckUserReadPermissions('MJ: Record Processes', userPayload);
|
|
67725
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
67726
|
+
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');
|
|
67727
|
+
const rows = await provider.ExecuteSQL(sSQL, [mjrecordprocesscategory_.ID], undefined, this.GetUserFromPayload(userPayload));
|
|
67728
|
+
const result = await this.ArrayMapFieldNamesToCodeNames('MJ: Record Processes', rows, this.GetUserFromPayload(userPayload));
|
|
67729
|
+
return result;
|
|
67730
|
+
}
|
|
67731
|
+
|
|
67732
|
+
@Mutation(() => MJRecordProcessCategory_)
|
|
67733
|
+
async CreateMJRecordProcessCategory(
|
|
67734
|
+
@Arg('input', () => CreateMJRecordProcessCategoryInput) input: CreateMJRecordProcessCategoryInput,
|
|
67735
|
+
@Ctx() { providers, userPayload }: AppContext,
|
|
67736
|
+
@PubSub() pubSub: PubSubEngine
|
|
67737
|
+
) {
|
|
67738
|
+
const provider = GetReadWriteProvider(providers);
|
|
67739
|
+
return this.CreateRecord('MJ: Record Process Categories', input, provider, userPayload, pubSub)
|
|
67740
|
+
}
|
|
67741
|
+
|
|
67742
|
+
@Mutation(() => MJRecordProcessCategory_)
|
|
67743
|
+
async UpdateMJRecordProcessCategory(
|
|
67744
|
+
@Arg('input', () => UpdateMJRecordProcessCategoryInput) input: UpdateMJRecordProcessCategoryInput,
|
|
67745
|
+
@Ctx() { providers, userPayload }: AppContext,
|
|
67746
|
+
@PubSub() pubSub: PubSubEngine
|
|
67747
|
+
) {
|
|
67748
|
+
const provider = GetReadWriteProvider(providers);
|
|
67749
|
+
return this.UpdateRecord('MJ: Record Process Categories', input, provider, userPayload, pubSub);
|
|
67750
|
+
}
|
|
67751
|
+
|
|
67752
|
+
@Mutation(() => MJRecordProcessCategory_)
|
|
67753
|
+
async DeleteMJRecordProcessCategory(@Arg('ID', () => String) ID: string, @Arg('options___', () => DeleteOptionsInput) options: DeleteOptionsInput, @Ctx() { providers, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
67754
|
+
const provider = GetReadWriteProvider(providers);
|
|
67755
|
+
const key = new CompositeKey([{FieldName: 'ID', Value: ID}]);
|
|
67756
|
+
return this.DeleteRecord('MJ: Record Process Categories', key, options, provider, userPayload, pubSub);
|
|
67757
|
+
}
|
|
67758
|
+
|
|
67759
|
+
}
|
|
67760
|
+
|
|
67761
|
+
//****************************************************************************
|
|
67762
|
+
// ENTITY CLASS for MJ: Record Process Watermarks
|
|
67763
|
+
//****************************************************************************
|
|
67764
|
+
@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.` })
|
|
67765
|
+
export class MJRecordProcessWatermark_ {
|
|
67766
|
+
@Field()
|
|
67767
|
+
@MaxLength(36)
|
|
67768
|
+
ID: string;
|
|
67769
|
+
|
|
67770
|
+
@Field({description: `Foreign key to the Record Process this watermark belongs to`})
|
|
67771
|
+
@MaxLength(36)
|
|
67772
|
+
RecordProcessID: string;
|
|
67773
|
+
|
|
67774
|
+
@Field({description: `Foreign key to the entity of the watermarked record`})
|
|
67775
|
+
@MaxLength(36)
|
|
67776
|
+
EntityID: string;
|
|
67777
|
+
|
|
67778
|
+
@Field({description: `Primary key of the watermarked record, stored as text to remain composite-key safe`})
|
|
67779
|
+
@MaxLength(450)
|
|
67780
|
+
RecordID: string;
|
|
67781
|
+
|
|
67782
|
+
@Field({description: `Content hash of the record as of the last time it was processed by this Record Process`})
|
|
67783
|
+
@MaxLength(128)
|
|
67784
|
+
Hash: string;
|
|
67785
|
+
|
|
67786
|
+
@Field({description: `When this record was last processed by this Record Process`})
|
|
67787
|
+
LastProcessedAt: Date;
|
|
67788
|
+
|
|
67789
|
+
@Field()
|
|
67790
|
+
_mj__CreatedAt: Date;
|
|
67791
|
+
|
|
67792
|
+
@Field()
|
|
67793
|
+
_mj__UpdatedAt: Date;
|
|
67794
|
+
|
|
67795
|
+
@Field()
|
|
67796
|
+
@MaxLength(255)
|
|
67797
|
+
RecordProcess: string;
|
|
67798
|
+
|
|
67799
|
+
@Field()
|
|
67800
|
+
@MaxLength(255)
|
|
67801
|
+
Entity: string;
|
|
67802
|
+
|
|
67803
|
+
}
|
|
67804
|
+
|
|
67805
|
+
//****************************************************************************
|
|
67806
|
+
// INPUT TYPE for MJ: Record Process Watermarks
|
|
67807
|
+
//****************************************************************************
|
|
67808
|
+
@InputType()
|
|
67809
|
+
export class CreateMJRecordProcessWatermarkInput {
|
|
67810
|
+
@Field({ nullable: true })
|
|
67811
|
+
ID?: string;
|
|
67812
|
+
|
|
67813
|
+
@Field({ nullable: true })
|
|
67814
|
+
RecordProcessID?: string;
|
|
67815
|
+
|
|
67816
|
+
@Field({ nullable: true })
|
|
67817
|
+
EntityID?: string;
|
|
67818
|
+
|
|
67819
|
+
@Field({ nullable: true })
|
|
67820
|
+
RecordID?: string;
|
|
67821
|
+
|
|
67822
|
+
@Field({ nullable: true })
|
|
67823
|
+
Hash?: string;
|
|
67824
|
+
|
|
67825
|
+
@Field({ nullable: true })
|
|
67826
|
+
LastProcessedAt?: Date;
|
|
67827
|
+
|
|
67828
|
+
@Field(() => RestoreContextInput, { nullable: true })
|
|
67829
|
+
RestoreContext___?: RestoreContextInput;
|
|
67830
|
+
}
|
|
67831
|
+
|
|
67832
|
+
|
|
67833
|
+
//****************************************************************************
|
|
67834
|
+
// INPUT TYPE for MJ: Record Process Watermarks
|
|
67835
|
+
//****************************************************************************
|
|
67836
|
+
@InputType()
|
|
67837
|
+
export class UpdateMJRecordProcessWatermarkInput {
|
|
67838
|
+
@Field()
|
|
67839
|
+
ID: string;
|
|
67840
|
+
|
|
67841
|
+
@Field({ nullable: true })
|
|
67842
|
+
RecordProcessID?: string;
|
|
67843
|
+
|
|
67844
|
+
@Field({ nullable: true })
|
|
67845
|
+
EntityID?: string;
|
|
67846
|
+
|
|
67847
|
+
@Field({ nullable: true })
|
|
67848
|
+
RecordID?: string;
|
|
67849
|
+
|
|
67850
|
+
@Field({ nullable: true })
|
|
67851
|
+
Hash?: string;
|
|
67852
|
+
|
|
67853
|
+
@Field({ nullable: true })
|
|
67854
|
+
LastProcessedAt?: Date;
|
|
67855
|
+
|
|
67856
|
+
@Field(() => [KeyValuePairInput], { nullable: true })
|
|
67857
|
+
OldValues___?: KeyValuePairInput[];
|
|
67858
|
+
|
|
67859
|
+
@Field(() => RestoreContextInput, { nullable: true })
|
|
67860
|
+
RestoreContext___?: RestoreContextInput;
|
|
67861
|
+
}
|
|
67862
|
+
|
|
67863
|
+
//****************************************************************************
|
|
67864
|
+
// RESOLVER for MJ: Record Process Watermarks
|
|
67865
|
+
//****************************************************************************
|
|
67866
|
+
@ObjectType()
|
|
67867
|
+
export class RunMJRecordProcessWatermarkViewResult {
|
|
67868
|
+
@Field(() => [MJRecordProcessWatermark_])
|
|
67869
|
+
Results: MJRecordProcessWatermark_[];
|
|
67870
|
+
|
|
67871
|
+
@Field(() => String, {nullable: true})
|
|
67872
|
+
UserViewRunID?: string;
|
|
67873
|
+
|
|
67874
|
+
@Field(() => Int, {nullable: true})
|
|
67875
|
+
RowCount: number;
|
|
67876
|
+
|
|
67877
|
+
@Field(() => Int, {nullable: true})
|
|
67878
|
+
TotalRowCount: number;
|
|
67879
|
+
|
|
67880
|
+
@Field(() => Int, {nullable: true})
|
|
67881
|
+
ExecutionTime: number;
|
|
67882
|
+
|
|
67883
|
+
@Field({nullable: true})
|
|
67884
|
+
ErrorMessage?: string;
|
|
67885
|
+
|
|
67886
|
+
@Field(() => Boolean, {nullable: false})
|
|
67887
|
+
Success: boolean;
|
|
67888
|
+
}
|
|
67889
|
+
|
|
67890
|
+
@Resolver(MJRecordProcessWatermark_)
|
|
67891
|
+
export class MJRecordProcessWatermarkResolver extends ResolverBase {
|
|
67892
|
+
@Query(() => RunMJRecordProcessWatermarkViewResult)
|
|
67893
|
+
async RunMJRecordProcessWatermarkViewByID(@Arg('input', () => RunViewByIDInput) input: RunViewByIDInput, @Ctx() { providers, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
67894
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
67895
|
+
return super.RunViewByIDGeneric(input, provider, userPayload, pubSub);
|
|
67896
|
+
}
|
|
67897
|
+
|
|
67898
|
+
@Query(() => RunMJRecordProcessWatermarkViewResult)
|
|
67899
|
+
async RunMJRecordProcessWatermarkViewByName(@Arg('input', () => RunViewByNameInput) input: RunViewByNameInput, @Ctx() { providers, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
67900
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
67901
|
+
return super.RunViewByNameGeneric(input, provider, userPayload, pubSub);
|
|
67902
|
+
}
|
|
67903
|
+
|
|
67904
|
+
@Query(() => RunMJRecordProcessWatermarkViewResult)
|
|
67905
|
+
async RunMJRecordProcessWatermarkDynamicView(@Arg('input', () => RunDynamicViewInput) input: RunDynamicViewInput, @Ctx() { providers, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
67906
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
67907
|
+
input.EntityName = 'MJ: Record Process Watermarks';
|
|
67908
|
+
return super.RunDynamicViewGeneric(input, provider, userPayload, pubSub);
|
|
67909
|
+
}
|
|
67910
|
+
@Query(() => MJRecordProcessWatermark_, { nullable: true })
|
|
67911
|
+
async MJRecordProcessWatermark(@Arg('ID', () => String) ID: string, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine): Promise<MJRecordProcessWatermark_ | null> {
|
|
67912
|
+
this.CheckUserReadPermissions('MJ: Record Process Watermarks', userPayload);
|
|
67913
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
67914
|
+
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');
|
|
67915
|
+
const rows = await provider.ExecuteSQL(sSQL, [ID], undefined, this.GetUserFromPayload(userPayload));
|
|
67916
|
+
const result = await this.MapFieldNamesToCodeNames('MJ: Record Process Watermarks', rows && rows.length > 0 ? rows[0] : null, this.GetUserFromPayload(userPayload));
|
|
67917
|
+
return result;
|
|
67918
|
+
}
|
|
67919
|
+
|
|
67920
|
+
@Mutation(() => MJRecordProcessWatermark_)
|
|
67921
|
+
async CreateMJRecordProcessWatermark(
|
|
67922
|
+
@Arg('input', () => CreateMJRecordProcessWatermarkInput) input: CreateMJRecordProcessWatermarkInput,
|
|
67923
|
+
@Ctx() { providers, userPayload }: AppContext,
|
|
67924
|
+
@PubSub() pubSub: PubSubEngine
|
|
67925
|
+
) {
|
|
67926
|
+
const provider = GetReadWriteProvider(providers);
|
|
67927
|
+
return this.CreateRecord('MJ: Record Process Watermarks', input, provider, userPayload, pubSub)
|
|
67928
|
+
}
|
|
67929
|
+
|
|
67930
|
+
@Mutation(() => MJRecordProcessWatermark_)
|
|
67931
|
+
async UpdateMJRecordProcessWatermark(
|
|
67932
|
+
@Arg('input', () => UpdateMJRecordProcessWatermarkInput) input: UpdateMJRecordProcessWatermarkInput,
|
|
67933
|
+
@Ctx() { providers, userPayload }: AppContext,
|
|
67934
|
+
@PubSub() pubSub: PubSubEngine
|
|
67935
|
+
) {
|
|
67936
|
+
const provider = GetReadWriteProvider(providers);
|
|
67937
|
+
return this.UpdateRecord('MJ: Record Process Watermarks', input, provider, userPayload, pubSub);
|
|
67938
|
+
}
|
|
67939
|
+
|
|
67940
|
+
@Mutation(() => MJRecordProcessWatermark_)
|
|
67941
|
+
async DeleteMJRecordProcessWatermark(@Arg('ID', () => String) ID: string, @Arg('options___', () => DeleteOptionsInput) options: DeleteOptionsInput, @Ctx() { providers, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
67942
|
+
const provider = GetReadWriteProvider(providers);
|
|
67943
|
+
const key = new CompositeKey([{FieldName: 'ID', Value: ID}]);
|
|
67944
|
+
return this.DeleteRecord('MJ: Record Process Watermarks', key, options, provider, userPayload, pubSub);
|
|
67945
|
+
}
|
|
67946
|
+
|
|
67947
|
+
}
|
|
67948
|
+
|
|
67949
|
+
//****************************************************************************
|
|
67950
|
+
// ENTITY CLASS for MJ: Record Processes
|
|
67951
|
+
//****************************************************************************
|
|
67952
|
+
@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.` })
|
|
67953
|
+
export class MJRecordProcess_ {
|
|
67954
|
+
@Field()
|
|
67955
|
+
@MaxLength(36)
|
|
67956
|
+
ID: string;
|
|
67957
|
+
|
|
67958
|
+
@Field({description: `Human-readable name of the process definition (e.g., "Weekly Customer Health Summary")`})
|
|
67959
|
+
@MaxLength(255)
|
|
67960
|
+
Name: string;
|
|
67961
|
+
|
|
67962
|
+
@Field({nullable: true, description: `Optional description of what this process does`})
|
|
67963
|
+
Description?: string;
|
|
67964
|
+
|
|
67965
|
+
@Field({nullable: true, description: `Optional hierarchical category for organizing this process in the UI`})
|
|
67966
|
+
@MaxLength(36)
|
|
67967
|
+
CategoryID?: string;
|
|
67968
|
+
|
|
67969
|
+
@Field({description: `Foreign key to the target entity whose records this process operates on`})
|
|
67970
|
+
@MaxLength(36)
|
|
67971
|
+
EntityID: string;
|
|
67972
|
+
|
|
67973
|
+
@Field({description: `Lifecycle status: Draft (not yet wired), Active (triggers live), or Disabled`})
|
|
67974
|
+
@MaxLength(20)
|
|
67975
|
+
Status: string;
|
|
67976
|
+
|
|
67977
|
+
@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.`})
|
|
67978
|
+
@MaxLength(20)
|
|
67979
|
+
WorkType: string;
|
|
67980
|
+
|
|
67981
|
+
@Field({nullable: true, description: `Foreign key to the Action to run, when WorkType=Action`})
|
|
67982
|
+
@MaxLength(36)
|
|
67983
|
+
ActionID?: string;
|
|
67984
|
+
|
|
67985
|
+
@Field({nullable: true, description: `Foreign key to the AI Agent to run, when WorkType=Agent`})
|
|
67986
|
+
@MaxLength(36)
|
|
67987
|
+
AgentID?: string;
|
|
67988
|
+
|
|
67989
|
+
@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.`})
|
|
67990
|
+
@MaxLength(36)
|
|
67991
|
+
PromptID?: string;
|
|
67992
|
+
|
|
67993
|
+
@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.`})
|
|
67994
|
+
@MaxLength(20)
|
|
67995
|
+
ScopeType: string;
|
|
67996
|
+
|
|
67997
|
+
@Field({nullable: true, description: `Foreign key to the User View defining the scope, when ScopeType=View`})
|
|
67998
|
+
@MaxLength(36)
|
|
67999
|
+
ScopeViewID?: string;
|
|
68000
|
+
|
|
68001
|
+
@Field({nullable: true, description: `Foreign key to the List defining the scope, when ScopeType=List`})
|
|
68002
|
+
@MaxLength(36)
|
|
68003
|
+
ScopeListID?: string;
|
|
68004
|
+
|
|
68005
|
+
@Field({nullable: true, description: `Ad-hoc WHERE clause used to resolve the record set, when ScopeType=Filter`})
|
|
68006
|
+
ScopeFilter?: string;
|
|
68007
|
+
|
|
68008
|
+
@Field(() => Boolean, {description: `When 1, the process runs per-record on save via an owned Entity Action`})
|
|
68009
|
+
OnChangeEnabled: boolean;
|
|
68010
|
+
|
|
68011
|
+
@Field({nullable: true, description: `Which save event fires the on-change trigger: AfterCreate, AfterUpdate, AfterDelete, or Validate`})
|
|
68012
|
+
@MaxLength(30)
|
|
68013
|
+
OnChangeInvocationType?: string;
|
|
68014
|
+
|
|
68015
|
+
@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`})
|
|
68016
|
+
OnChangeFilter?: string;
|
|
68017
|
+
|
|
68018
|
+
@Field(() => Boolean, {description: `When 1, the process runs on a cron schedule via an owned Scheduled Job`})
|
|
68019
|
+
ScheduleEnabled: boolean;
|
|
68020
|
+
|
|
68021
|
+
@Field({nullable: true, description: `Cron expression for the schedule trigger, when ScheduleEnabled=1`})
|
|
68022
|
+
@MaxLength(120)
|
|
68023
|
+
CronExpression?: string;
|
|
68024
|
+
|
|
68025
|
+
@Field({nullable: true, description: `IANA timezone for evaluating the cron expression (default UTC)`})
|
|
68026
|
+
@MaxLength(100)
|
|
68027
|
+
Timezone?: string;
|
|
68028
|
+
|
|
68029
|
+
@Field(() => Boolean, {description: `When 1, the process can be run on demand (button / resolver)`})
|
|
68030
|
+
OnDemandEnabled: boolean;
|
|
68031
|
+
|
|
68032
|
+
@Field({nullable: true, description: `JSON mapping describing how a record maps to the work inputs (optionally including an EntityDocumentID for render-to-text)`})
|
|
68033
|
+
InputMapping?: string;
|
|
68034
|
+
|
|
68035
|
+
@Field({nullable: true, description: `JSON mapping describing how the structured output payload writes back (to fields, a child record, or tags)`})
|
|
68036
|
+
OutputMapping?: string;
|
|
68037
|
+
|
|
68038
|
+
@Field(() => Boolean, {description: `When 1, records whose watermark indicates no change since the last run are skipped`})
|
|
68039
|
+
SkipUnchanged: boolean;
|
|
68040
|
+
|
|
68041
|
+
@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`})
|
|
68042
|
+
@MaxLength(20)
|
|
68043
|
+
WatermarkStrategy?: string;
|
|
68044
|
+
|
|
68045
|
+
@Field(() => Int, {nullable: true, description: `Number of records processed per batch (default 100)`})
|
|
68046
|
+
BatchSize?: number;
|
|
68047
|
+
|
|
68048
|
+
@Field(() => Int, {nullable: true, description: `Maximum number of records processed concurrently within a batch (default 1)`})
|
|
68049
|
+
MaxConcurrency?: number;
|
|
68050
|
+
|
|
68051
|
+
@Field()
|
|
68052
|
+
_mj__CreatedAt: Date;
|
|
68053
|
+
|
|
68054
|
+
@Field()
|
|
68055
|
+
_mj__UpdatedAt: Date;
|
|
68056
|
+
|
|
68057
|
+
@Field({nullable: true})
|
|
68058
|
+
@MaxLength(255)
|
|
68059
|
+
Category?: string;
|
|
68060
|
+
|
|
68061
|
+
@Field()
|
|
68062
|
+
@MaxLength(255)
|
|
68063
|
+
Entity: string;
|
|
68064
|
+
|
|
68065
|
+
@Field({nullable: true})
|
|
68066
|
+
@MaxLength(425)
|
|
68067
|
+
Action?: string;
|
|
68068
|
+
|
|
68069
|
+
@Field({nullable: true})
|
|
68070
|
+
@MaxLength(255)
|
|
68071
|
+
Agent?: string;
|
|
68072
|
+
|
|
68073
|
+
@Field({nullable: true})
|
|
68074
|
+
@MaxLength(255)
|
|
68075
|
+
Prompt?: string;
|
|
68076
|
+
|
|
68077
|
+
@Field({nullable: true})
|
|
68078
|
+
@MaxLength(100)
|
|
68079
|
+
ScopeView?: string;
|
|
68080
|
+
|
|
68081
|
+
@Field({nullable: true})
|
|
68082
|
+
@MaxLength(100)
|
|
68083
|
+
ScopeList?: string;
|
|
68084
|
+
|
|
68085
|
+
@Field(() => [MJRecordProcessWatermark_])
|
|
68086
|
+
MJRecordProcessWatermarks_RecordProcessIDArray: MJRecordProcessWatermark_[]; // Link to MJRecordProcessWatermarks
|
|
68087
|
+
|
|
68088
|
+
@Field(() => [MJProcessRun_])
|
|
68089
|
+
MJProcessRuns_RecordProcessIDArray: MJProcessRun_[]; // Link to MJProcessRuns
|
|
68090
|
+
|
|
68091
|
+
}
|
|
68092
|
+
|
|
68093
|
+
//****************************************************************************
|
|
68094
|
+
// INPUT TYPE for MJ: Record Processes
|
|
68095
|
+
//****************************************************************************
|
|
68096
|
+
@InputType()
|
|
68097
|
+
export class CreateMJRecordProcessInput {
|
|
68098
|
+
@Field({ nullable: true })
|
|
68099
|
+
ID?: string;
|
|
68100
|
+
|
|
68101
|
+
@Field({ nullable: true })
|
|
68102
|
+
Name?: string;
|
|
68103
|
+
|
|
68104
|
+
@Field({ nullable: true })
|
|
68105
|
+
Description: string | null;
|
|
68106
|
+
|
|
68107
|
+
@Field({ nullable: true })
|
|
68108
|
+
CategoryID: string | null;
|
|
68109
|
+
|
|
68110
|
+
@Field({ nullable: true })
|
|
68111
|
+
EntityID?: string;
|
|
68112
|
+
|
|
68113
|
+
@Field({ nullable: true })
|
|
68114
|
+
Status?: string;
|
|
68115
|
+
|
|
68116
|
+
@Field({ nullable: true })
|
|
68117
|
+
WorkType?: string;
|
|
68118
|
+
|
|
68119
|
+
@Field({ nullable: true })
|
|
68120
|
+
ActionID: string | null;
|
|
68121
|
+
|
|
68122
|
+
@Field({ nullable: true })
|
|
68123
|
+
AgentID: string | null;
|
|
68124
|
+
|
|
68125
|
+
@Field({ nullable: true })
|
|
68126
|
+
PromptID: string | null;
|
|
68127
|
+
|
|
68128
|
+
@Field({ nullable: true })
|
|
68129
|
+
ScopeType?: string;
|
|
68130
|
+
|
|
68131
|
+
@Field({ nullable: true })
|
|
68132
|
+
ScopeViewID: string | null;
|
|
68133
|
+
|
|
68134
|
+
@Field({ nullable: true })
|
|
68135
|
+
ScopeListID: string | null;
|
|
68136
|
+
|
|
68137
|
+
@Field({ nullable: true })
|
|
68138
|
+
ScopeFilter: string | null;
|
|
68139
|
+
|
|
68140
|
+
@Field(() => Boolean, { nullable: true })
|
|
68141
|
+
OnChangeEnabled?: boolean;
|
|
68142
|
+
|
|
68143
|
+
@Field({ nullable: true })
|
|
68144
|
+
OnChangeInvocationType: string | null;
|
|
68145
|
+
|
|
68146
|
+
@Field({ nullable: true })
|
|
68147
|
+
OnChangeFilter: string | null;
|
|
68148
|
+
|
|
68149
|
+
@Field(() => Boolean, { nullable: true })
|
|
68150
|
+
ScheduleEnabled?: boolean;
|
|
68151
|
+
|
|
68152
|
+
@Field({ nullable: true })
|
|
68153
|
+
CronExpression: string | null;
|
|
68154
|
+
|
|
68155
|
+
@Field({ nullable: true })
|
|
68156
|
+
Timezone?: string | null;
|
|
68157
|
+
|
|
68158
|
+
@Field(() => Boolean, { nullable: true })
|
|
68159
|
+
OnDemandEnabled?: boolean;
|
|
68160
|
+
|
|
68161
|
+
@Field({ nullable: true })
|
|
68162
|
+
InputMapping: string | null;
|
|
68163
|
+
|
|
68164
|
+
@Field({ nullable: true })
|
|
68165
|
+
OutputMapping: string | null;
|
|
68166
|
+
|
|
68167
|
+
@Field(() => Boolean, { nullable: true })
|
|
68168
|
+
SkipUnchanged?: boolean;
|
|
68169
|
+
|
|
68170
|
+
@Field({ nullable: true })
|
|
68171
|
+
WatermarkStrategy: string | null;
|
|
68172
|
+
|
|
68173
|
+
@Field(() => Int, { nullable: true })
|
|
68174
|
+
BatchSize?: number | null;
|
|
68175
|
+
|
|
68176
|
+
@Field(() => Int, { nullable: true })
|
|
68177
|
+
MaxConcurrency?: number | null;
|
|
68178
|
+
|
|
68179
|
+
@Field(() => RestoreContextInput, { nullable: true })
|
|
68180
|
+
RestoreContext___?: RestoreContextInput;
|
|
68181
|
+
}
|
|
68182
|
+
|
|
68183
|
+
|
|
68184
|
+
//****************************************************************************
|
|
68185
|
+
// INPUT TYPE for MJ: Record Processes
|
|
68186
|
+
//****************************************************************************
|
|
68187
|
+
@InputType()
|
|
68188
|
+
export class UpdateMJRecordProcessInput {
|
|
68189
|
+
@Field()
|
|
68190
|
+
ID: string;
|
|
68191
|
+
|
|
68192
|
+
@Field({ nullable: true })
|
|
68193
|
+
Name?: string;
|
|
68194
|
+
|
|
68195
|
+
@Field({ nullable: true })
|
|
68196
|
+
Description?: string | null;
|
|
68197
|
+
|
|
68198
|
+
@Field({ nullable: true })
|
|
68199
|
+
CategoryID?: string | null;
|
|
68200
|
+
|
|
68201
|
+
@Field({ nullable: true })
|
|
68202
|
+
EntityID?: string;
|
|
68203
|
+
|
|
68204
|
+
@Field({ nullable: true })
|
|
68205
|
+
Status?: string;
|
|
68206
|
+
|
|
68207
|
+
@Field({ nullable: true })
|
|
68208
|
+
WorkType?: string;
|
|
68209
|
+
|
|
68210
|
+
@Field({ nullable: true })
|
|
68211
|
+
ActionID?: string | null;
|
|
68212
|
+
|
|
68213
|
+
@Field({ nullable: true })
|
|
68214
|
+
AgentID?: string | null;
|
|
68215
|
+
|
|
68216
|
+
@Field({ nullable: true })
|
|
68217
|
+
PromptID?: string | null;
|
|
68218
|
+
|
|
68219
|
+
@Field({ nullable: true })
|
|
68220
|
+
ScopeType?: string;
|
|
68221
|
+
|
|
68222
|
+
@Field({ nullable: true })
|
|
68223
|
+
ScopeViewID?: string | null;
|
|
68224
|
+
|
|
68225
|
+
@Field({ nullable: true })
|
|
68226
|
+
ScopeListID?: string | null;
|
|
68227
|
+
|
|
68228
|
+
@Field({ nullable: true })
|
|
68229
|
+
ScopeFilter?: string | null;
|
|
68230
|
+
|
|
68231
|
+
@Field(() => Boolean, { nullable: true })
|
|
68232
|
+
OnChangeEnabled?: boolean;
|
|
68233
|
+
|
|
68234
|
+
@Field({ nullable: true })
|
|
68235
|
+
OnChangeInvocationType?: string | null;
|
|
68236
|
+
|
|
68237
|
+
@Field({ nullable: true })
|
|
68238
|
+
OnChangeFilter?: string | null;
|
|
68239
|
+
|
|
68240
|
+
@Field(() => Boolean, { nullable: true })
|
|
68241
|
+
ScheduleEnabled?: boolean;
|
|
68242
|
+
|
|
68243
|
+
@Field({ nullable: true })
|
|
68244
|
+
CronExpression?: string | null;
|
|
68245
|
+
|
|
68246
|
+
@Field({ nullable: true })
|
|
68247
|
+
Timezone?: string | null;
|
|
68248
|
+
|
|
68249
|
+
@Field(() => Boolean, { nullable: true })
|
|
68250
|
+
OnDemandEnabled?: boolean;
|
|
68251
|
+
|
|
68252
|
+
@Field({ nullable: true })
|
|
68253
|
+
InputMapping?: string | null;
|
|
68254
|
+
|
|
68255
|
+
@Field({ nullable: true })
|
|
68256
|
+
OutputMapping?: string | null;
|
|
68257
|
+
|
|
68258
|
+
@Field(() => Boolean, { nullable: true })
|
|
68259
|
+
SkipUnchanged?: boolean;
|
|
68260
|
+
|
|
68261
|
+
@Field({ nullable: true })
|
|
68262
|
+
WatermarkStrategy?: string | null;
|
|
68263
|
+
|
|
68264
|
+
@Field(() => Int, { nullable: true })
|
|
68265
|
+
BatchSize?: number | null;
|
|
68266
|
+
|
|
68267
|
+
@Field(() => Int, { nullable: true })
|
|
68268
|
+
MaxConcurrency?: number | null;
|
|
68269
|
+
|
|
68270
|
+
@Field(() => [KeyValuePairInput], { nullable: true })
|
|
68271
|
+
OldValues___?: KeyValuePairInput[];
|
|
68272
|
+
|
|
68273
|
+
@Field(() => RestoreContextInput, { nullable: true })
|
|
68274
|
+
RestoreContext___?: RestoreContextInput;
|
|
68275
|
+
}
|
|
68276
|
+
|
|
68277
|
+
//****************************************************************************
|
|
68278
|
+
// RESOLVER for MJ: Record Processes
|
|
68279
|
+
//****************************************************************************
|
|
68280
|
+
@ObjectType()
|
|
68281
|
+
export class RunMJRecordProcessViewResult {
|
|
68282
|
+
@Field(() => [MJRecordProcess_])
|
|
68283
|
+
Results: MJRecordProcess_[];
|
|
68284
|
+
|
|
68285
|
+
@Field(() => String, {nullable: true})
|
|
68286
|
+
UserViewRunID?: string;
|
|
68287
|
+
|
|
68288
|
+
@Field(() => Int, {nullable: true})
|
|
68289
|
+
RowCount: number;
|
|
68290
|
+
|
|
68291
|
+
@Field(() => Int, {nullable: true})
|
|
68292
|
+
TotalRowCount: number;
|
|
68293
|
+
|
|
68294
|
+
@Field(() => Int, {nullable: true})
|
|
68295
|
+
ExecutionTime: number;
|
|
68296
|
+
|
|
68297
|
+
@Field({nullable: true})
|
|
68298
|
+
ErrorMessage?: string;
|
|
68299
|
+
|
|
68300
|
+
@Field(() => Boolean, {nullable: false})
|
|
68301
|
+
Success: boolean;
|
|
68302
|
+
}
|
|
68303
|
+
|
|
68304
|
+
@Resolver(MJRecordProcess_)
|
|
68305
|
+
export class MJRecordProcessResolver extends ResolverBase {
|
|
68306
|
+
@Query(() => RunMJRecordProcessViewResult)
|
|
68307
|
+
async RunMJRecordProcessViewByID(@Arg('input', () => RunViewByIDInput) input: RunViewByIDInput, @Ctx() { providers, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
68308
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
68309
|
+
return super.RunViewByIDGeneric(input, provider, userPayload, pubSub);
|
|
68310
|
+
}
|
|
68311
|
+
|
|
68312
|
+
@Query(() => RunMJRecordProcessViewResult)
|
|
68313
|
+
async RunMJRecordProcessViewByName(@Arg('input', () => RunViewByNameInput) input: RunViewByNameInput, @Ctx() { providers, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
68314
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
68315
|
+
return super.RunViewByNameGeneric(input, provider, userPayload, pubSub);
|
|
68316
|
+
}
|
|
68317
|
+
|
|
68318
|
+
@Query(() => RunMJRecordProcessViewResult)
|
|
68319
|
+
async RunMJRecordProcessDynamicView(@Arg('input', () => RunDynamicViewInput) input: RunDynamicViewInput, @Ctx() { providers, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
68320
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
68321
|
+
input.EntityName = 'MJ: Record Processes';
|
|
68322
|
+
return super.RunDynamicViewGeneric(input, provider, userPayload, pubSub);
|
|
68323
|
+
}
|
|
68324
|
+
@Query(() => MJRecordProcess_, { nullable: true })
|
|
68325
|
+
async MJRecordProcess(@Arg('ID', () => String) ID: string, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine): Promise<MJRecordProcess_ | null> {
|
|
68326
|
+
this.CheckUserReadPermissions('MJ: Record Processes', userPayload);
|
|
68327
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
68328
|
+
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');
|
|
68329
|
+
const rows = await provider.ExecuteSQL(sSQL, [ID], undefined, this.GetUserFromPayload(userPayload));
|
|
68330
|
+
const result = await this.MapFieldNamesToCodeNames('MJ: Record Processes', rows && rows.length > 0 ? rows[0] : null, this.GetUserFromPayload(userPayload));
|
|
68331
|
+
return result;
|
|
68332
|
+
}
|
|
68333
|
+
|
|
68334
|
+
@FieldResolver(() => [MJRecordProcessWatermark_])
|
|
68335
|
+
async MJRecordProcessWatermarks_RecordProcessIDArray(@Root() mjrecordprocess_: MJRecordProcess_, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
68336
|
+
this.CheckUserReadPermissions('MJ: Record Process Watermarks', userPayload);
|
|
68337
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
68338
|
+
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');
|
|
68339
|
+
const rows = await provider.ExecuteSQL(sSQL, [mjrecordprocess_.ID], undefined, this.GetUserFromPayload(userPayload));
|
|
68340
|
+
const result = await this.ArrayMapFieldNamesToCodeNames('MJ: Record Process Watermarks', rows, this.GetUserFromPayload(userPayload));
|
|
68341
|
+
return result;
|
|
68342
|
+
}
|
|
68343
|
+
|
|
68344
|
+
@FieldResolver(() => [MJProcessRun_])
|
|
68345
|
+
async MJProcessRuns_RecordProcessIDArray(@Root() mjrecordprocess_: MJRecordProcess_, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
68346
|
+
this.CheckUserReadPermissions('MJ: Process Runs', userPayload);
|
|
68347
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
68348
|
+
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');
|
|
68349
|
+
const rows = await provider.ExecuteSQL(sSQL, [mjrecordprocess_.ID], undefined, this.GetUserFromPayload(userPayload));
|
|
68350
|
+
const result = await this.ArrayMapFieldNamesToCodeNames('MJ: Process Runs', rows, this.GetUserFromPayload(userPayload));
|
|
68351
|
+
return result;
|
|
68352
|
+
}
|
|
68353
|
+
|
|
68354
|
+
@Mutation(() => MJRecordProcess_)
|
|
68355
|
+
async CreateMJRecordProcess(
|
|
68356
|
+
@Arg('input', () => CreateMJRecordProcessInput) input: CreateMJRecordProcessInput,
|
|
68357
|
+
@Ctx() { providers, userPayload }: AppContext,
|
|
68358
|
+
@PubSub() pubSub: PubSubEngine
|
|
68359
|
+
) {
|
|
68360
|
+
const provider = GetReadWriteProvider(providers);
|
|
68361
|
+
return this.CreateRecord('MJ: Record Processes', input, provider, userPayload, pubSub)
|
|
68362
|
+
}
|
|
68363
|
+
|
|
68364
|
+
@Mutation(() => MJRecordProcess_)
|
|
68365
|
+
async UpdateMJRecordProcess(
|
|
68366
|
+
@Arg('input', () => UpdateMJRecordProcessInput) input: UpdateMJRecordProcessInput,
|
|
68367
|
+
@Ctx() { providers, userPayload }: AppContext,
|
|
68368
|
+
@PubSub() pubSub: PubSubEngine
|
|
68369
|
+
) {
|
|
68370
|
+
const provider = GetReadWriteProvider(providers);
|
|
68371
|
+
return this.UpdateRecord('MJ: Record Processes', input, provider, userPayload, pubSub);
|
|
68372
|
+
}
|
|
68373
|
+
|
|
68374
|
+
@Mutation(() => MJRecordProcess_)
|
|
68375
|
+
async DeleteMJRecordProcess(@Arg('ID', () => String) ID: string, @Arg('options___', () => DeleteOptionsInput) options: DeleteOptionsInput, @Ctx() { providers, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
68376
|
+
const provider = GetReadWriteProvider(providers);
|
|
68377
|
+
const key = new CompositeKey([{FieldName: 'ID', Value: ID}]);
|
|
68378
|
+
return this.DeleteRecord('MJ: Record Processes', key, options, provider, userPayload, pubSub);
|
|
68379
|
+
}
|
|
68380
|
+
|
|
68381
|
+
}
|
|
68382
|
+
|
|
68383
|
+
//****************************************************************************
|
|
68384
|
+
// ENTITY CLASS for MJ: Remote Operation Categories
|
|
68385
|
+
//****************************************************************************
|
|
68386
|
+
@ObjectType({ description: `Hierarchical folder for organizing Remote Operations in the UI. Example: "Record Processes" with a child category "Control" holding RunNow / Pause / Cancel.` })
|
|
68387
|
+
export class MJRemoteOperationCategory_ {
|
|
68388
|
+
@Field()
|
|
68389
|
+
@MaxLength(36)
|
|
68390
|
+
ID: string;
|
|
68391
|
+
|
|
68392
|
+
@Field({description: `Display name of the category`})
|
|
68393
|
+
@MaxLength(255)
|
|
68394
|
+
Name: string;
|
|
68395
|
+
|
|
68396
|
+
@Field({nullable: true, description: `Optional description of what belongs in this category`})
|
|
68397
|
+
Description?: string;
|
|
68398
|
+
|
|
68399
|
+
@Field({nullable: true, description: `Self-referencing foreign key to the parent category, enabling a nested folder hierarchy (NULL for a top-level category)`})
|
|
68400
|
+
@MaxLength(36)
|
|
68401
|
+
ParentID?: string;
|
|
68402
|
+
|
|
68403
|
+
@Field()
|
|
68404
|
+
_mj__CreatedAt: Date;
|
|
68405
|
+
|
|
68406
|
+
@Field()
|
|
68407
|
+
_mj__UpdatedAt: Date;
|
|
68408
|
+
|
|
68409
|
+
@Field({nullable: true})
|
|
68410
|
+
@MaxLength(255)
|
|
68411
|
+
Parent?: string;
|
|
68412
|
+
|
|
68413
|
+
@Field({nullable: true})
|
|
68414
|
+
@MaxLength(36)
|
|
68415
|
+
RootParentID?: string;
|
|
68416
|
+
|
|
68417
|
+
@Field(() => [MJRemoteOperationCategory_])
|
|
68418
|
+
MJRemoteOperationCategories_ParentIDArray: MJRemoteOperationCategory_[]; // Link to MJRemoteOperationCategories
|
|
68419
|
+
|
|
68420
|
+
@Field(() => [MJRemoteOperation_])
|
|
68421
|
+
MJRemoteOperations_CategoryIDArray: MJRemoteOperation_[]; // Link to MJRemoteOperations
|
|
68422
|
+
|
|
68423
|
+
}
|
|
68424
|
+
|
|
68425
|
+
//****************************************************************************
|
|
68426
|
+
// INPUT TYPE for MJ: Remote Operation Categories
|
|
68427
|
+
//****************************************************************************
|
|
68428
|
+
@InputType()
|
|
68429
|
+
export class CreateMJRemoteOperationCategoryInput {
|
|
68430
|
+
@Field({ nullable: true })
|
|
68431
|
+
ID?: string;
|
|
68432
|
+
|
|
68433
|
+
@Field({ nullable: true })
|
|
68434
|
+
Name?: string;
|
|
68435
|
+
|
|
68436
|
+
@Field({ nullable: true })
|
|
68437
|
+
Description: string | null;
|
|
68438
|
+
|
|
68439
|
+
@Field({ nullable: true })
|
|
68440
|
+
ParentID: string | null;
|
|
68441
|
+
|
|
68442
|
+
@Field(() => RestoreContextInput, { nullable: true })
|
|
68443
|
+
RestoreContext___?: RestoreContextInput;
|
|
68444
|
+
}
|
|
68445
|
+
|
|
68446
|
+
|
|
68447
|
+
//****************************************************************************
|
|
68448
|
+
// INPUT TYPE for MJ: Remote Operation Categories
|
|
68449
|
+
//****************************************************************************
|
|
68450
|
+
@InputType()
|
|
68451
|
+
export class UpdateMJRemoteOperationCategoryInput {
|
|
68452
|
+
@Field()
|
|
68453
|
+
ID: string;
|
|
68454
|
+
|
|
68455
|
+
@Field({ nullable: true })
|
|
68456
|
+
Name?: string;
|
|
68457
|
+
|
|
68458
|
+
@Field({ nullable: true })
|
|
68459
|
+
Description?: string | null;
|
|
68460
|
+
|
|
68461
|
+
@Field({ nullable: true })
|
|
68462
|
+
ParentID?: string | null;
|
|
68463
|
+
|
|
68464
|
+
@Field(() => [KeyValuePairInput], { nullable: true })
|
|
68465
|
+
OldValues___?: KeyValuePairInput[];
|
|
68466
|
+
|
|
68467
|
+
@Field(() => RestoreContextInput, { nullable: true })
|
|
68468
|
+
RestoreContext___?: RestoreContextInput;
|
|
68469
|
+
}
|
|
68470
|
+
|
|
68471
|
+
//****************************************************************************
|
|
68472
|
+
// RESOLVER for MJ: Remote Operation Categories
|
|
68473
|
+
//****************************************************************************
|
|
68474
|
+
@ObjectType()
|
|
68475
|
+
export class RunMJRemoteOperationCategoryViewResult {
|
|
68476
|
+
@Field(() => [MJRemoteOperationCategory_])
|
|
68477
|
+
Results: MJRemoteOperationCategory_[];
|
|
68478
|
+
|
|
68479
|
+
@Field(() => String, {nullable: true})
|
|
68480
|
+
UserViewRunID?: string;
|
|
68481
|
+
|
|
68482
|
+
@Field(() => Int, {nullable: true})
|
|
68483
|
+
RowCount: number;
|
|
68484
|
+
|
|
68485
|
+
@Field(() => Int, {nullable: true})
|
|
68486
|
+
TotalRowCount: number;
|
|
68487
|
+
|
|
68488
|
+
@Field(() => Int, {nullable: true})
|
|
68489
|
+
ExecutionTime: number;
|
|
68490
|
+
|
|
68491
|
+
@Field({nullable: true})
|
|
68492
|
+
ErrorMessage?: string;
|
|
68493
|
+
|
|
68494
|
+
@Field(() => Boolean, {nullable: false})
|
|
68495
|
+
Success: boolean;
|
|
68496
|
+
}
|
|
68497
|
+
|
|
68498
|
+
@Resolver(MJRemoteOperationCategory_)
|
|
68499
|
+
export class MJRemoteOperationCategoryResolver extends ResolverBase {
|
|
68500
|
+
@Query(() => RunMJRemoteOperationCategoryViewResult)
|
|
68501
|
+
async RunMJRemoteOperationCategoryViewByID(@Arg('input', () => RunViewByIDInput) input: RunViewByIDInput, @Ctx() { providers, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
68502
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
68503
|
+
return super.RunViewByIDGeneric(input, provider, userPayload, pubSub);
|
|
68504
|
+
}
|
|
68505
|
+
|
|
68506
|
+
@Query(() => RunMJRemoteOperationCategoryViewResult)
|
|
68507
|
+
async RunMJRemoteOperationCategoryViewByName(@Arg('input', () => RunViewByNameInput) input: RunViewByNameInput, @Ctx() { providers, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
68508
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
68509
|
+
return super.RunViewByNameGeneric(input, provider, userPayload, pubSub);
|
|
68510
|
+
}
|
|
68511
|
+
|
|
68512
|
+
@Query(() => RunMJRemoteOperationCategoryViewResult)
|
|
68513
|
+
async RunMJRemoteOperationCategoryDynamicView(@Arg('input', () => RunDynamicViewInput) input: RunDynamicViewInput, @Ctx() { providers, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
68514
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
68515
|
+
input.EntityName = 'MJ: Remote Operation Categories';
|
|
68516
|
+
return super.RunDynamicViewGeneric(input, provider, userPayload, pubSub);
|
|
68517
|
+
}
|
|
68518
|
+
@Query(() => MJRemoteOperationCategory_, { nullable: true })
|
|
68519
|
+
async MJRemoteOperationCategory(@Arg('ID', () => String) ID: string, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine): Promise<MJRemoteOperationCategory_ | null> {
|
|
68520
|
+
this.CheckUserReadPermissions('MJ: Remote Operation Categories', userPayload);
|
|
68521
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
68522
|
+
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');
|
|
68523
|
+
const rows = await provider.ExecuteSQL(sSQL, [ID], undefined, this.GetUserFromPayload(userPayload));
|
|
68524
|
+
const result = await this.MapFieldNamesToCodeNames('MJ: Remote Operation Categories', rows && rows.length > 0 ? rows[0] : null, this.GetUserFromPayload(userPayload));
|
|
68525
|
+
return result;
|
|
68526
|
+
}
|
|
68527
|
+
|
|
68528
|
+
@FieldResolver(() => [MJRemoteOperationCategory_])
|
|
68529
|
+
async MJRemoteOperationCategories_ParentIDArray(@Root() mjremoteoperationcategory_: MJRemoteOperationCategory_, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
68530
|
+
this.CheckUserReadPermissions('MJ: Remote Operation Categories', userPayload);
|
|
68531
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
68532
|
+
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');
|
|
68533
|
+
const rows = await provider.ExecuteSQL(sSQL, [mjremoteoperationcategory_.ID], undefined, this.GetUserFromPayload(userPayload));
|
|
68534
|
+
const result = await this.ArrayMapFieldNamesToCodeNames('MJ: Remote Operation Categories', rows, this.GetUserFromPayload(userPayload));
|
|
68535
|
+
return result;
|
|
68536
|
+
}
|
|
68537
|
+
|
|
68538
|
+
@FieldResolver(() => [MJRemoteOperation_])
|
|
68539
|
+
async MJRemoteOperations_CategoryIDArray(@Root() mjremoteoperationcategory_: MJRemoteOperationCategory_, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
68540
|
+
this.CheckUserReadPermissions('MJ: Remote Operations', userPayload);
|
|
68541
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
68542
|
+
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');
|
|
68543
|
+
const rows = await provider.ExecuteSQL(sSQL, [mjremoteoperationcategory_.ID], undefined, this.GetUserFromPayload(userPayload));
|
|
68544
|
+
const result = await this.ArrayMapFieldNamesToCodeNames('MJ: Remote Operations', rows, this.GetUserFromPayload(userPayload));
|
|
68545
|
+
return result;
|
|
68546
|
+
}
|
|
68547
|
+
|
|
68548
|
+
@Mutation(() => MJRemoteOperationCategory_)
|
|
68549
|
+
async CreateMJRemoteOperationCategory(
|
|
68550
|
+
@Arg('input', () => CreateMJRemoteOperationCategoryInput) input: CreateMJRemoteOperationCategoryInput,
|
|
68551
|
+
@Ctx() { providers, userPayload }: AppContext,
|
|
68552
|
+
@PubSub() pubSub: PubSubEngine
|
|
68553
|
+
) {
|
|
68554
|
+
const provider = GetReadWriteProvider(providers);
|
|
68555
|
+
return this.CreateRecord('MJ: Remote Operation Categories', input, provider, userPayload, pubSub)
|
|
68556
|
+
}
|
|
68557
|
+
|
|
68558
|
+
@Mutation(() => MJRemoteOperationCategory_)
|
|
68559
|
+
async UpdateMJRemoteOperationCategory(
|
|
68560
|
+
@Arg('input', () => UpdateMJRemoteOperationCategoryInput) input: UpdateMJRemoteOperationCategoryInput,
|
|
68561
|
+
@Ctx() { providers, userPayload }: AppContext,
|
|
68562
|
+
@PubSub() pubSub: PubSubEngine
|
|
68563
|
+
) {
|
|
68564
|
+
const provider = GetReadWriteProvider(providers);
|
|
68565
|
+
return this.UpdateRecord('MJ: Remote Operation Categories', input, provider, userPayload, pubSub);
|
|
68566
|
+
}
|
|
68567
|
+
|
|
68568
|
+
@Mutation(() => MJRemoteOperationCategory_)
|
|
68569
|
+
async DeleteMJRemoteOperationCategory(@Arg('ID', () => String) ID: string, @Arg('options___', () => DeleteOptionsInput) options: DeleteOptionsInput, @Ctx() { providers, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
68570
|
+
const provider = GetReadWriteProvider(providers);
|
|
68571
|
+
const key = new CompositeKey([{FieldName: 'ID', Value: ID}]);
|
|
68572
|
+
return this.DeleteRecord('MJ: Remote Operation Categories', key, options, provider, userPayload, pubSub);
|
|
68573
|
+
}
|
|
68574
|
+
|
|
68575
|
+
}
|
|
68576
|
+
|
|
68577
|
+
//****************************************************************************
|
|
68578
|
+
// ENTITY CLASS for MJ: Remote Operations
|
|
68579
|
+
//****************************************************************************
|
|
68580
|
+
@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.` })
|
|
68581
|
+
export class MJRemoteOperation_ {
|
|
68582
|
+
@Field()
|
|
68583
|
+
@MaxLength(36)
|
|
68584
|
+
ID: string;
|
|
68585
|
+
|
|
68586
|
+
@Field({description: `Human-readable name of the operation`})
|
|
68587
|
+
@MaxLength(255)
|
|
68588
|
+
Name: string;
|
|
68589
|
+
|
|
68590
|
+
@Field({description: `Stable, unique registry key and wire token used to dispatch the operation (e.g., "RecordProcess.RunNow"). Namespaced by convention.`})
|
|
68591
|
+
@MaxLength(255)
|
|
68592
|
+
OperationKey: string;
|
|
68593
|
+
|
|
68594
|
+
@Field({nullable: true, description: `Optional hierarchical category for organizing this operation in the UI`})
|
|
68595
|
+
@MaxLength(36)
|
|
68596
|
+
CategoryID?: string;
|
|
68597
|
+
|
|
68598
|
+
@Field({nullable: true, description: `Human description of the operation; also the seed for AI-generated implementation code when GenerationType=AI`})
|
|
68599
|
+
Description?: string;
|
|
68600
|
+
|
|
68601
|
+
@Field({nullable: true, description: `TypeScript type name for the operation input (emitted by CodeGen as the TInput interface)`})
|
|
68602
|
+
@MaxLength(255)
|
|
68603
|
+
InputTypeName?: string;
|
|
68604
|
+
|
|
68605
|
+
@Field({nullable: true, description: `Raw TypeScript interface/type source defining the input shape (same mechanism as EntityField JSON-type definitions)`})
|
|
68606
|
+
InputTypeDefinition?: string;
|
|
68607
|
+
|
|
68608
|
+
@Field(() => Boolean, {description: `When 1, the input type is emitted as an array (TInput[])`})
|
|
68609
|
+
InputTypeIsArray: boolean;
|
|
68610
|
+
|
|
68611
|
+
@Field({nullable: true, description: `TypeScript type name for the operation output (emitted by CodeGen as the TOutput interface)`})
|
|
68612
|
+
@MaxLength(255)
|
|
68613
|
+
OutputTypeName?: string;
|
|
68614
|
+
|
|
68615
|
+
@Field({nullable: true, description: `Raw TypeScript interface/type source defining the output shape`})
|
|
68616
|
+
OutputTypeDefinition?: string;
|
|
68617
|
+
|
|
68618
|
+
@Field(() => Boolean, {description: `When 1, the output type is emitted as an array (TOutput[])`})
|
|
68619
|
+
OutputTypeIsArray: boolean;
|
|
68620
|
+
|
|
68621
|
+
@Field({description: `Sync (request/response) or LongRunning (returns a handle; supports detached and attached consumption)`})
|
|
68622
|
+
@MaxLength(20)
|
|
68623
|
+
ExecutionMode: string;
|
|
68624
|
+
|
|
68625
|
+
@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)`})
|
|
68626
|
+
@MaxLength(255)
|
|
68627
|
+
RequiredScope?: string;
|
|
68628
|
+
|
|
68629
|
+
@Field(() => Boolean, {description: `When 1, only the system user may invoke this operation`})
|
|
68630
|
+
RequiresSystemUser: boolean;
|
|
68631
|
+
|
|
68632
|
+
@Field({description: `How the server implementation is provided: Manual (hand-written subclass), AI (generated from Description), or Default (standard generated plumbing)`})
|
|
68633
|
+
@MaxLength(20)
|
|
68634
|
+
GenerationType: string;
|
|
68635
|
+
|
|
68636
|
+
@Field({nullable: true, description: `The AI-generated implementation body (when GenerationType=AI); regenerated only when Description changes`})
|
|
68637
|
+
Code?: string;
|
|
68638
|
+
|
|
68639
|
+
@Field({description: `Human approval gate for AI-generated code: Pending, Approved, or Rejected. Only Approved AI code is emitted and routable.`})
|
|
68640
|
+
@MaxLength(20)
|
|
68641
|
+
CodeApprovalStatus: string;
|
|
68642
|
+
|
|
68643
|
+
@Field({nullable: true, description: `Foreign key to the user who approved the generated code`})
|
|
68644
|
+
@MaxLength(36)
|
|
68645
|
+
CodeApprovedByUserID?: string;
|
|
68646
|
+
|
|
68647
|
+
@Field({nullable: true, description: `When the generated code was approved`})
|
|
68648
|
+
CodeApprovedAt?: Date;
|
|
68649
|
+
|
|
68650
|
+
@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`})
|
|
68651
|
+
@MaxLength(100)
|
|
68652
|
+
ContractFingerprint?: string;
|
|
68653
|
+
|
|
68654
|
+
@Field({description: `Lifecycle status: Active (routable), Disabled, or Pending. Only Active operations can be invoked.`})
|
|
68655
|
+
@MaxLength(20)
|
|
68656
|
+
Status: string;
|
|
68657
|
+
|
|
68658
|
+
@Field(() => Int, {nullable: true, description: `Optional result cache TTL in seconds (NULL = no caching)`})
|
|
68659
|
+
CacheTTLSeconds?: number;
|
|
68660
|
+
|
|
68661
|
+
@Field(() => Int, {nullable: true, description: `Optional execution timeout in milliseconds`})
|
|
68662
|
+
TimeoutMS?: number;
|
|
68663
|
+
|
|
68664
|
+
@Field(() => Int, {nullable: true, description: `Optional cap on concurrent executions of this operation`})
|
|
68665
|
+
MaxConcurrency?: number;
|
|
68666
|
+
|
|
68667
|
+
@Field()
|
|
68668
|
+
_mj__CreatedAt: Date;
|
|
68669
|
+
|
|
68670
|
+
@Field()
|
|
68671
|
+
_mj__UpdatedAt: Date;
|
|
68672
|
+
|
|
68673
|
+
@Field({nullable: true})
|
|
68674
|
+
@MaxLength(255)
|
|
68675
|
+
Category?: string;
|
|
68676
|
+
|
|
68677
|
+
@Field({nullable: true})
|
|
68678
|
+
@MaxLength(100)
|
|
68679
|
+
CodeApprovedByUser?: string;
|
|
68680
|
+
|
|
68681
|
+
}
|
|
68682
|
+
|
|
68683
|
+
//****************************************************************************
|
|
68684
|
+
// INPUT TYPE for MJ: Remote Operations
|
|
68685
|
+
//****************************************************************************
|
|
68686
|
+
@InputType()
|
|
68687
|
+
export class CreateMJRemoteOperationInput {
|
|
68688
|
+
@Field({ nullable: true })
|
|
68689
|
+
ID?: string;
|
|
68690
|
+
|
|
68691
|
+
@Field({ nullable: true })
|
|
68692
|
+
Name?: string;
|
|
68693
|
+
|
|
68694
|
+
@Field({ nullable: true })
|
|
68695
|
+
OperationKey?: string;
|
|
68696
|
+
|
|
68697
|
+
@Field({ nullable: true })
|
|
68698
|
+
CategoryID: string | null;
|
|
68699
|
+
|
|
68700
|
+
@Field({ nullable: true })
|
|
68701
|
+
Description: string | null;
|
|
68702
|
+
|
|
68703
|
+
@Field({ nullable: true })
|
|
68704
|
+
InputTypeName: string | null;
|
|
68705
|
+
|
|
68706
|
+
@Field({ nullable: true })
|
|
68707
|
+
InputTypeDefinition: string | null;
|
|
68708
|
+
|
|
68709
|
+
@Field(() => Boolean, { nullable: true })
|
|
68710
|
+
InputTypeIsArray?: boolean;
|
|
68711
|
+
|
|
68712
|
+
@Field({ nullable: true })
|
|
68713
|
+
OutputTypeName: string | null;
|
|
68714
|
+
|
|
68715
|
+
@Field({ nullable: true })
|
|
68716
|
+
OutputTypeDefinition: string | null;
|
|
68717
|
+
|
|
68718
|
+
@Field(() => Boolean, { nullable: true })
|
|
68719
|
+
OutputTypeIsArray?: boolean;
|
|
68720
|
+
|
|
68721
|
+
@Field({ nullable: true })
|
|
68722
|
+
ExecutionMode?: string;
|
|
68723
|
+
|
|
68724
|
+
@Field({ nullable: true })
|
|
68725
|
+
RequiredScope: string | null;
|
|
68726
|
+
|
|
68727
|
+
@Field(() => Boolean, { nullable: true })
|
|
68728
|
+
RequiresSystemUser?: boolean;
|
|
68729
|
+
|
|
68730
|
+
@Field({ nullable: true })
|
|
68731
|
+
GenerationType?: string;
|
|
68732
|
+
|
|
68733
|
+
@Field({ nullable: true })
|
|
68734
|
+
Code: string | null;
|
|
68735
|
+
|
|
68736
|
+
@Field({ nullable: true })
|
|
68737
|
+
CodeApprovalStatus?: string;
|
|
68738
|
+
|
|
68739
|
+
@Field({ nullable: true })
|
|
68740
|
+
CodeApprovedByUserID: string | null;
|
|
68741
|
+
|
|
68742
|
+
@Field({ nullable: true })
|
|
68743
|
+
CodeApprovedAt: Date | null;
|
|
68744
|
+
|
|
68745
|
+
@Field({ nullable: true })
|
|
68746
|
+
ContractFingerprint: string | null;
|
|
68747
|
+
|
|
68748
|
+
@Field({ nullable: true })
|
|
68749
|
+
Status?: string;
|
|
68750
|
+
|
|
68751
|
+
@Field(() => Int, { nullable: true })
|
|
68752
|
+
CacheTTLSeconds: number | null;
|
|
68753
|
+
|
|
68754
|
+
@Field(() => Int, { nullable: true })
|
|
68755
|
+
TimeoutMS: number | null;
|
|
68756
|
+
|
|
68757
|
+
@Field(() => Int, { nullable: true })
|
|
68758
|
+
MaxConcurrency: number | null;
|
|
68759
|
+
|
|
68760
|
+
@Field(() => RestoreContextInput, { nullable: true })
|
|
68761
|
+
RestoreContext___?: RestoreContextInput;
|
|
68762
|
+
}
|
|
68763
|
+
|
|
68764
|
+
|
|
68765
|
+
//****************************************************************************
|
|
68766
|
+
// INPUT TYPE for MJ: Remote Operations
|
|
68767
|
+
//****************************************************************************
|
|
68768
|
+
@InputType()
|
|
68769
|
+
export class UpdateMJRemoteOperationInput {
|
|
68770
|
+
@Field()
|
|
68771
|
+
ID: string;
|
|
68772
|
+
|
|
68773
|
+
@Field({ nullable: true })
|
|
68774
|
+
Name?: string;
|
|
68775
|
+
|
|
68776
|
+
@Field({ nullable: true })
|
|
68777
|
+
OperationKey?: string;
|
|
68778
|
+
|
|
68779
|
+
@Field({ nullable: true })
|
|
68780
|
+
CategoryID?: string | null;
|
|
68781
|
+
|
|
68782
|
+
@Field({ nullable: true })
|
|
68783
|
+
Description?: string | null;
|
|
68784
|
+
|
|
68785
|
+
@Field({ nullable: true })
|
|
68786
|
+
InputTypeName?: string | null;
|
|
68787
|
+
|
|
68788
|
+
@Field({ nullable: true })
|
|
68789
|
+
InputTypeDefinition?: string | null;
|
|
68790
|
+
|
|
68791
|
+
@Field(() => Boolean, { nullable: true })
|
|
68792
|
+
InputTypeIsArray?: boolean;
|
|
68793
|
+
|
|
68794
|
+
@Field({ nullable: true })
|
|
68795
|
+
OutputTypeName?: string | null;
|
|
68796
|
+
|
|
68797
|
+
@Field({ nullable: true })
|
|
68798
|
+
OutputTypeDefinition?: string | null;
|
|
68799
|
+
|
|
68800
|
+
@Field(() => Boolean, { nullable: true })
|
|
68801
|
+
OutputTypeIsArray?: boolean;
|
|
68802
|
+
|
|
68803
|
+
@Field({ nullable: true })
|
|
68804
|
+
ExecutionMode?: string;
|
|
68805
|
+
|
|
68806
|
+
@Field({ nullable: true })
|
|
68807
|
+
RequiredScope?: string | null;
|
|
68808
|
+
|
|
68809
|
+
@Field(() => Boolean, { nullable: true })
|
|
68810
|
+
RequiresSystemUser?: boolean;
|
|
68811
|
+
|
|
68812
|
+
@Field({ nullable: true })
|
|
68813
|
+
GenerationType?: string;
|
|
68814
|
+
|
|
68815
|
+
@Field({ nullable: true })
|
|
68816
|
+
Code?: string | null;
|
|
68817
|
+
|
|
68818
|
+
@Field({ nullable: true })
|
|
68819
|
+
CodeApprovalStatus?: string;
|
|
68820
|
+
|
|
68821
|
+
@Field({ nullable: true })
|
|
68822
|
+
CodeApprovedByUserID?: string | null;
|
|
68823
|
+
|
|
68824
|
+
@Field({ nullable: true })
|
|
68825
|
+
CodeApprovedAt?: Date | null;
|
|
68826
|
+
|
|
68827
|
+
@Field({ nullable: true })
|
|
68828
|
+
ContractFingerprint?: string | null;
|
|
68829
|
+
|
|
68830
|
+
@Field({ nullable: true })
|
|
68831
|
+
Status?: string;
|
|
68832
|
+
|
|
68833
|
+
@Field(() => Int, { nullable: true })
|
|
68834
|
+
CacheTTLSeconds?: number | null;
|
|
68835
|
+
|
|
68836
|
+
@Field(() => Int, { nullable: true })
|
|
68837
|
+
TimeoutMS?: number | null;
|
|
68838
|
+
|
|
68839
|
+
@Field(() => Int, { nullable: true })
|
|
68840
|
+
MaxConcurrency?: number | null;
|
|
68841
|
+
|
|
68842
|
+
@Field(() => [KeyValuePairInput], { nullable: true })
|
|
68843
|
+
OldValues___?: KeyValuePairInput[];
|
|
68844
|
+
|
|
68845
|
+
@Field(() => RestoreContextInput, { nullable: true })
|
|
68846
|
+
RestoreContext___?: RestoreContextInput;
|
|
68847
|
+
}
|
|
68848
|
+
|
|
68849
|
+
//****************************************************************************
|
|
68850
|
+
// RESOLVER for MJ: Remote Operations
|
|
68851
|
+
//****************************************************************************
|
|
68852
|
+
@ObjectType()
|
|
68853
|
+
export class RunMJRemoteOperationViewResult {
|
|
68854
|
+
@Field(() => [MJRemoteOperation_])
|
|
68855
|
+
Results: MJRemoteOperation_[];
|
|
68856
|
+
|
|
68857
|
+
@Field(() => String, {nullable: true})
|
|
68858
|
+
UserViewRunID?: string;
|
|
68859
|
+
|
|
68860
|
+
@Field(() => Int, {nullable: true})
|
|
68861
|
+
RowCount: number;
|
|
68862
|
+
|
|
68863
|
+
@Field(() => Int, {nullable: true})
|
|
68864
|
+
TotalRowCount: number;
|
|
68865
|
+
|
|
68866
|
+
@Field(() => Int, {nullable: true})
|
|
68867
|
+
ExecutionTime: number;
|
|
68868
|
+
|
|
68869
|
+
@Field({nullable: true})
|
|
68870
|
+
ErrorMessage?: string;
|
|
68871
|
+
|
|
68872
|
+
@Field(() => Boolean, {nullable: false})
|
|
68873
|
+
Success: boolean;
|
|
68874
|
+
}
|
|
68875
|
+
|
|
68876
|
+
@Resolver(MJRemoteOperation_)
|
|
68877
|
+
export class MJRemoteOperationResolver extends ResolverBase {
|
|
68878
|
+
@Query(() => RunMJRemoteOperationViewResult)
|
|
68879
|
+
async RunMJRemoteOperationViewByID(@Arg('input', () => RunViewByIDInput) input: RunViewByIDInput, @Ctx() { providers, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
68880
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
68881
|
+
return super.RunViewByIDGeneric(input, provider, userPayload, pubSub);
|
|
68882
|
+
}
|
|
68883
|
+
|
|
68884
|
+
@Query(() => RunMJRemoteOperationViewResult)
|
|
68885
|
+
async RunMJRemoteOperationViewByName(@Arg('input', () => RunViewByNameInput) input: RunViewByNameInput, @Ctx() { providers, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
68886
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
68887
|
+
return super.RunViewByNameGeneric(input, provider, userPayload, pubSub);
|
|
68888
|
+
}
|
|
68889
|
+
|
|
68890
|
+
@Query(() => RunMJRemoteOperationViewResult)
|
|
68891
|
+
async RunMJRemoteOperationDynamicView(@Arg('input', () => RunDynamicViewInput) input: RunDynamicViewInput, @Ctx() { providers, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
68892
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
68893
|
+
input.EntityName = 'MJ: Remote Operations';
|
|
68894
|
+
return super.RunDynamicViewGeneric(input, provider, userPayload, pubSub);
|
|
68895
|
+
}
|
|
68896
|
+
@Query(() => MJRemoteOperation_, { nullable: true })
|
|
68897
|
+
async MJRemoteOperation(@Arg('ID', () => String) ID: string, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine): Promise<MJRemoteOperation_ | null> {
|
|
68898
|
+
this.CheckUserReadPermissions('MJ: Remote Operations', userPayload);
|
|
68899
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
68900
|
+
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');
|
|
68901
|
+
const rows = await provider.ExecuteSQL(sSQL, [ID], undefined, this.GetUserFromPayload(userPayload));
|
|
68902
|
+
const result = await this.MapFieldNamesToCodeNames('MJ: Remote Operations', rows && rows.length > 0 ? rows[0] : null, this.GetUserFromPayload(userPayload));
|
|
68903
|
+
return result;
|
|
68904
|
+
}
|
|
68905
|
+
|
|
68906
|
+
@Mutation(() => MJRemoteOperation_)
|
|
68907
|
+
async CreateMJRemoteOperation(
|
|
68908
|
+
@Arg('input', () => CreateMJRemoteOperationInput) input: CreateMJRemoteOperationInput,
|
|
68909
|
+
@Ctx() { providers, userPayload }: AppContext,
|
|
68910
|
+
@PubSub() pubSub: PubSubEngine
|
|
68911
|
+
) {
|
|
68912
|
+
const provider = GetReadWriteProvider(providers);
|
|
68913
|
+
return this.CreateRecord('MJ: Remote Operations', input, provider, userPayload, pubSub)
|
|
68914
|
+
}
|
|
68915
|
+
|
|
68916
|
+
@Mutation(() => MJRemoteOperation_)
|
|
68917
|
+
async UpdateMJRemoteOperation(
|
|
68918
|
+
@Arg('input', () => UpdateMJRemoteOperationInput) input: UpdateMJRemoteOperationInput,
|
|
68919
|
+
@Ctx() { providers, userPayload }: AppContext,
|
|
68920
|
+
@PubSub() pubSub: PubSubEngine
|
|
68921
|
+
) {
|
|
68922
|
+
const provider = GetReadWriteProvider(providers);
|
|
68923
|
+
return this.UpdateRecord('MJ: Remote Operations', input, provider, userPayload, pubSub);
|
|
68924
|
+
}
|
|
68925
|
+
|
|
68926
|
+
@Mutation(() => MJRemoteOperation_)
|
|
68927
|
+
async DeleteMJRemoteOperation(@Arg('ID', () => String) ID: string, @Arg('options___', () => DeleteOptionsInput) options: DeleteOptionsInput, @Ctx() { providers, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
68928
|
+
const provider = GetReadWriteProvider(providers);
|
|
68929
|
+
const key = new CompositeKey([{FieldName: 'ID', Value: ID}]);
|
|
68930
|
+
return this.DeleteRecord('MJ: Remote Operations', key, options, provider, userPayload, pubSub);
|
|
68931
|
+
}
|
|
68932
|
+
|
|
68933
|
+
}
|
|
68934
|
+
|
|
66748
68935
|
//****************************************************************************
|
|
66749
68936
|
// ENTITY CLASS for MJ: Report Categories
|
|
66750
68937
|
//****************************************************************************
|
|
@@ -69669,6 +71856,9 @@ export class MJScheduledJobRun_ {
|
|
|
69669
71856
|
@MaxLength(100)
|
|
69670
71857
|
ExecutedByUser?: string;
|
|
69671
71858
|
|
|
71859
|
+
@Field(() => [MJProcessRun_])
|
|
71860
|
+
MJProcessRuns_ScheduledJobRunIDArray: MJProcessRun_[]; // Link to MJProcessRuns
|
|
71861
|
+
|
|
69672
71862
|
@Field(() => [MJAIAgentRun_])
|
|
69673
71863
|
MJAIAgentRuns_ScheduledJobRunIDArray: MJAIAgentRun_[]; // Link to MJAIAgentRuns
|
|
69674
71864
|
|
|
@@ -69816,6 +72006,16 @@ export class MJScheduledJobRunResolver extends ResolverBase {
|
|
|
69816
72006
|
return result;
|
|
69817
72007
|
}
|
|
69818
72008
|
|
|
72009
|
+
@FieldResolver(() => [MJProcessRun_])
|
|
72010
|
+
async MJProcessRuns_ScheduledJobRunIDArray(@Root() mjscheduledjobrun_: MJScheduledJobRun_, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
72011
|
+
this.CheckUserReadPermissions('MJ: Process Runs', userPayload);
|
|
72012
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
72013
|
+
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');
|
|
72014
|
+
const rows = await provider.ExecuteSQL(sSQL, [mjscheduledjobrun_.ID], undefined, this.GetUserFromPayload(userPayload));
|
|
72015
|
+
const result = await this.ArrayMapFieldNamesToCodeNames('MJ: Process Runs', rows, this.GetUserFromPayload(userPayload));
|
|
72016
|
+
return result;
|
|
72017
|
+
}
|
|
72018
|
+
|
|
69819
72019
|
@FieldResolver(() => [MJAIAgentRun_])
|
|
69820
72020
|
async MJAIAgentRuns_ScheduledJobRunIDArray(@Root() mjscheduledjobrun_: MJScheduledJobRun_, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
69821
72021
|
this.CheckUserReadPermissions('MJ: AI Agent Runs', userPayload);
|
|
@@ -83255,6 +85455,9 @@ export class MJUserView_ {
|
|
|
83255
85455
|
@Field(() => [MJList_])
|
|
83256
85456
|
MJLists_SourceViewIDArray: MJList_[]; // Link to MJLists
|
|
83257
85457
|
|
|
85458
|
+
@Field(() => [MJRecordProcess_])
|
|
85459
|
+
MJRecordProcesses_ScopeViewIDArray: MJRecordProcess_[]; // Link to MJRecordProcesses
|
|
85460
|
+
|
|
83258
85461
|
}
|
|
83259
85462
|
|
|
83260
85463
|
//****************************************************************************
|
|
@@ -83518,6 +85721,16 @@ export class MJUserViewResolverBase extends ResolverBase {
|
|
|
83518
85721
|
return result;
|
|
83519
85722
|
}
|
|
83520
85723
|
|
|
85724
|
+
@FieldResolver(() => [MJRecordProcess_])
|
|
85725
|
+
async MJRecordProcesses_ScopeViewIDArray(@Root() mjuserview_: MJUserView_, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
85726
|
+
this.CheckUserReadPermissions('MJ: Record Processes', userPayload);
|
|
85727
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
85728
|
+
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');
|
|
85729
|
+
const rows = await provider.ExecuteSQL(sSQL, [mjuserview_.ID], undefined, this.GetUserFromPayload(userPayload));
|
|
85730
|
+
const result = await this.ArrayMapFieldNamesToCodeNames('MJ: Record Processes', rows, this.GetUserFromPayload(userPayload));
|
|
85731
|
+
return result;
|
|
85732
|
+
}
|
|
85733
|
+
|
|
83521
85734
|
@Mutation(() => MJUserView_)
|
|
83522
85735
|
async CreateMJUserView(
|
|
83523
85736
|
@Arg('input', () => CreateMJUserViewInput) input: CreateMJUserViewInput,
|
|
@@ -83945,6 +86158,12 @@ export class MJUser_ {
|
|
|
83945
86158
|
@Field(() => [MJAIAgentSessionBridgeParticipant_])
|
|
83946
86159
|
MJAIAgentSessionBridgeParticipants_UserIDArray: MJAIAgentSessionBridgeParticipant_[]; // Link to MJAIAgentSessionBridgeParticipants
|
|
83947
86160
|
|
|
86161
|
+
@Field(() => [MJRemoteOperation_])
|
|
86162
|
+
MJRemoteOperations_CodeApprovedByUserIDArray: MJRemoteOperation_[]; // Link to MJRemoteOperations
|
|
86163
|
+
|
|
86164
|
+
@Field(() => [MJProcessRun_])
|
|
86165
|
+
MJProcessRuns_StartedByUserIDArray: MJProcessRun_[]; // Link to MJProcessRuns
|
|
86166
|
+
|
|
83948
86167
|
}
|
|
83949
86168
|
|
|
83950
86169
|
//****************************************************************************
|
|
@@ -85150,6 +87369,26 @@ export class MJUserResolverBase extends ResolverBase {
|
|
|
85150
87369
|
return result;
|
|
85151
87370
|
}
|
|
85152
87371
|
|
|
87372
|
+
@FieldResolver(() => [MJRemoteOperation_])
|
|
87373
|
+
async MJRemoteOperations_CodeApprovedByUserIDArray(@Root() mjuser_: MJUser_, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
87374
|
+
this.CheckUserReadPermissions('MJ: Remote Operations', userPayload);
|
|
87375
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
87376
|
+
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');
|
|
87377
|
+
const rows = await provider.ExecuteSQL(sSQL, [mjuser_.ID], undefined, this.GetUserFromPayload(userPayload));
|
|
87378
|
+
const result = await this.ArrayMapFieldNamesToCodeNames('MJ: Remote Operations', rows, this.GetUserFromPayload(userPayload));
|
|
87379
|
+
return result;
|
|
87380
|
+
}
|
|
87381
|
+
|
|
87382
|
+
@FieldResolver(() => [MJProcessRun_])
|
|
87383
|
+
async MJProcessRuns_StartedByUserIDArray(@Root() mjuser_: MJUser_, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
87384
|
+
this.CheckUserReadPermissions('MJ: Process Runs', userPayload);
|
|
87385
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
87386
|
+
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');
|
|
87387
|
+
const rows = await provider.ExecuteSQL(sSQL, [mjuser_.ID], undefined, this.GetUserFromPayload(userPayload));
|
|
87388
|
+
const result = await this.ArrayMapFieldNamesToCodeNames('MJ: Process Runs', rows, this.GetUserFromPayload(userPayload));
|
|
87389
|
+
return result;
|
|
87390
|
+
}
|
|
87391
|
+
|
|
85153
87392
|
@Mutation(() => MJUser_)
|
|
85154
87393
|
async CreateMJUser(
|
|
85155
87394
|
@Arg('input', () => CreateMJUserInput) input: CreateMJUserInput,
|