@memberjunction/server 6.1.0-edge.0 → 6.1.0-edge.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/generated/generated.d.ts +163 -642
- package/dist/generated/generated.d.ts.map +1 -1
- package/dist/generated/generated.js +894 -3752
- package/dist/generated/generated.js.map +1 -1
- package/dist/index.d.ts +5 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +16 -2
- package/dist/index.js.map +1 -1
- package/dist/resolvers/TaskGraphFrameResolver.d.ts +85 -0
- package/dist/resolvers/TaskGraphFrameResolver.d.ts.map +1 -0
- package/dist/resolvers/TaskGraphFrameResolver.js +163 -0
- package/dist/resolvers/TaskGraphFrameResolver.js.map +1 -0
- package/dist/rest/RESTEndpointHandler.d.ts +0 -4
- package/dist/rest/RESTEndpointHandler.d.ts.map +1 -1
- package/dist/rest/RESTEndpointHandler.js +1 -15
- package/dist/rest/RESTEndpointHandler.js.map +1 -1
- package/dist/services/StartTaskGraphDispatcher.d.ts +33 -0
- package/dist/services/StartTaskGraphDispatcher.d.ts.map +1 -0
- package/dist/services/StartTaskGraphDispatcher.js +31 -0
- package/dist/services/StartTaskGraphDispatcher.js.map +1 -0
- package/dist/services/TaskGraphAgentRunner.d.ts +15 -0
- package/dist/services/TaskGraphAgentRunner.d.ts.map +1 -0
- package/dist/services/TaskGraphAgentRunner.js +74 -0
- package/dist/services/TaskGraphAgentRunner.js.map +1 -0
- package/dist/services/TaskGraphContinuationDeliverer.d.ts +70 -0
- package/dist/services/TaskGraphContinuationDeliverer.d.ts.map +1 -0
- package/dist/services/TaskGraphContinuationDeliverer.js +162 -0
- package/dist/services/TaskGraphContinuationDeliverer.js.map +1 -0
- package/dist/services/TaskGraphProviderFactory.d.ts +39 -0
- package/dist/services/TaskGraphProviderFactory.d.ts.map +1 -0
- package/dist/services/TaskGraphProviderFactory.js +28 -0
- package/dist/services/TaskGraphProviderFactory.js.map +1 -0
- package/package.json +92 -89
- package/src/__tests__/TaskGraphContinuationDeliverer.test.ts +249 -0
- package/src/__tests__/TaskGraphFrameResolver.test.ts +136 -0
- package/src/generated/generated.ts +623 -2552
- package/src/index.ts +17 -2
- package/src/resolvers/TaskGraphFrameResolver.ts +160 -0
- package/src/rest/RESTEndpointHandler.ts +1 -15
- package/src/services/StartTaskGraphDispatcher.ts +61 -0
- package/src/services/TaskGraphAgentRunner.ts +81 -0
- package/src/services/TaskGraphContinuationDeliverer.ts +181 -0
- package/src/services/TaskGraphProviderFactory.ts +53 -0
- package/dist/resolvers/ReportResolver.d.ts +0 -24
- package/dist/resolvers/ReportResolver.d.ts.map +0 -1
- package/dist/resolvers/ReportResolver.js +0 -198
- package/dist/resolvers/ReportResolver.js.map +0 -1
- package/dist/resolvers/TaskResolver.d.ts +0 -31
- package/dist/resolvers/TaskResolver.d.ts.map +0 -1
- package/dist/resolvers/TaskResolver.js +0 -157
- package/dist/resolvers/TaskResolver.js.map +0 -1
- package/dist/services/TaskOrchestrator.d.ts +0 -130
- package/dist/services/TaskOrchestrator.d.ts.map +0 -1
- package/dist/services/TaskOrchestrator.js +0 -692
- package/dist/services/TaskOrchestrator.js.map +0 -1
- package/src/resolvers/ReportResolver.ts +0 -165
- package/src/resolvers/TaskResolver.ts +0 -148
- package/src/resolvers/__tests__/ReportResolver.test.ts +0 -279
- package/src/services/TaskOrchestrator.ts +0 -873
|
@@ -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, MJAIAgentSkillEntity, 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, MJAISkillActionEntity, MJAISkillPermissionEntity, MJAISkillSearchScopeEntity, MJAISkillSubAgentEntity, MJAISkillEntity, 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, MJContentItemChunkEntity, MJContentItemDuplicateEntity, MJContentItemTagEntity, MJContentItemEntity, MJContentProcessRunDetailEntity, MJContentProcessRunPromptRunEntity, MJContentProcessRunEntity, MJContentSourceParamEntity, MJContentSourceTypeParamEntity, MJContentSourceTypeEntity, MJContentSourceEntity, MJContentTypeAttributeEntity, MJContentTypeEntity, MJConversationArtifactPermissionEntity, MJConversationArtifactVersionEntity, MJConversationArtifactEntity, MJConversationCompactionRunEntity, MJConversationDetailArtifactEntity, MJConversationDetailAttachmentEntity, MJConversationDetailRatingEntity, MJConversationDetailEntity, MJConversationWidgetInstanceEntity, MJConversationEntity, MJCountryEntity, MJCredentialCategoryEntity, MJCredentialTypeEntity, MJCredentialEntity, MJDashboardCategoryEntity, MJDashboardCategoryLinkEntity, MJDashboardCategoryPermissionEntity, MJDashboardPartTypeEntity, MJDashboardPermissionEntity, MJDashboardUserPreferenceEntity, MJDashboardUserStateEntity, MJDashboardEntity, MJDataContextItemEntity, MJDataContextEntity, MJDatasetItemEntity, MJDatasetEntity, MJDuplicateRunDetailMatchEntity, MJDuplicateRunDetailEntity, MJDuplicateRunEntity, MJEmployeeCompanyIntegrationEntity, MJEmployeeRoleEntity, MJEmployeeSkillEntity, MJEmployeeEntity, MJEncryptionAlgorithmEntity, MJEncryptionKeySourceEntity, MJEncryptionKeyEntity, MJEntityEntity, MJEntityActionFilterEntity, MJEntityActionInvocationTypeEntity, MJEntityActionInvocationEntity, MJEntityActionParamEntity, MJEntityActionEntity, MJEntityAIActionEntity, MJEntityCommunicationFieldEntity, MJEntityCommunicationMessageTypeEntity, MJEntityDocumentRunEntity, MJEntityDocumentSettingEntity, MJEntityDocumentTypeEntity, MJEntityDocumentEntity, MJEntityFieldValueEntity, MJEntityFieldEntity, MJEntityFormOverrideEntity, MJEntityOrganicKeyRelatedEntityEntity, MJEntityOrganicKeyEntity, MJEntityPermissionEntity, MJEntityRecordDocumentEntity, MJEntityRelationshipDisplayComponentEntity, MJEntityRelationshipEntity, MJEntitySettingEntity, MJEnvironmentEntity, MJErrorLogEntity, MJExperimentSessionIterationEntity, MJExperimentSessionEntity, MJExperimentEntity, MJExplorerNavigationItemEntity, MJExternalDataSourceTypeEntity, MJExternalDataSourceEntity, 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, MJMLAlgorithmUseCaseRankingEntity, MJMLAlgorithmUseCaseEntity, MJMLAlgorithmEntity, MJMLModelScoringBindingEntity, MJMLModelEntity, MJMLTrainingPipelineEntity, MJMLTrainingRunEntity, MJOAuthAuthServerMetadataCacheEntity, MJOAuthAuthorizationStateEntity, MJOAuthClientRegistrationEntity, MJOAuthTokenEntity, MJOpenAppDependencyEntity, MJOpenAppInstallHistoryEntity, MJOpenAppEntity, MJOutputDeliveryTypeEntity, MJOutputFormatTypeEntity,
|
|
21
|
+
import { MJAccessControlRuleEntity, MJActionAuthorizationEntity, MJActionCategoryEntity, MJActionContextTypeEntity, MJActionContextEntity, MJActionExecutionLogEntity, MJActionFilterEntity, MJActionLibraryEntity, MJActionParamEntity, MJActionResultCodeEntity, MJActionEntity, MJAIActionEntity, MJAIAgentActionEntity, MJAIAgentArtifactTypeEntity, MJAIAgentCategoryEntity, MJAIAgentChannelEntity, MJAIAgentClientToolEntity, MJAIAgentCoAgentEntity, MJAIAgentConfigurationEntity, MJAIAgentCredentialEntity, MJAIAgentDataSourceEntity, MJAIAgentExampleEntity, MJAIAgentHarnessEntity, MJAIAgentLearningCycleEntity, MJAIAgentModalityEntity, MJAIAgentModelEntity, MJAIAgentNoteTypeEntity, MJAIAgentNoteEntity, MJAIAgentPermissionEntity, MJAIAgentPromptEntity, MJAIAgentRelationshipEntity, MJAIAgentRequestTypeEntity, MJAIAgentRequestEntity, MJAIAgentRunMediaEntity, MJAIAgentRunStepEntity, MJAIAgentRunEntity, MJAIAgentSearchScopeEntity, MJAIAgentSessionBridgeParticipantEntity, MJAIAgentSessionBridgeEntity, MJAIAgentSessionChannelEntity, MJAIAgentSessionEntity, MJAIAgentSkillEntity, MJAIAgentStepPathEntity, MJAIAgentStepEntity, MJAIAgentTypeEntity, MJAIAgentEntity, MJAIArchitectureEntity, MJAIBridgeAgentIdentityEntity, MJAIBridgeProviderChannelEntity, MJAIBridgeProviderEntity, MJAIClientToolDefinitionEntity, MJAIConfigurationParamEntity, MJAIConfigurationEntity, MJAICredentialBindingEntity, MJAIModalityEntity, MJAIModelActionEntity, MJAIModelArchitectureEntity, MJAIModelCostEntity, MJAIModelModalityEntity, MJAIModelPriceTypeEntity, MJAIModelPriceUnitTypeEntity, MJAIModelTypeEntity, MJAIModelVendorEntity, MJAIModelEntity, MJAIPromptCategoryEntity, MJAIPromptModelEntity, MJAIPromptRunMediaEntity, MJAIPromptRunEntity, MJAIPromptTypeEntity, MJAIPromptEntity, MJAIRemoteBrowserProviderEntity, MJAIResultCacheEntity, MJAISkillActionEntity, MJAISkillPermissionEntity, MJAISkillSearchScopeEntity, MJAISkillSubAgentEntity, MJAISkillEntity, 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, MJContentItemChunkEntity, MJContentItemDuplicateEntity, MJContentItemTagEntity, MJContentItemEntity, MJContentProcessRunDetailEntity, MJContentProcessRunPromptRunEntity, MJContentProcessRunEntity, MJContentSourceParamEntity, MJContentSourceTypeParamEntity, MJContentSourceTypeEntity, MJContentSourceEntity, MJContentTypeAttributeEntity, MJContentTypeEntity, MJConversationArtifactPermissionEntity, MJConversationArtifactVersionEntity, MJConversationArtifactEntity, MJConversationCompactionRunEntity, MJConversationDetailArtifactEntity, MJConversationDetailAttachmentEntity, MJConversationDetailRatingEntity, MJConversationDetailEntity, MJConversationWidgetInstanceEntity, MJConversationEntity, MJCountryEntity, MJCredentialCategoryEntity, MJCredentialTypeEntity, MJCredentialEntity, MJDashboardCategoryEntity, MJDashboardCategoryLinkEntity, MJDashboardCategoryPermissionEntity, MJDashboardPartTypeEntity, MJDashboardPermissionEntity, MJDashboardUserPreferenceEntity, MJDashboardUserStateEntity, MJDashboardEntity, MJDataContextItemEntity, MJDataContextEntity, MJDatasetItemEntity, MJDatasetEntity, MJDuplicateRunDetailMatchEntity, MJDuplicateRunDetailEntity, MJDuplicateRunEntity, MJEmployeeCompanyIntegrationEntity, MJEmployeeRoleEntity, MJEmployeeSkillEntity, MJEmployeeEntity, MJEncryptionAlgorithmEntity, MJEncryptionKeySourceEntity, MJEncryptionKeyEntity, MJEntityEntity, MJEntityActionFilterEntity, MJEntityActionInvocationTypeEntity, MJEntityActionInvocationEntity, MJEntityActionParamEntity, MJEntityActionEntity, MJEntityAIActionEntity, MJEntityCommunicationFieldEntity, MJEntityCommunicationMessageTypeEntity, MJEntityDocumentRunEntity, MJEntityDocumentSettingEntity, MJEntityDocumentTypeEntity, MJEntityDocumentEntity, MJEntityFieldValueEntity, MJEntityFieldEntity, MJEntityFormOverrideEntity, MJEntityOrganicKeyRelatedEntityEntity, MJEntityOrganicKeyEntity, MJEntityPermissionEntity, MJEntityRecordDocumentEntity, MJEntityRelationshipDisplayComponentEntity, MJEntityRelationshipEntity, MJEntitySettingEntity, MJEnvironmentEntity, MJErrorLogEntity, MJExperimentSessionIterationEntity, MJExperimentSessionEntity, MJExperimentEntity, MJExplorerNavigationItemEntity, MJExternalDataSourceTypeEntity, MJExternalDataSourceEntity, 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, MJMLAlgorithmUseCaseRankingEntity, MJMLAlgorithmUseCaseEntity, MJMLAlgorithmEntity, MJMLModelScoringBindingEntity, MJMLModelEntity, MJMLTrainingPipelineEntity, MJMLTrainingRunEntity, MJOAuthAuthServerMetadataCacheEntity, MJOAuthAuthorizationStateEntity, MJOAuthClientRegistrationEntity, MJOAuthTokenEntity, MJOpenAppDependencyEntity, MJOpenAppInstallHistoryEntity, MJOpenAppEntity, MJOutputDeliveryTypeEntity, MJOutputFormatTypeEntity, MJPermissionDomainEntity, MJProcessRunDetailEntity, MJProcessRunEntity, MJProjectEntity, MJPublicLinkEntity, MJQueryEntity, MJQueryCategoryEntity, MJQueryDependencyEntity, MJQueryEntityEntity, MJQueryFieldEntity, MJQueryParameterEntity, MJQueryPermissionEntity, MJQuerySQLEntity, MJQueueTaskEntity, MJQueueTypeEntity, MJQueueEntity, MJRecommendationItemEntity, MJRecommendationProviderEntity, MJRecommendationRunEntity, MJRecommendationEntity, MJRecordChangeReplayRunEntity, MJRecordChangeEntity, MJRecordGeoCodeEntity, MJRecordLinkEntity, MJRecordMergeDeletionLogEntity, MJRecordMergeLogEntity, MJRecordProcessCategoryEntity, MJRecordProcessWatermarkEntity, MJRecordProcessEntity, MJRemoteOperationCategoryEntity, MJRemoteOperationEntity, MJResourceLinkEntity, MJResourcePermissionEntity, MJResourceTypeEntity, MJRoleEntity, MJRowLevelSecurityFilterEntity, MJScheduledJobRunEntity, MJScheduledJobTypeEntity, MJScheduledJobEntity, MJSchemaInfoEntity, MJScopedPromptConfigEntity, MJScopedPromptPartEntity, 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, MJThemeEntity, MJUserApplicationEntityEntity, MJUserApplicationEntity, MJUserFavoriteEntity, MJUserNotificationPreferenceEntity, MJUserNotificationTypeEntity, MJUserNotificationEntity, MJUserRecordLogEntity, MJUserRoleEntity, MJUserRoutineRecipientEntity, MJUserRoutineRunEntity, MJUserRoutineEntity, MJUserSettingEntity, MJUserViewCategoryEntity, MJUserViewRunDetailEntity, MJUserViewRunEntity, MJUserViewEntity, MJUserEntity, MJVectorDatabaseEntity, MJVectorIndexEntity, MJVersionInstallationEntity, MJVersionLabelItemEntity, MJVersionLabelRestoreEntity, MJVersionLabelEntity, MJViewTypeEntity, MJWorkspaceItemEntity, MJWorkspaceEntity } from '@memberjunction/core-entities';
|
|
22
22
|
|
|
23
23
|
|
|
24
24
|
//****************************************************************************
|
|
@@ -1687,9 +1687,6 @@ export class MJActionParam_ {
|
|
|
1687
1687
|
@Field(() => [MJEntityActionParam_])
|
|
1688
1688
|
MJEntityActionParams_ActionParamIDArray: MJEntityActionParam_[]; // Link to MJEntityActionParams
|
|
1689
1689
|
|
|
1690
|
-
@Field(() => [MJScheduledActionParam_])
|
|
1691
|
-
MJScheduledActionParams_ActionParamIDArray: MJScheduledActionParam_[]; // Link to MJScheduledActionParams
|
|
1692
|
-
|
|
1693
1690
|
}
|
|
1694
1691
|
|
|
1695
1692
|
//****************************************************************************
|
|
@@ -1847,16 +1844,6 @@ export class MJActionParamResolver extends ResolverBase {
|
|
|
1847
1844
|
return result;
|
|
1848
1845
|
}
|
|
1849
1846
|
|
|
1850
|
-
@FieldResolver(() => [MJScheduledActionParam_])
|
|
1851
|
-
async MJScheduledActionParams_ActionParamIDArray(@Root() mjactionparam_: MJActionParam_, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
1852
|
-
this.CheckUserReadPermissions('MJ: Scheduled Action Params', userPayload);
|
|
1853
|
-
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
1854
|
-
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwScheduledActionParams')} WHERE ${provider.QuoteIdentifier('ActionParamID')}=${provider.BuildParameterPlaceholder(0)} ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: Scheduled Action Params', userPayload, EntityPermissionType.Read, 'AND');
|
|
1855
|
-
const rows = await provider.ExecuteSQL(sSQL, [mjactionparam_.ID], undefined, this.GetUserFromPayload(userPayload));
|
|
1856
|
-
const result = await this.ArrayMapFieldNamesToCodeNames('MJ: Scheduled Action Params', rows, this.GetUserFromPayload(userPayload));
|
|
1857
|
-
return result;
|
|
1858
|
-
}
|
|
1859
|
-
|
|
1860
1847
|
@Mutation(() => MJActionParam_)
|
|
1861
1848
|
async CreateMJActionParam(
|
|
1862
1849
|
@Arg('input', () => CreateMJActionParamInput) input: CreateMJActionParamInput,
|
|
@@ -2196,9 +2183,6 @@ export class MJAction_ {
|
|
|
2196
2183
|
@Field(() => [MJMCPServerTool_])
|
|
2197
2184
|
MJMCPServerTools_GeneratedActionIDArray: MJMCPServerTool_[]; // Link to MJMCPServerTools
|
|
2198
2185
|
|
|
2199
|
-
@Field(() => [MJScheduledAction_])
|
|
2200
|
-
MJScheduledActions_ActionIDArray: MJScheduledAction_[]; // Link to MJScheduledActions
|
|
2201
|
-
|
|
2202
2186
|
@Field(() => [MJActionContext_])
|
|
2203
2187
|
MJActionContexts_ActionIDArray: MJActionContext_[]; // Link to MJActionContexts
|
|
2204
2188
|
|
|
@@ -2504,16 +2488,6 @@ export class MJActionResolver extends ResolverBase {
|
|
|
2504
2488
|
return result;
|
|
2505
2489
|
}
|
|
2506
2490
|
|
|
2507
|
-
@FieldResolver(() => [MJScheduledAction_])
|
|
2508
|
-
async MJScheduledActions_ActionIDArray(@Root() mjaction_: MJAction_, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
2509
|
-
this.CheckUserReadPermissions('MJ: Scheduled Actions', userPayload);
|
|
2510
|
-
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
2511
|
-
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwScheduledActions')} WHERE ${provider.QuoteIdentifier('ActionID')}=${provider.BuildParameterPlaceholder(0)} ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: Scheduled Actions', userPayload, EntityPermissionType.Read, 'AND');
|
|
2512
|
-
const rows = await provider.ExecuteSQL(sSQL, [mjaction_.ID], undefined, this.GetUserFromPayload(userPayload));
|
|
2513
|
-
const result = await this.ArrayMapFieldNamesToCodeNames('MJ: Scheduled Actions', rows, this.GetUserFromPayload(userPayload));
|
|
2514
|
-
return result;
|
|
2515
|
-
}
|
|
2516
|
-
|
|
2517
2491
|
@FieldResolver(() => [MJActionContext_])
|
|
2518
2492
|
async MJActionContexts_ActionIDArray(@Root() mjaction_: MJAction_, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
2519
2493
|
this.CheckUserReadPermissions('MJ: Action Contexts', userPayload);
|
|
@@ -4331,6 +4305,204 @@ export class MJAIAgentConfigurationResolver extends ResolverBase {
|
|
|
4331
4305
|
|
|
4332
4306
|
}
|
|
4333
4307
|
|
|
4308
|
+
//****************************************************************************
|
|
4309
|
+
// ENTITY CLASS for MJ: AI Agent Credentials
|
|
4310
|
+
//****************************************************************************
|
|
4311
|
+
@ObjectType({ description: `Credentials an agent carries into its harness sandbox, injected as environment variables at session creation. Custody of the secret itself stays in Credential/CredentialEngine - this table records only the GRANT EDGE, in the same reviewable style as AIAgentAction. Distinct from AICredentialBinding, which is inference-selection plumbing for AIPromptRunner failover when MJ itself executes a prompt.` })
|
|
4312
|
+
export class MJAIAgentCredential_ {
|
|
4313
|
+
@Field()
|
|
4314
|
+
@MaxLength(36)
|
|
4315
|
+
ID: string;
|
|
4316
|
+
|
|
4317
|
+
@Field()
|
|
4318
|
+
@MaxLength(36)
|
|
4319
|
+
AgentID: string;
|
|
4320
|
+
|
|
4321
|
+
@Field()
|
|
4322
|
+
@MaxLength(36)
|
|
4323
|
+
CredentialID: string;
|
|
4324
|
+
|
|
4325
|
+
@Field({description: `What this credential is for. HarnessLLM is the API key the harness uses to reach its own model vendor; when absent, the runtime falls back to vendor-scoped AICredentialBinding rows for AIAgentHarness.AIVendorID. Integration is any other granted secret the agent needs inside the sandbox, such as a source-control or ticketing token.`})
|
|
4326
|
+
@MaxLength(50)
|
|
4327
|
+
Purpose: string;
|
|
4328
|
+
|
|
4329
|
+
@Field({nullable: true, description: `Environment variable the adapter sets inside the sandbox for this credential, e.g. ANTHROPIC_API_KEY or GITHUB_TOKEN. NULL lets the adapter choose, which is the normal case for HarnessLLM because the adapter knows its own vendor's variable name.`})
|
|
4330
|
+
@MaxLength(100)
|
|
4331
|
+
EnvVariableName?: string;
|
|
4332
|
+
|
|
4333
|
+
@Field(() => Int, {description: `Failover ordering within a Purpose - lower runs first. Lets an agent carry a primary and a standby key for the same purpose without a schema change.`})
|
|
4334
|
+
Priority: number;
|
|
4335
|
+
|
|
4336
|
+
@Field({description: `Whether this grant is live. Revoked withdraws the credential from future sessions while preserving the record that it was once granted, which is the point of auditing a credential grant at all. Pending stages a grant that is not yet in force.`})
|
|
4337
|
+
@MaxLength(20)
|
|
4338
|
+
Status: string;
|
|
4339
|
+
|
|
4340
|
+
@Field()
|
|
4341
|
+
_mj__CreatedAt: Date;
|
|
4342
|
+
|
|
4343
|
+
@Field()
|
|
4344
|
+
_mj__UpdatedAt: Date;
|
|
4345
|
+
|
|
4346
|
+
@Field({nullable: true})
|
|
4347
|
+
@MaxLength(255)
|
|
4348
|
+
Agent?: string;
|
|
4349
|
+
|
|
4350
|
+
@Field()
|
|
4351
|
+
@MaxLength(200)
|
|
4352
|
+
Credential: string;
|
|
4353
|
+
|
|
4354
|
+
}
|
|
4355
|
+
|
|
4356
|
+
//****************************************************************************
|
|
4357
|
+
// INPUT TYPE for MJ: AI Agent Credentials
|
|
4358
|
+
//****************************************************************************
|
|
4359
|
+
@InputType()
|
|
4360
|
+
export class CreateMJAIAgentCredentialInput {
|
|
4361
|
+
@Field({ nullable: true })
|
|
4362
|
+
ID?: string;
|
|
4363
|
+
|
|
4364
|
+
@Field({ nullable: true })
|
|
4365
|
+
AgentID?: string;
|
|
4366
|
+
|
|
4367
|
+
@Field({ nullable: true })
|
|
4368
|
+
CredentialID?: string;
|
|
4369
|
+
|
|
4370
|
+
@Field({ nullable: true })
|
|
4371
|
+
Purpose?: string;
|
|
4372
|
+
|
|
4373
|
+
@Field({ nullable: true })
|
|
4374
|
+
EnvVariableName: string | null;
|
|
4375
|
+
|
|
4376
|
+
@Field(() => Int, { nullable: true })
|
|
4377
|
+
Priority?: number;
|
|
4378
|
+
|
|
4379
|
+
@Field({ nullable: true })
|
|
4380
|
+
Status?: string;
|
|
4381
|
+
|
|
4382
|
+
@Field(() => RestoreContextInput, { nullable: true })
|
|
4383
|
+
RestoreContext___?: RestoreContextInput;
|
|
4384
|
+
}
|
|
4385
|
+
|
|
4386
|
+
|
|
4387
|
+
//****************************************************************************
|
|
4388
|
+
// INPUT TYPE for MJ: AI Agent Credentials
|
|
4389
|
+
//****************************************************************************
|
|
4390
|
+
@InputType()
|
|
4391
|
+
export class UpdateMJAIAgentCredentialInput {
|
|
4392
|
+
@Field()
|
|
4393
|
+
ID: string;
|
|
4394
|
+
|
|
4395
|
+
@Field({ nullable: true })
|
|
4396
|
+
AgentID?: string;
|
|
4397
|
+
|
|
4398
|
+
@Field({ nullable: true })
|
|
4399
|
+
CredentialID?: string;
|
|
4400
|
+
|
|
4401
|
+
@Field({ nullable: true })
|
|
4402
|
+
Purpose?: string;
|
|
4403
|
+
|
|
4404
|
+
@Field({ nullable: true })
|
|
4405
|
+
EnvVariableName?: string | null;
|
|
4406
|
+
|
|
4407
|
+
@Field(() => Int, { nullable: true })
|
|
4408
|
+
Priority?: number;
|
|
4409
|
+
|
|
4410
|
+
@Field({ nullable: true })
|
|
4411
|
+
Status?: string;
|
|
4412
|
+
|
|
4413
|
+
@Field(() => [KeyValuePairInput], { nullable: true })
|
|
4414
|
+
OldValues___?: KeyValuePairInput[];
|
|
4415
|
+
|
|
4416
|
+
@Field(() => RestoreContextInput, { nullable: true })
|
|
4417
|
+
RestoreContext___?: RestoreContextInput;
|
|
4418
|
+
}
|
|
4419
|
+
|
|
4420
|
+
//****************************************************************************
|
|
4421
|
+
// RESOLVER for MJ: AI Agent Credentials
|
|
4422
|
+
//****************************************************************************
|
|
4423
|
+
@ObjectType()
|
|
4424
|
+
export class RunMJAIAgentCredentialViewResult {
|
|
4425
|
+
@Field(() => [MJAIAgentCredential_])
|
|
4426
|
+
Results: MJAIAgentCredential_[];
|
|
4427
|
+
|
|
4428
|
+
@Field(() => String, {nullable: true})
|
|
4429
|
+
UserViewRunID?: string;
|
|
4430
|
+
|
|
4431
|
+
@Field(() => Int, {nullable: true})
|
|
4432
|
+
RowCount: number;
|
|
4433
|
+
|
|
4434
|
+
@Field(() => Int, {nullable: true})
|
|
4435
|
+
TotalRowCount: number;
|
|
4436
|
+
|
|
4437
|
+
@Field(() => Int, {nullable: true})
|
|
4438
|
+
ExecutionTime: number;
|
|
4439
|
+
|
|
4440
|
+
@Field({nullable: true})
|
|
4441
|
+
ErrorMessage?: string;
|
|
4442
|
+
|
|
4443
|
+
@Field(() => Boolean, {nullable: false})
|
|
4444
|
+
Success: boolean;
|
|
4445
|
+
}
|
|
4446
|
+
|
|
4447
|
+
@Resolver(MJAIAgentCredential_)
|
|
4448
|
+
export class MJAIAgentCredentialResolver extends ResolverBase {
|
|
4449
|
+
@Query(() => RunMJAIAgentCredentialViewResult)
|
|
4450
|
+
async RunMJAIAgentCredentialViewByID(@Arg('input', () => RunViewByIDInput) input: RunViewByIDInput, @Ctx() { providers, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
4451
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
4452
|
+
return super.RunViewByIDGeneric(input, provider, userPayload, pubSub);
|
|
4453
|
+
}
|
|
4454
|
+
|
|
4455
|
+
@Query(() => RunMJAIAgentCredentialViewResult)
|
|
4456
|
+
async RunMJAIAgentCredentialViewByName(@Arg('input', () => RunViewByNameInput) input: RunViewByNameInput, @Ctx() { providers, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
4457
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
4458
|
+
return super.RunViewByNameGeneric(input, provider, userPayload, pubSub);
|
|
4459
|
+
}
|
|
4460
|
+
|
|
4461
|
+
@Query(() => RunMJAIAgentCredentialViewResult)
|
|
4462
|
+
async RunMJAIAgentCredentialDynamicView(@Arg('input', () => RunDynamicViewInput) input: RunDynamicViewInput, @Ctx() { providers, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
4463
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
4464
|
+
input.EntityName = 'MJ: AI Agent Credentials';
|
|
4465
|
+
return super.RunDynamicViewGeneric(input, provider, userPayload, pubSub);
|
|
4466
|
+
}
|
|
4467
|
+
@Query(() => MJAIAgentCredential_, { nullable: true })
|
|
4468
|
+
async MJAIAgentCredential(@Arg('ID', () => String) ID: string, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine): Promise<MJAIAgentCredential_ | null> {
|
|
4469
|
+
this.CheckUserReadPermissions('MJ: AI Agent Credentials', userPayload);
|
|
4470
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
4471
|
+
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwAIAgentCredentials')} WHERE ${provider.QuoteIdentifier('ID')}=${provider.BuildParameterPlaceholder(0)} ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: AI Agent Credentials', userPayload, EntityPermissionType.Read, 'AND');
|
|
4472
|
+
const rows = await provider.ExecuteSQL(sSQL, [ID], undefined, this.GetUserFromPayload(userPayload));
|
|
4473
|
+
const result = await this.MapFieldNamesToCodeNames('MJ: AI Agent Credentials', rows && rows.length > 0 ? rows[0] : null, this.GetUserFromPayload(userPayload));
|
|
4474
|
+
return result;
|
|
4475
|
+
}
|
|
4476
|
+
|
|
4477
|
+
@Mutation(() => MJAIAgentCredential_)
|
|
4478
|
+
async CreateMJAIAgentCredential(
|
|
4479
|
+
@Arg('input', () => CreateMJAIAgentCredentialInput) input: CreateMJAIAgentCredentialInput,
|
|
4480
|
+
@Ctx() { providers, userPayload }: AppContext,
|
|
4481
|
+
@PubSub() pubSub: PubSubEngine
|
|
4482
|
+
) {
|
|
4483
|
+
const provider = GetReadWriteProvider(providers);
|
|
4484
|
+
return this.CreateRecord('MJ: AI Agent Credentials', input, provider, userPayload, pubSub)
|
|
4485
|
+
}
|
|
4486
|
+
|
|
4487
|
+
@Mutation(() => MJAIAgentCredential_)
|
|
4488
|
+
async UpdateMJAIAgentCredential(
|
|
4489
|
+
@Arg('input', () => UpdateMJAIAgentCredentialInput) input: UpdateMJAIAgentCredentialInput,
|
|
4490
|
+
@Ctx() { providers, userPayload }: AppContext,
|
|
4491
|
+
@PubSub() pubSub: PubSubEngine
|
|
4492
|
+
) {
|
|
4493
|
+
const provider = GetReadWriteProvider(providers);
|
|
4494
|
+
return this.UpdateRecord('MJ: AI Agent Credentials', input, provider, userPayload, pubSub);
|
|
4495
|
+
}
|
|
4496
|
+
|
|
4497
|
+
@Mutation(() => MJAIAgentCredential_)
|
|
4498
|
+
async DeleteMJAIAgentCredential(@Arg('ID', () => String) ID: string, @Arg('options___', () => DeleteOptionsInput) options: DeleteOptionsInput, @Ctx() { providers, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
4499
|
+
const provider = GetReadWriteProvider(providers);
|
|
4500
|
+
const key = new CompositeKey([{FieldName: 'ID', Value: ID}]);
|
|
4501
|
+
return this.DeleteRecord('MJ: AI Agent Credentials', key, options, provider, userPayload, pubSub);
|
|
4502
|
+
}
|
|
4503
|
+
|
|
4504
|
+
}
|
|
4505
|
+
|
|
4334
4506
|
//****************************************************************************
|
|
4335
4507
|
// ENTITY CLASS for MJ: AI Agent Data Sources
|
|
4336
4508
|
//****************************************************************************
|
|
@@ -5012,6 +5184,233 @@ export class MJAIAgentExampleResolver extends ResolverBase {
|
|
|
5012
5184
|
|
|
5013
5185
|
}
|
|
5014
5186
|
|
|
5187
|
+
//****************************************************************************
|
|
5188
|
+
// ENTITY CLASS for MJ: AI Agent Harnesses
|
|
5189
|
+
//****************************************************************************
|
|
5190
|
+
@ObjectType({ description: `Registry of external agent harnesses this installation can launch as the reasoning substrate for an MJ agent (Claude Code, Codex CLI, OpenCode, Pi, Cline). A row makes a harness AVAILABLE; an agent opts in by naming it in AIAgent.TypeConfiguration. Empty table = no agent can run on a harness, which is the pre-migration behaviour.` })
|
|
5191
|
+
export class MJAIAgentHarness_ {
|
|
5192
|
+
@Field()
|
|
5193
|
+
@MaxLength(36)
|
|
5194
|
+
ID: string;
|
|
5195
|
+
|
|
5196
|
+
@Field({description: `Unique name of the harness, e.g. Claude Code, Codex CLI, OpenCode, Pi, Cline. This is a LOOKUP KEY, not a label: an agent selects its harness by this name in AIAgent.TypeConfiguration ("harnessName"), so duplicates would make selection ambiguous at run time.`})
|
|
5197
|
+
@MaxLength(100)
|
|
5198
|
+
Name: string;
|
|
5199
|
+
|
|
5200
|
+
@Field({nullable: true, description: `Human-readable description of the harness - what it is good at, what it requires to be installed, and any deployment caveats.`})
|
|
5201
|
+
Description?: string;
|
|
5202
|
+
|
|
5203
|
+
@Field({description: `ClassFactory registration key for the BaseHarnessAdapter subclass that drives this harness (e.g. ClaudeCodeAdapter, CodexAdapter, StdioJsonAdapter). Resolved at run time, so a customer can register a proprietary adapter without forking core - the same extension mechanism AI model vendor drivers use.`})
|
|
5204
|
+
@MaxLength(255)
|
|
5205
|
+
DriverClass: string;
|
|
5206
|
+
|
|
5207
|
+
@Field({nullable: true, description: `Path to the harness CLI binary or entry point when the adapter shells out. NULL when the adapter embeds a vendor SDK and therefore launches nothing.`})
|
|
5208
|
+
@MaxLength(500)
|
|
5209
|
+
ExecutablePath?: string;
|
|
5210
|
+
|
|
5211
|
+
@Field({nullable: true})
|
|
5212
|
+
@MaxLength(36)
|
|
5213
|
+
AIVendorID?: string;
|
|
5214
|
+
|
|
5215
|
+
@Field({nullable: true})
|
|
5216
|
+
@MaxLength(36)
|
|
5217
|
+
AIModelID?: string;
|
|
5218
|
+
|
|
5219
|
+
@Field({nullable: true, description: `Default model passed to the harness where the harness supports being told which model to use. NULL leaves the harness on its own default.`})
|
|
5220
|
+
@MaxLength(255)
|
|
5221
|
+
DefaultModel?: string;
|
|
5222
|
+
|
|
5223
|
+
@Field({nullable: true, description: `Strongly-typed JSON of what this harness can do (the IHarnessCapabilitySettings interface, bound via JSONType metadata): session continuity (SessionResume), turn-protocol support (StructuredOutput), in-sandbox permission interception (PermissionHooks), and whether the harness can act as an MCP client for the read-only loopback (McpClient). The runtime gates behaviour on these - when SessionResume is false the adapter must replay prior context into a fresh invocation each turn, which costs extra tokens and has to be budgeted for. Held as JSON so a new capability needs no schema migration, just an added property on the interface. NULL/omitted = not supported.`})
|
|
5224
|
+
CapabilitySettings?: string;
|
|
5225
|
+
|
|
5226
|
+
@Field({description: `Whether this harness may be launched. Inactive keeps the row and its history for auditing while taking the harness out of service - preferable to deleting it, which would orphan agents configured to use it.`})
|
|
5227
|
+
@MaxLength(20)
|
|
5228
|
+
Status: string;
|
|
5229
|
+
|
|
5230
|
+
@Field()
|
|
5231
|
+
_mj__CreatedAt: Date;
|
|
5232
|
+
|
|
5233
|
+
@Field()
|
|
5234
|
+
_mj__UpdatedAt: Date;
|
|
5235
|
+
|
|
5236
|
+
@Field({nullable: true})
|
|
5237
|
+
@MaxLength(50)
|
|
5238
|
+
AIVendor?: string;
|
|
5239
|
+
|
|
5240
|
+
@Field({nullable: true})
|
|
5241
|
+
@MaxLength(50)
|
|
5242
|
+
AIModel?: string;
|
|
5243
|
+
|
|
5244
|
+
}
|
|
5245
|
+
|
|
5246
|
+
//****************************************************************************
|
|
5247
|
+
// INPUT TYPE for MJ: AI Agent Harnesses
|
|
5248
|
+
//****************************************************************************
|
|
5249
|
+
@InputType()
|
|
5250
|
+
export class CreateMJAIAgentHarnessInput {
|
|
5251
|
+
@Field({ nullable: true })
|
|
5252
|
+
ID?: string;
|
|
5253
|
+
|
|
5254
|
+
@Field({ nullable: true })
|
|
5255
|
+
Name?: string;
|
|
5256
|
+
|
|
5257
|
+
@Field({ nullable: true })
|
|
5258
|
+
Description: string | null;
|
|
5259
|
+
|
|
5260
|
+
@Field({ nullable: true })
|
|
5261
|
+
DriverClass?: string;
|
|
5262
|
+
|
|
5263
|
+
@Field({ nullable: true })
|
|
5264
|
+
ExecutablePath: string | null;
|
|
5265
|
+
|
|
5266
|
+
@Field({ nullable: true })
|
|
5267
|
+
AIVendorID: string | null;
|
|
5268
|
+
|
|
5269
|
+
@Field({ nullable: true })
|
|
5270
|
+
AIModelID: string | null;
|
|
5271
|
+
|
|
5272
|
+
@Field({ nullable: true })
|
|
5273
|
+
DefaultModel: string | null;
|
|
5274
|
+
|
|
5275
|
+
@Field({ nullable: true })
|
|
5276
|
+
CapabilitySettings: string | null;
|
|
5277
|
+
|
|
5278
|
+
@Field({ nullable: true })
|
|
5279
|
+
Status?: string;
|
|
5280
|
+
|
|
5281
|
+
@Field(() => RestoreContextInput, { nullable: true })
|
|
5282
|
+
RestoreContext___?: RestoreContextInput;
|
|
5283
|
+
}
|
|
5284
|
+
|
|
5285
|
+
|
|
5286
|
+
//****************************************************************************
|
|
5287
|
+
// INPUT TYPE for MJ: AI Agent Harnesses
|
|
5288
|
+
//****************************************************************************
|
|
5289
|
+
@InputType()
|
|
5290
|
+
export class UpdateMJAIAgentHarnessInput {
|
|
5291
|
+
@Field()
|
|
5292
|
+
ID: string;
|
|
5293
|
+
|
|
5294
|
+
@Field({ nullable: true })
|
|
5295
|
+
Name?: string;
|
|
5296
|
+
|
|
5297
|
+
@Field({ nullable: true })
|
|
5298
|
+
Description?: string | null;
|
|
5299
|
+
|
|
5300
|
+
@Field({ nullable: true })
|
|
5301
|
+
DriverClass?: string;
|
|
5302
|
+
|
|
5303
|
+
@Field({ nullable: true })
|
|
5304
|
+
ExecutablePath?: string | null;
|
|
5305
|
+
|
|
5306
|
+
@Field({ nullable: true })
|
|
5307
|
+
AIVendorID?: string | null;
|
|
5308
|
+
|
|
5309
|
+
@Field({ nullable: true })
|
|
5310
|
+
AIModelID?: string | null;
|
|
5311
|
+
|
|
5312
|
+
@Field({ nullable: true })
|
|
5313
|
+
DefaultModel?: string | null;
|
|
5314
|
+
|
|
5315
|
+
@Field({ nullable: true })
|
|
5316
|
+
CapabilitySettings?: string | null;
|
|
5317
|
+
|
|
5318
|
+
@Field({ nullable: true })
|
|
5319
|
+
Status?: string;
|
|
5320
|
+
|
|
5321
|
+
@Field(() => [KeyValuePairInput], { nullable: true })
|
|
5322
|
+
OldValues___?: KeyValuePairInput[];
|
|
5323
|
+
|
|
5324
|
+
@Field(() => RestoreContextInput, { nullable: true })
|
|
5325
|
+
RestoreContext___?: RestoreContextInput;
|
|
5326
|
+
}
|
|
5327
|
+
|
|
5328
|
+
//****************************************************************************
|
|
5329
|
+
// RESOLVER for MJ: AI Agent Harnesses
|
|
5330
|
+
//****************************************************************************
|
|
5331
|
+
@ObjectType()
|
|
5332
|
+
export class RunMJAIAgentHarnessViewResult {
|
|
5333
|
+
@Field(() => [MJAIAgentHarness_])
|
|
5334
|
+
Results: MJAIAgentHarness_[];
|
|
5335
|
+
|
|
5336
|
+
@Field(() => String, {nullable: true})
|
|
5337
|
+
UserViewRunID?: string;
|
|
5338
|
+
|
|
5339
|
+
@Field(() => Int, {nullable: true})
|
|
5340
|
+
RowCount: number;
|
|
5341
|
+
|
|
5342
|
+
@Field(() => Int, {nullable: true})
|
|
5343
|
+
TotalRowCount: number;
|
|
5344
|
+
|
|
5345
|
+
@Field(() => Int, {nullable: true})
|
|
5346
|
+
ExecutionTime: number;
|
|
5347
|
+
|
|
5348
|
+
@Field({nullable: true})
|
|
5349
|
+
ErrorMessage?: string;
|
|
5350
|
+
|
|
5351
|
+
@Field(() => Boolean, {nullable: false})
|
|
5352
|
+
Success: boolean;
|
|
5353
|
+
}
|
|
5354
|
+
|
|
5355
|
+
@Resolver(MJAIAgentHarness_)
|
|
5356
|
+
export class MJAIAgentHarnessResolver extends ResolverBase {
|
|
5357
|
+
@Query(() => RunMJAIAgentHarnessViewResult)
|
|
5358
|
+
async RunMJAIAgentHarnessViewByID(@Arg('input', () => RunViewByIDInput) input: RunViewByIDInput, @Ctx() { providers, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
5359
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
5360
|
+
return super.RunViewByIDGeneric(input, provider, userPayload, pubSub);
|
|
5361
|
+
}
|
|
5362
|
+
|
|
5363
|
+
@Query(() => RunMJAIAgentHarnessViewResult)
|
|
5364
|
+
async RunMJAIAgentHarnessViewByName(@Arg('input', () => RunViewByNameInput) input: RunViewByNameInput, @Ctx() { providers, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
5365
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
5366
|
+
return super.RunViewByNameGeneric(input, provider, userPayload, pubSub);
|
|
5367
|
+
}
|
|
5368
|
+
|
|
5369
|
+
@Query(() => RunMJAIAgentHarnessViewResult)
|
|
5370
|
+
async RunMJAIAgentHarnessDynamicView(@Arg('input', () => RunDynamicViewInput) input: RunDynamicViewInput, @Ctx() { providers, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
5371
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
5372
|
+
input.EntityName = 'MJ: AI Agent Harnesses';
|
|
5373
|
+
return super.RunDynamicViewGeneric(input, provider, userPayload, pubSub);
|
|
5374
|
+
}
|
|
5375
|
+
@Query(() => MJAIAgentHarness_, { nullable: true })
|
|
5376
|
+
async MJAIAgentHarness(@Arg('ID', () => String) ID: string, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine): Promise<MJAIAgentHarness_ | null> {
|
|
5377
|
+
this.CheckUserReadPermissions('MJ: AI Agent Harnesses', userPayload);
|
|
5378
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
5379
|
+
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwAIAgentHarnesses')} WHERE ${provider.QuoteIdentifier('ID')}=${provider.BuildParameterPlaceholder(0)} ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: AI Agent Harnesses', userPayload, EntityPermissionType.Read, 'AND');
|
|
5380
|
+
const rows = await provider.ExecuteSQL(sSQL, [ID], undefined, this.GetUserFromPayload(userPayload));
|
|
5381
|
+
const result = await this.MapFieldNamesToCodeNames('MJ: AI Agent Harnesses', rows && rows.length > 0 ? rows[0] : null, this.GetUserFromPayload(userPayload));
|
|
5382
|
+
return result;
|
|
5383
|
+
}
|
|
5384
|
+
|
|
5385
|
+
@Mutation(() => MJAIAgentHarness_)
|
|
5386
|
+
async CreateMJAIAgentHarness(
|
|
5387
|
+
@Arg('input', () => CreateMJAIAgentHarnessInput) input: CreateMJAIAgentHarnessInput,
|
|
5388
|
+
@Ctx() { providers, userPayload }: AppContext,
|
|
5389
|
+
@PubSub() pubSub: PubSubEngine
|
|
5390
|
+
) {
|
|
5391
|
+
const provider = GetReadWriteProvider(providers);
|
|
5392
|
+
return this.CreateRecord('MJ: AI Agent Harnesses', input, provider, userPayload, pubSub)
|
|
5393
|
+
}
|
|
5394
|
+
|
|
5395
|
+
@Mutation(() => MJAIAgentHarness_)
|
|
5396
|
+
async UpdateMJAIAgentHarness(
|
|
5397
|
+
@Arg('input', () => UpdateMJAIAgentHarnessInput) input: UpdateMJAIAgentHarnessInput,
|
|
5398
|
+
@Ctx() { providers, userPayload }: AppContext,
|
|
5399
|
+
@PubSub() pubSub: PubSubEngine
|
|
5400
|
+
) {
|
|
5401
|
+
const provider = GetReadWriteProvider(providers);
|
|
5402
|
+
return this.UpdateRecord('MJ: AI Agent Harnesses', input, provider, userPayload, pubSub);
|
|
5403
|
+
}
|
|
5404
|
+
|
|
5405
|
+
@Mutation(() => MJAIAgentHarness_)
|
|
5406
|
+
async DeleteMJAIAgentHarness(@Arg('ID', () => String) ID: string, @Arg('options___', () => DeleteOptionsInput) options: DeleteOptionsInput, @Ctx() { providers, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
5407
|
+
const provider = GetReadWriteProvider(providers);
|
|
5408
|
+
const key = new CompositeKey([{FieldName: 'ID', Value: ID}]);
|
|
5409
|
+
return this.DeleteRecord('MJ: AI Agent Harnesses', key, options, provider, userPayload, pubSub);
|
|
5410
|
+
}
|
|
5411
|
+
|
|
5412
|
+
}
|
|
5413
|
+
|
|
5015
5414
|
//****************************************************************************
|
|
5016
5415
|
// ENTITY CLASS for MJ: AI Agent Learning Cycles
|
|
5017
5416
|
//****************************************************************************
|
|
@@ -8216,6 +8615,13 @@ each time the agent processes a prompt step.`})
|
|
|
8216
8615
|
@Field(() => Boolean, {description: `1 when this run executed under plan mode (whether via the per-request planMode flag or the agent's RequirePlanMode setting). Drives plan-mode indicators in the run UX and supports plan-drift auditing (comparing the approved plan against the steps that actually executed).`})
|
|
8217
8616
|
PlanMode: boolean;
|
|
8218
8617
|
|
|
8618
|
+
@Field({nullable: true, description: `Session identifier reported by the external harness backing this run. Kept for two reasons that outlive the run: resuming the session across turns, and correlating this run with the vendor's own session logs when diagnosing behaviour INSIDE the sandbox, where MJ's audit trail necessarily stops at the turn boundary. NULL for every run not backed by a harness.`})
|
|
8619
|
+
@MaxLength(255)
|
|
8620
|
+
ExternalSessionID?: string;
|
|
8621
|
+
|
|
8622
|
+
@Field(() => Int, {description: `How many task-graph continuations led to this run. 0 (the default, and the value every ordinary run carries) means the run was not started by a finished graph. A run started because a graph declared continuation='reinvoke' records its source graph's depth plus one, and any graph that run subsequently submits inherits that value — which is what allows MAX_REINVOKE_DEPTH to bound a chain of graph-reinvokes-agent-emits-graph. Without a durable value here the cap could never fire, because a reinvoked agent has no other way to learn it was a continuation. Distinct from ParentRunID, which tracks sub-agent lineage within a single turn; a continuation is a NEW top-level turn caused by work that already completed.`})
|
|
8623
|
+
ContinuationDepth: number;
|
|
8624
|
+
|
|
8219
8625
|
@Field({nullable: true})
|
|
8220
8626
|
@MaxLength(255)
|
|
8221
8627
|
Agent?: string;
|
|
@@ -8308,6 +8714,9 @@ each time the agent processes a prompt step.`})
|
|
|
8308
8714
|
@Field(() => [MJExperimentSession_])
|
|
8309
8715
|
MJExperimentSessions_AgentRunIDArray: MJExperimentSession_[]; // Link to MJExperimentSessions
|
|
8310
8716
|
|
|
8717
|
+
@Field(() => [MJTask_])
|
|
8718
|
+
MJTasks_AgentRunIDArray: MJTask_[]; // Link to MJTasks
|
|
8719
|
+
|
|
8311
8720
|
@Field(() => [MJUserRoutineRun_])
|
|
8312
8721
|
MJUserRoutineRuns_AgentRunIDArray: MJUserRoutineRun_[]; // Link to MJUserRoutineRuns
|
|
8313
8722
|
|
|
@@ -8465,6 +8874,12 @@ export class CreateMJAIAgentRunInput {
|
|
|
8465
8874
|
@Field(() => Boolean, { nullable: true })
|
|
8466
8875
|
PlanMode?: boolean;
|
|
8467
8876
|
|
|
8877
|
+
@Field({ nullable: true })
|
|
8878
|
+
ExternalSessionID: string | null;
|
|
8879
|
+
|
|
8880
|
+
@Field(() => Int, { nullable: true })
|
|
8881
|
+
ContinuationDepth?: number;
|
|
8882
|
+
|
|
8468
8883
|
@Field(() => RestoreContextInput, { nullable: true })
|
|
8469
8884
|
RestoreContext___?: RestoreContextInput;
|
|
8470
8885
|
}
|
|
@@ -8622,6 +9037,12 @@ export class UpdateMJAIAgentRunInput {
|
|
|
8622
9037
|
@Field(() => Boolean, { nullable: true })
|
|
8623
9038
|
PlanMode?: boolean;
|
|
8624
9039
|
|
|
9040
|
+
@Field({ nullable: true })
|
|
9041
|
+
ExternalSessionID?: string | null;
|
|
9042
|
+
|
|
9043
|
+
@Field(() => Int, { nullable: true })
|
|
9044
|
+
ContinuationDepth?: number;
|
|
9045
|
+
|
|
8625
9046
|
@Field(() => [KeyValuePairInput], { nullable: true })
|
|
8626
9047
|
OldValues___?: KeyValuePairInput[];
|
|
8627
9048
|
|
|
@@ -8806,6 +9227,16 @@ export class MJAIAgentRunResolver extends ResolverBase {
|
|
|
8806
9227
|
return result;
|
|
8807
9228
|
}
|
|
8808
9229
|
|
|
9230
|
+
@FieldResolver(() => [MJTask_])
|
|
9231
|
+
async MJTasks_AgentRunIDArray(@Root() mjaiagentrun_: MJAIAgentRun_, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
9232
|
+
this.CheckUserReadPermissions('MJ: Tasks', userPayload);
|
|
9233
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
9234
|
+
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwTasks')} WHERE ${provider.QuoteIdentifier('AgentRunID')}=${provider.BuildParameterPlaceholder(0)} ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: Tasks', userPayload, EntityPermissionType.Read, 'AND');
|
|
9235
|
+
const rows = await provider.ExecuteSQL(sSQL, [mjaiagentrun_.ID], undefined, this.GetUserFromPayload(userPayload));
|
|
9236
|
+
const result = await this.ArrayMapFieldNamesToCodeNames('MJ: Tasks', rows, this.GetUserFromPayload(userPayload));
|
|
9237
|
+
return result;
|
|
9238
|
+
}
|
|
9239
|
+
|
|
8809
9240
|
@FieldResolver(() => [MJUserRoutineRun_])
|
|
8810
9241
|
async MJUserRoutineRuns_AgentRunIDArray(@Root() mjaiagentrun_: MJAIAgentRun_, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
8811
9242
|
this.CheckUserReadPermissions('MJ: User Routine Runs', userPayload);
|
|
@@ -11729,6 +12160,9 @@ if this limit is exceeded.`})
|
|
|
11729
12160
|
@Field(() => [MJAISkillSubAgent_])
|
|
11730
12161
|
MJAISkillSubAgents_SubAgentIDArray: MJAISkillSubAgent_[]; // Link to MJAISkillSubAgents
|
|
11731
12162
|
|
|
12163
|
+
@Field(() => [MJAIAgentCredential_])
|
|
12164
|
+
MJAIAgentCredentials_AgentIDArray: MJAIAgentCredential_[]; // Link to MJAIAgentCredentials
|
|
12165
|
+
|
|
11732
12166
|
}
|
|
11733
12167
|
|
|
11734
12168
|
//****************************************************************************
|
|
@@ -12648,6 +13082,16 @@ export class MJAIAgentResolver extends ResolverBase {
|
|
|
12648
13082
|
return result;
|
|
12649
13083
|
}
|
|
12650
13084
|
|
|
13085
|
+
@FieldResolver(() => [MJAIAgentCredential_])
|
|
13086
|
+
async MJAIAgentCredentials_AgentIDArray(@Root() mjaiagent_: MJAIAgent_, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
13087
|
+
this.CheckUserReadPermissions('MJ: AI Agent Credentials', userPayload);
|
|
13088
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
13089
|
+
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwAIAgentCredentials')} WHERE ${provider.QuoteIdentifier('AgentID')}=${provider.BuildParameterPlaceholder(0)} ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: AI Agent Credentials', userPayload, EntityPermissionType.Read, 'AND');
|
|
13090
|
+
const rows = await provider.ExecuteSQL(sSQL, [mjaiagent_.ID], undefined, this.GetUserFromPayload(userPayload));
|
|
13091
|
+
const result = await this.ArrayMapFieldNamesToCodeNames('MJ: AI Agent Credentials', rows, this.GetUserFromPayload(userPayload));
|
|
13092
|
+
return result;
|
|
13093
|
+
}
|
|
13094
|
+
|
|
12651
13095
|
@Mutation(() => MJAIAgent_)
|
|
12652
13096
|
async CreateMJAIAgent(
|
|
12653
13097
|
@Arg('input', () => CreateMJAIAgentInput) input: CreateMJAIAgentInput,
|
|
@@ -16720,6 +17164,9 @@ export class MJAIModel_ {
|
|
|
16720
17164
|
@Field(() => [MJScopedPromptConfig_])
|
|
16721
17165
|
MJScopedPromptConfigs_ModelIDArray: MJScopedPromptConfig_[]; // Link to MJScopedPromptConfigs
|
|
16722
17166
|
|
|
17167
|
+
@Field(() => [MJAIAgentHarness_])
|
|
17168
|
+
MJAIAgentHarnesses_AIModelIDArray: MJAIAgentHarness_[]; // Link to MJAIAgentHarnesses
|
|
17169
|
+
|
|
16723
17170
|
}
|
|
16724
17171
|
|
|
16725
17172
|
//****************************************************************************
|
|
@@ -17191,6 +17638,16 @@ export class MJAIModelResolver extends ResolverBase {
|
|
|
17191
17638
|
return result;
|
|
17192
17639
|
}
|
|
17193
17640
|
|
|
17641
|
+
@FieldResolver(() => [MJAIAgentHarness_])
|
|
17642
|
+
async MJAIAgentHarnesses_AIModelIDArray(@Root() mjaimodel_: MJAIModel_, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
17643
|
+
this.CheckUserReadPermissions('MJ: AI Agent Harnesses', userPayload);
|
|
17644
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
17645
|
+
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwAIAgentHarnesses')} WHERE ${provider.QuoteIdentifier('AIModelID')}=${provider.BuildParameterPlaceholder(0)} ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: AI Agent Harnesses', userPayload, EntityPermissionType.Read, 'AND');
|
|
17646
|
+
const rows = await provider.ExecuteSQL(sSQL, [mjaimodel_.ID], undefined, this.GetUserFromPayload(userPayload));
|
|
17647
|
+
const result = await this.ArrayMapFieldNamesToCodeNames('MJ: AI Agent Harnesses', rows, this.GetUserFromPayload(userPayload));
|
|
17648
|
+
return result;
|
|
17649
|
+
}
|
|
17650
|
+
|
|
17194
17651
|
@Mutation(() => MJAIModel_)
|
|
17195
17652
|
async CreateMJAIModel(
|
|
17196
17653
|
@Arg('input', () => CreateMJAIModelInput) input: CreateMJAIModelInput,
|
|
@@ -22087,6 +22544,9 @@ export class MJAIVendor_ {
|
|
|
22087
22544
|
@Field(() => [MJScopedPromptConfig_])
|
|
22088
22545
|
MJScopedPromptConfigs_VendorIDArray: MJScopedPromptConfig_[]; // Link to MJScopedPromptConfigs
|
|
22089
22546
|
|
|
22547
|
+
@Field(() => [MJAIAgentHarness_])
|
|
22548
|
+
MJAIAgentHarnesses_AIVendorIDArray: MJAIAgentHarness_[]; // Link to MJAIAgentHarnesses
|
|
22549
|
+
|
|
22090
22550
|
}
|
|
22091
22551
|
|
|
22092
22552
|
//****************************************************************************
|
|
@@ -22282,6 +22742,16 @@ export class MJAIVendorResolver extends ResolverBase {
|
|
|
22282
22742
|
return result;
|
|
22283
22743
|
}
|
|
22284
22744
|
|
|
22745
|
+
@FieldResolver(() => [MJAIAgentHarness_])
|
|
22746
|
+
async MJAIAgentHarnesses_AIVendorIDArray(@Root() mjaivendor_: MJAIVendor_, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
22747
|
+
this.CheckUserReadPermissions('MJ: AI Agent Harnesses', userPayload);
|
|
22748
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
22749
|
+
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwAIAgentHarnesses')} WHERE ${provider.QuoteIdentifier('AIVendorID')}=${provider.BuildParameterPlaceholder(0)} ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: AI Agent Harnesses', userPayload, EntityPermissionType.Read, 'AND');
|
|
22750
|
+
const rows = await provider.ExecuteSQL(sSQL, [mjaivendor_.ID], undefined, this.GetUserFromPayload(userPayload));
|
|
22751
|
+
const result = await this.ArrayMapFieldNamesToCodeNames('MJ: AI Agent Harnesses', rows, this.GetUserFromPayload(userPayload));
|
|
22752
|
+
return result;
|
|
22753
|
+
}
|
|
22754
|
+
|
|
22285
22755
|
@Mutation(() => MJAIVendor_)
|
|
22286
22756
|
async CreateMJAIVendor(
|
|
22287
22757
|
@Arg('input', () => CreateMJAIVendorInput) input: CreateMJAIVendorInput,
|
|
@@ -36915,10 +37385,6 @@ export class MJContentSource_ {
|
|
|
36915
37385
|
@MaxLength(36)
|
|
36916
37386
|
EntityDocumentID?: string;
|
|
36917
37387
|
|
|
36918
|
-
@Field({nullable: true, description: `Optional link to a MJ Scheduled Action that automatically runs the classification pipeline for this source on a cron schedule.`})
|
|
36919
|
-
@MaxLength(36)
|
|
36920
|
-
ScheduledActionID?: string;
|
|
36921
|
-
|
|
36922
37388
|
@Field({nullable: true, description: `Registration key of the segmentation strategy used to split this source's content into embeddable chunks — for example StructuralText (document headings), AdaptiveBoundary (target size closing on the nearest natural break), SemanticText (LLM-detected topic boundaries), Transcript (audio/video chapters), PagedContent (one segment per page), or FixedWindow (uniform windows). NULL falls back to the Content Type's value, then to a built-in default.`})
|
|
36923
37389
|
@MaxLength(100)
|
|
36924
37390
|
SegmenterKey?: string;
|
|
@@ -36927,6 +37393,10 @@ export class MJContentSource_ {
|
|
|
36927
37393
|
@MaxLength(100)
|
|
36928
37394
|
CleanerKey?: string;
|
|
36929
37395
|
|
|
37396
|
+
@Field({nullable: true, description: `Optional link to the Scheduled Job that runs this content source on a recurring basis. Replaces the retired ScheduledActionID link; the job is of type Action and carries its action + parameters in ScheduledJob.Configuration.`})
|
|
37397
|
+
@MaxLength(36)
|
|
37398
|
+
ScheduledJobID?: string;
|
|
37399
|
+
|
|
36930
37400
|
@Field()
|
|
36931
37401
|
@MaxLength(255)
|
|
36932
37402
|
ContentType: string;
|
|
@@ -36956,8 +37426,8 @@ export class MJContentSource_ {
|
|
|
36956
37426
|
EntityDocument?: string;
|
|
36957
37427
|
|
|
36958
37428
|
@Field({nullable: true})
|
|
36959
|
-
@MaxLength(
|
|
36960
|
-
|
|
37429
|
+
@MaxLength(200)
|
|
37430
|
+
ScheduledJob?: string;
|
|
36961
37431
|
|
|
36962
37432
|
@Field(() => [MJContentItem_])
|
|
36963
37433
|
MJContentItems_ContentSourceIDArray: MJContentItem_[]; // Link to MJContentItems
|
|
@@ -37014,15 +37484,15 @@ export class CreateMJContentSourceInput {
|
|
|
37014
37484
|
@Field({ nullable: true })
|
|
37015
37485
|
EntityDocumentID: string | null;
|
|
37016
37486
|
|
|
37017
|
-
@Field({ nullable: true })
|
|
37018
|
-
ScheduledActionID: string | null;
|
|
37019
|
-
|
|
37020
37487
|
@Field({ nullable: true })
|
|
37021
37488
|
SegmenterKey: string | null;
|
|
37022
37489
|
|
|
37023
37490
|
@Field({ nullable: true })
|
|
37024
37491
|
CleanerKey: string | null;
|
|
37025
37492
|
|
|
37493
|
+
@Field({ nullable: true })
|
|
37494
|
+
ScheduledJobID: string | null;
|
|
37495
|
+
|
|
37026
37496
|
@Field(() => RestoreContextInput, { nullable: true })
|
|
37027
37497
|
RestoreContext___?: RestoreContextInput;
|
|
37028
37498
|
}
|
|
@@ -37066,15 +37536,15 @@ export class UpdateMJContentSourceInput {
|
|
|
37066
37536
|
@Field({ nullable: true })
|
|
37067
37537
|
EntityDocumentID?: string | null;
|
|
37068
37538
|
|
|
37069
|
-
@Field({ nullable: true })
|
|
37070
|
-
ScheduledActionID?: string | null;
|
|
37071
|
-
|
|
37072
37539
|
@Field({ nullable: true })
|
|
37073
37540
|
SegmenterKey?: string | null;
|
|
37074
37541
|
|
|
37075
37542
|
@Field({ nullable: true })
|
|
37076
37543
|
CleanerKey?: string | null;
|
|
37077
37544
|
|
|
37545
|
+
@Field({ nullable: true })
|
|
37546
|
+
ScheduledJobID?: string | null;
|
|
37547
|
+
|
|
37078
37548
|
@Field(() => [KeyValuePairInput], { nullable: true })
|
|
37079
37549
|
OldValues___?: KeyValuePairInput[];
|
|
37080
37550
|
|
|
@@ -39180,9 +39650,6 @@ export class MJConversationDetail_ {
|
|
|
39180
39650
|
@MaxLength(36)
|
|
39181
39651
|
RootParentID?: string;
|
|
39182
39652
|
|
|
39183
|
-
@Field(() => [MJReport_])
|
|
39184
|
-
MJReports_ConversationDetailIDArray: MJReport_[]; // Link to MJReports
|
|
39185
|
-
|
|
39186
39653
|
@Field(() => [MJConversationDetailArtifact_])
|
|
39187
39654
|
MJConversationDetailArtifacts_ConversationDetailIDArray: MJConversationDetailArtifact_[]; // Link to MJConversationDetailArtifacts
|
|
39188
39655
|
|
|
@@ -39471,16 +39938,6 @@ export class MJConversationDetailResolver extends ResolverBase {
|
|
|
39471
39938
|
return result;
|
|
39472
39939
|
}
|
|
39473
39940
|
|
|
39474
|
-
@FieldResolver(() => [MJReport_])
|
|
39475
|
-
async MJReports_ConversationDetailIDArray(@Root() mjconversationdetail_: MJConversationDetail_, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
39476
|
-
this.CheckUserReadPermissions('MJ: Reports', userPayload);
|
|
39477
|
-
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
39478
|
-
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwReports')} WHERE ${provider.QuoteIdentifier('ConversationDetailID')}=${provider.BuildParameterPlaceholder(0)} ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: Reports', userPayload, EntityPermissionType.Read, 'AND');
|
|
39479
|
-
const rows = await provider.ExecuteSQL(sSQL, [mjconversationdetail_.ID], undefined, this.GetUserFromPayload(userPayload));
|
|
39480
|
-
const result = await this.ArrayMapFieldNamesToCodeNames('MJ: Reports', rows, this.GetUserFromPayload(userPayload));
|
|
39481
|
-
return result;
|
|
39482
|
-
}
|
|
39483
|
-
|
|
39484
39941
|
@FieldResolver(() => [MJConversationDetailArtifact_])
|
|
39485
39942
|
async MJConversationDetailArtifacts_ConversationDetailIDArray(@Root() mjconversationdetail_: MJConversationDetail_, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
39486
39943
|
this.CheckUserReadPermissions('MJ: Conversation Detail Artifacts', userPayload);
|
|
@@ -40041,9 +40498,6 @@ export class MJConversation_ {
|
|
|
40041
40498
|
@Field(() => [MJConversationDetail_])
|
|
40042
40499
|
MJConversationDetails_ConversationIDArray: MJConversationDetail_[]; // Link to MJConversationDetails
|
|
40043
40500
|
|
|
40044
|
-
@Field(() => [MJReport_])
|
|
40045
|
-
MJReports_ConversationIDArray: MJReport_[]; // Link to MJReports
|
|
40046
|
-
|
|
40047
40501
|
@Field(() => [MJConversationArtifact_])
|
|
40048
40502
|
MJConversationArtifacts_ConversationIDArray: MJConversationArtifact_[]; // Link to MJConversationArtifacts
|
|
40049
40503
|
|
|
@@ -40294,16 +40748,6 @@ export class MJConversationResolver extends ResolverBase {
|
|
|
40294
40748
|
return result;
|
|
40295
40749
|
}
|
|
40296
40750
|
|
|
40297
|
-
@FieldResolver(() => [MJReport_])
|
|
40298
|
-
async MJReports_ConversationIDArray(@Root() mjconversation_: MJConversation_, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
40299
|
-
this.CheckUserReadPermissions('MJ: Reports', userPayload);
|
|
40300
|
-
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
40301
|
-
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwReports')} WHERE ${provider.QuoteIdentifier('ConversationID')}=${provider.BuildParameterPlaceholder(0)} ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: Reports', userPayload, EntityPermissionType.Read, 'AND');
|
|
40302
|
-
const rows = await provider.ExecuteSQL(sSQL, [mjconversation_.ID], undefined, this.GetUserFromPayload(userPayload));
|
|
40303
|
-
const result = await this.ArrayMapFieldNamesToCodeNames('MJ: Reports', rows, this.GetUserFromPayload(userPayload));
|
|
40304
|
-
return result;
|
|
40305
|
-
}
|
|
40306
|
-
|
|
40307
40751
|
@FieldResolver(() => [MJConversationArtifact_])
|
|
40308
40752
|
async MJConversationArtifacts_ConversationIDArray(@Root() mjconversation_: MJConversation_, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
40309
40753
|
this.CheckUserReadPermissions('MJ: Conversation Artifacts', userPayload);
|
|
@@ -41180,6 +41624,9 @@ export class MJCredential_ {
|
|
|
41180
41624
|
@Field(() => [MJExternalDataSource_])
|
|
41181
41625
|
MJExternalDataSources_CredentialIDArray: MJExternalDataSource_[]; // Link to MJExternalDataSources
|
|
41182
41626
|
|
|
41627
|
+
@Field(() => [MJAIAgentCredential_])
|
|
41628
|
+
MJAIAgentCredentials_CredentialIDArray: MJAIAgentCredential_[]; // Link to MJAIAgentCredentials
|
|
41629
|
+
|
|
41183
41630
|
}
|
|
41184
41631
|
|
|
41185
41632
|
//****************************************************************************
|
|
@@ -41423,6 +41870,16 @@ export class MJCredentialResolver extends ResolverBase {
|
|
|
41423
41870
|
return result;
|
|
41424
41871
|
}
|
|
41425
41872
|
|
|
41873
|
+
@FieldResolver(() => [MJAIAgentCredential_])
|
|
41874
|
+
async MJAIAgentCredentials_CredentialIDArray(@Root() mjcredential_: MJCredential_, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
41875
|
+
this.CheckUserReadPermissions('MJ: AI Agent Credentials', userPayload);
|
|
41876
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
41877
|
+
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwAIAgentCredentials')} WHERE ${provider.QuoteIdentifier('CredentialID')}=${provider.BuildParameterPlaceholder(0)} ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: AI Agent Credentials', userPayload, EntityPermissionType.Read, 'AND');
|
|
41878
|
+
const rows = await provider.ExecuteSQL(sSQL, [mjcredential_.ID], undefined, this.GetUserFromPayload(userPayload));
|
|
41879
|
+
const result = await this.ArrayMapFieldNamesToCodeNames('MJ: AI Agent Credentials', rows, this.GetUserFromPayload(userPayload));
|
|
41880
|
+
return result;
|
|
41881
|
+
}
|
|
41882
|
+
|
|
41426
41883
|
@Mutation(() => MJCredential_)
|
|
41427
41884
|
async CreateMJCredential(
|
|
41428
41885
|
@Arg('input', () => CreateMJCredentialInput) input: CreateMJCredentialInput,
|
|
@@ -43468,9 +43925,6 @@ export class MJDataContext_ {
|
|
|
43468
43925
|
@Field(() => [MJDataContextItem_])
|
|
43469
43926
|
MJDataContextItems_DataContextIDArray: MJDataContextItem_[]; // Link to MJDataContextItems
|
|
43470
43927
|
|
|
43471
|
-
@Field(() => [MJReport_])
|
|
43472
|
-
MJReports_DataContextIDArray: MJReport_[]; // Link to MJReports
|
|
43473
|
-
|
|
43474
43928
|
@Field(() => [MJConversation_])
|
|
43475
43929
|
MJConversations_DataContextIDArray: MJConversation_[]; // Link to MJConversations
|
|
43476
43930
|
|
|
@@ -43595,16 +44049,6 @@ export class MJDataContextResolver extends ResolverBase {
|
|
|
43595
44049
|
return result;
|
|
43596
44050
|
}
|
|
43597
44051
|
|
|
43598
|
-
@FieldResolver(() => [MJReport_])
|
|
43599
|
-
async MJReports_DataContextIDArray(@Root() mjdatacontext_: MJDataContext_, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
43600
|
-
this.CheckUserReadPermissions('MJ: Reports', userPayload);
|
|
43601
|
-
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
43602
|
-
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwReports')} WHERE ${provider.QuoteIdentifier('DataContextID')}=${provider.BuildParameterPlaceholder(0)} ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: Reports', userPayload, EntityPermissionType.Read, 'AND');
|
|
43603
|
-
const rows = await provider.ExecuteSQL(sSQL, [mjdatacontext_.ID], undefined, this.GetUserFromPayload(userPayload));
|
|
43604
|
-
const result = await this.ArrayMapFieldNamesToCodeNames('MJ: Reports', rows, this.GetUserFromPayload(userPayload));
|
|
43605
|
-
return result;
|
|
43606
|
-
}
|
|
43607
|
-
|
|
43608
44052
|
@FieldResolver(() => [MJConversation_])
|
|
43609
44053
|
async MJConversations_DataContextIDArray(@Root() mjdatacontext_: MJDataContext_, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
43610
44054
|
this.CheckUserReadPermissions('MJ: Conversations', userPayload);
|
|
@@ -53036,6 +53480,9 @@ export class MJEntityRelationship_ {
|
|
|
53036
53480
|
@Field(() => Boolean, {description: `When 1, allows system/LLM to auto-update AdditionalFieldsToInclude; when 0, user has locked this field`})
|
|
53037
53481
|
AutoUpdateAdditionalFieldsToInclude: boolean;
|
|
53038
53482
|
|
|
53483
|
+
@Field({nullable: true, description: `Optional JSON policy object that declares this relationship as a first-class related-record collection, so CodeGen can emit a typed DeclareRelatedRecords(...) declaration on the entity subclass. Shape is IRelatedRecordCollectionConfig: Name (the generated property name, e.g. "Lines"), Load ('explicit' | 'immediate' | 'lazy' | 'never'), Source ('database' | 'cache'), ReadOnly, OnRemove ('delete' | 'orphan' | 'refuse'), OrderBy, Sequence ({ Field, From }), and ClearAfterSave. Source 'cache' reads the related records from whichever loaded BaseEngine already holds that entity, costing no query, and defaults ReadOnly to true because those are the engine's own instances; 'lazy' fills on first access and requires both. RelatedEntity and RelatedEntityJoinField are NOT repeated here — they are read from this row's own columns. NULL means the relationship is not a declared collection, which is the default and reproduces pre-6.2 behaviour exactly.`})
|
|
53484
|
+
RelatedRecordCollection?: string;
|
|
53485
|
+
|
|
53039
53486
|
@Field()
|
|
53040
53487
|
@MaxLength(255)
|
|
53041
53488
|
Entity: string;
|
|
@@ -53146,6 +53593,9 @@ export class CreateMJEntityRelationshipInput {
|
|
|
53146
53593
|
@Field(() => Boolean, { nullable: true })
|
|
53147
53594
|
AutoUpdateAdditionalFieldsToInclude?: boolean;
|
|
53148
53595
|
|
|
53596
|
+
@Field({ nullable: true })
|
|
53597
|
+
RelatedRecordCollection: string | null;
|
|
53598
|
+
|
|
53149
53599
|
@Field(() => RestoreContextInput, { nullable: true })
|
|
53150
53600
|
RestoreContext___?: RestoreContextInput;
|
|
53151
53601
|
}
|
|
@@ -53222,6 +53672,9 @@ export class UpdateMJEntityRelationshipInput {
|
|
|
53222
53672
|
@Field(() => Boolean, { nullable: true })
|
|
53223
53673
|
AutoUpdateAdditionalFieldsToInclude?: boolean;
|
|
53224
53674
|
|
|
53675
|
+
@Field({ nullable: true })
|
|
53676
|
+
RelatedRecordCollection?: string | null;
|
|
53677
|
+
|
|
53225
53678
|
@Field(() => [KeyValuePairInput], { nullable: true })
|
|
53226
53679
|
OldValues___?: KeyValuePairInput[];
|
|
53227
53680
|
|
|
@@ -53541,9 +53994,6 @@ export class MJEnvironment_ {
|
|
|
53541
53994
|
@Field(() => [MJTask_])
|
|
53542
53995
|
MJTasks_EnvironmentIDArray: MJTask_[]; // Link to MJTasks
|
|
53543
53996
|
|
|
53544
|
-
@Field(() => [MJReport_])
|
|
53545
|
-
MJReports_EnvironmentIDArray: MJReport_[]; // Link to MJReports
|
|
53546
|
-
|
|
53547
53997
|
@Field(() => [MJConversation_])
|
|
53548
53998
|
MJConversations_EnvironmentIDArray: MJConversation_[]; // Link to MJConversations
|
|
53549
53999
|
|
|
@@ -53711,16 +54161,6 @@ export class MJEnvironmentResolver extends ResolverBase {
|
|
|
53711
54161
|
return result;
|
|
53712
54162
|
}
|
|
53713
54163
|
|
|
53714
|
-
@FieldResolver(() => [MJReport_])
|
|
53715
|
-
async MJReports_EnvironmentIDArray(@Root() mjenvironment_: MJEnvironment_, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
53716
|
-
this.CheckUserReadPermissions('MJ: Reports', userPayload);
|
|
53717
|
-
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
53718
|
-
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwReports')} WHERE ${provider.QuoteIdentifier('EnvironmentID')}=${provider.BuildParameterPlaceholder(0)} ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: Reports', userPayload, EntityPermissionType.Read, 'AND');
|
|
53719
|
-
const rows = await provider.ExecuteSQL(sSQL, [mjenvironment_.ID], undefined, this.GetUserFromPayload(userPayload));
|
|
53720
|
-
const result = await this.ArrayMapFieldNamesToCodeNames('MJ: Reports', rows, this.GetUserFromPayload(userPayload));
|
|
53721
|
-
return result;
|
|
53722
|
-
}
|
|
53723
|
-
|
|
53724
54164
|
@FieldResolver(() => [MJConversation_])
|
|
53725
54165
|
async MJConversations_EnvironmentIDArray(@Root() mjenvironment_: MJEnvironment_, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
53726
54166
|
this.CheckUserReadPermissions('MJ: Conversations', userPayload);
|
|
@@ -67375,9 +67815,6 @@ export class MJOutputDeliveryType_ {
|
|
|
67375
67815
|
@Field()
|
|
67376
67816
|
_mj__UpdatedAt: Date;
|
|
67377
67817
|
|
|
67378
|
-
@Field(() => [MJReport_])
|
|
67379
|
-
MJReports_OutputDeliveryTypeIDArray: MJReport_[]; // Link to MJReports
|
|
67380
|
-
|
|
67381
67818
|
}
|
|
67382
67819
|
|
|
67383
67820
|
//****************************************************************************
|
|
@@ -67477,16 +67914,6 @@ export class MJOutputDeliveryTypeResolver extends ResolverBase {
|
|
|
67477
67914
|
return result;
|
|
67478
67915
|
}
|
|
67479
67916
|
|
|
67480
|
-
@FieldResolver(() => [MJReport_])
|
|
67481
|
-
async MJReports_OutputDeliveryTypeIDArray(@Root() mjoutputdeliverytype_: MJOutputDeliveryType_, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
67482
|
-
this.CheckUserReadPermissions('MJ: Reports', userPayload);
|
|
67483
|
-
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
67484
|
-
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwReports')} WHERE ${provider.QuoteIdentifier('OutputDeliveryTypeID')}=${provider.BuildParameterPlaceholder(0)} ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: Reports', userPayload, EntityPermissionType.Read, 'AND');
|
|
67485
|
-
const rows = await provider.ExecuteSQL(sSQL, [mjoutputdeliverytype_.ID], undefined, this.GetUserFromPayload(userPayload));
|
|
67486
|
-
const result = await this.ArrayMapFieldNamesToCodeNames('MJ: Reports', rows, this.GetUserFromPayload(userPayload));
|
|
67487
|
-
return result;
|
|
67488
|
-
}
|
|
67489
|
-
|
|
67490
67917
|
@Mutation(() => MJOutputDeliveryType_)
|
|
67491
67918
|
async CreateMJOutputDeliveryType(
|
|
67492
67919
|
@Arg('input', () => CreateMJOutputDeliveryTypeInput) input: CreateMJOutputDeliveryTypeInput,
|
|
@@ -67541,9 +67968,6 @@ export class MJOutputFormatType_ {
|
|
|
67541
67968
|
@Field()
|
|
67542
67969
|
_mj__UpdatedAt: Date;
|
|
67543
67970
|
|
|
67544
|
-
@Field(() => [MJReport_])
|
|
67545
|
-
MJReports_OutputFormatTypeIDArray: MJReport_[]; // Link to MJReports
|
|
67546
|
-
|
|
67547
67971
|
}
|
|
67548
67972
|
|
|
67549
67973
|
//****************************************************************************
|
|
@@ -67649,16 +68073,6 @@ export class MJOutputFormatTypeResolver extends ResolverBase {
|
|
|
67649
68073
|
return result;
|
|
67650
68074
|
}
|
|
67651
68075
|
|
|
67652
|
-
@FieldResolver(() => [MJReport_])
|
|
67653
|
-
async MJReports_OutputFormatTypeIDArray(@Root() mjoutputformattype_: MJOutputFormatType_, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
67654
|
-
this.CheckUserReadPermissions('MJ: Reports', userPayload);
|
|
67655
|
-
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
67656
|
-
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwReports')} WHERE ${provider.QuoteIdentifier('OutputFormatTypeID')}=${provider.BuildParameterPlaceholder(0)} ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: Reports', userPayload, EntityPermissionType.Read, 'AND');
|
|
67657
|
-
const rows = await provider.ExecuteSQL(sSQL, [mjoutputformattype_.ID], undefined, this.GetUserFromPayload(userPayload));
|
|
67658
|
-
const result = await this.ArrayMapFieldNamesToCodeNames('MJ: Reports', rows, this.GetUserFromPayload(userPayload));
|
|
67659
|
-
return result;
|
|
67660
|
-
}
|
|
67661
|
-
|
|
67662
68076
|
@Mutation(() => MJOutputFormatType_)
|
|
67663
68077
|
async CreateMJOutputFormatType(
|
|
67664
68078
|
@Arg('input', () => CreateMJOutputFormatTypeInput) input: CreateMJOutputFormatTypeInput,
|
|
@@ -67688,169 +68102,6 @@ export class MJOutputFormatTypeResolver extends ResolverBase {
|
|
|
67688
68102
|
|
|
67689
68103
|
}
|
|
67690
68104
|
|
|
67691
|
-
//****************************************************************************
|
|
67692
|
-
// ENTITY CLASS for MJ: Output Trigger Types
|
|
67693
|
-
//****************************************************************************
|
|
67694
|
-
@ObjectType({ description: `Defines events that can trigger output generation such as schedules, data changes, or manual requests.` })
|
|
67695
|
-
export class MJOutputTriggerType_ {
|
|
67696
|
-
@Field()
|
|
67697
|
-
@MaxLength(36)
|
|
67698
|
-
ID: string;
|
|
67699
|
-
|
|
67700
|
-
@Field()
|
|
67701
|
-
@MaxLength(255)
|
|
67702
|
-
Name: string;
|
|
67703
|
-
|
|
67704
|
-
@Field({nullable: true})
|
|
67705
|
-
Description?: string;
|
|
67706
|
-
|
|
67707
|
-
@Field()
|
|
67708
|
-
_mj__CreatedAt: Date;
|
|
67709
|
-
|
|
67710
|
-
@Field()
|
|
67711
|
-
_mj__UpdatedAt: Date;
|
|
67712
|
-
|
|
67713
|
-
@Field(() => [MJReport_])
|
|
67714
|
-
MJReports_OutputTriggerTypeIDArray: MJReport_[]; // Link to MJReports
|
|
67715
|
-
|
|
67716
|
-
}
|
|
67717
|
-
|
|
67718
|
-
//****************************************************************************
|
|
67719
|
-
// INPUT TYPE for MJ: Output Trigger Types
|
|
67720
|
-
//****************************************************************************
|
|
67721
|
-
@InputType()
|
|
67722
|
-
export class CreateMJOutputTriggerTypeInput {
|
|
67723
|
-
@Field({ nullable: true })
|
|
67724
|
-
ID?: string;
|
|
67725
|
-
|
|
67726
|
-
@Field({ nullable: true })
|
|
67727
|
-
Name?: string;
|
|
67728
|
-
|
|
67729
|
-
@Field({ nullable: true })
|
|
67730
|
-
Description: string | null;
|
|
67731
|
-
|
|
67732
|
-
@Field(() => RestoreContextInput, { nullable: true })
|
|
67733
|
-
RestoreContext___?: RestoreContextInput;
|
|
67734
|
-
}
|
|
67735
|
-
|
|
67736
|
-
|
|
67737
|
-
//****************************************************************************
|
|
67738
|
-
// INPUT TYPE for MJ: Output Trigger Types
|
|
67739
|
-
//****************************************************************************
|
|
67740
|
-
@InputType()
|
|
67741
|
-
export class UpdateMJOutputTriggerTypeInput {
|
|
67742
|
-
@Field()
|
|
67743
|
-
ID: string;
|
|
67744
|
-
|
|
67745
|
-
@Field({ nullable: true })
|
|
67746
|
-
Name?: string;
|
|
67747
|
-
|
|
67748
|
-
@Field({ nullable: true })
|
|
67749
|
-
Description?: string | null;
|
|
67750
|
-
|
|
67751
|
-
@Field(() => [KeyValuePairInput], { nullable: true })
|
|
67752
|
-
OldValues___?: KeyValuePairInput[];
|
|
67753
|
-
|
|
67754
|
-
@Field(() => RestoreContextInput, { nullable: true })
|
|
67755
|
-
RestoreContext___?: RestoreContextInput;
|
|
67756
|
-
}
|
|
67757
|
-
|
|
67758
|
-
//****************************************************************************
|
|
67759
|
-
// RESOLVER for MJ: Output Trigger Types
|
|
67760
|
-
//****************************************************************************
|
|
67761
|
-
@ObjectType()
|
|
67762
|
-
export class RunMJOutputTriggerTypeViewResult {
|
|
67763
|
-
@Field(() => [MJOutputTriggerType_])
|
|
67764
|
-
Results: MJOutputTriggerType_[];
|
|
67765
|
-
|
|
67766
|
-
@Field(() => String, {nullable: true})
|
|
67767
|
-
UserViewRunID?: string;
|
|
67768
|
-
|
|
67769
|
-
@Field(() => Int, {nullable: true})
|
|
67770
|
-
RowCount: number;
|
|
67771
|
-
|
|
67772
|
-
@Field(() => Int, {nullable: true})
|
|
67773
|
-
TotalRowCount: number;
|
|
67774
|
-
|
|
67775
|
-
@Field(() => Int, {nullable: true})
|
|
67776
|
-
ExecutionTime: number;
|
|
67777
|
-
|
|
67778
|
-
@Field({nullable: true})
|
|
67779
|
-
ErrorMessage?: string;
|
|
67780
|
-
|
|
67781
|
-
@Field(() => Boolean, {nullable: false})
|
|
67782
|
-
Success: boolean;
|
|
67783
|
-
}
|
|
67784
|
-
|
|
67785
|
-
@Resolver(MJOutputTriggerType_)
|
|
67786
|
-
export class MJOutputTriggerTypeResolver extends ResolverBase {
|
|
67787
|
-
@Query(() => RunMJOutputTriggerTypeViewResult)
|
|
67788
|
-
async RunMJOutputTriggerTypeViewByID(@Arg('input', () => RunViewByIDInput) input: RunViewByIDInput, @Ctx() { providers, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
67789
|
-
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
67790
|
-
return super.RunViewByIDGeneric(input, provider, userPayload, pubSub);
|
|
67791
|
-
}
|
|
67792
|
-
|
|
67793
|
-
@Query(() => RunMJOutputTriggerTypeViewResult)
|
|
67794
|
-
async RunMJOutputTriggerTypeViewByName(@Arg('input', () => RunViewByNameInput) input: RunViewByNameInput, @Ctx() { providers, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
67795
|
-
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
67796
|
-
return super.RunViewByNameGeneric(input, provider, userPayload, pubSub);
|
|
67797
|
-
}
|
|
67798
|
-
|
|
67799
|
-
@Query(() => RunMJOutputTriggerTypeViewResult)
|
|
67800
|
-
async RunMJOutputTriggerTypeDynamicView(@Arg('input', () => RunDynamicViewInput) input: RunDynamicViewInput, @Ctx() { providers, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
67801
|
-
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
67802
|
-
input.EntityName = 'MJ: Output Trigger Types';
|
|
67803
|
-
return super.RunDynamicViewGeneric(input, provider, userPayload, pubSub);
|
|
67804
|
-
}
|
|
67805
|
-
@Query(() => MJOutputTriggerType_, { nullable: true })
|
|
67806
|
-
async MJOutputTriggerType(@Arg('ID', () => String) ID: string, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine): Promise<MJOutputTriggerType_ | null> {
|
|
67807
|
-
this.CheckUserReadPermissions('MJ: Output Trigger Types', userPayload);
|
|
67808
|
-
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
67809
|
-
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwOutputTriggerTypes')} WHERE ${provider.QuoteIdentifier('ID')}=${provider.BuildParameterPlaceholder(0)} ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: Output Trigger Types', userPayload, EntityPermissionType.Read, 'AND');
|
|
67810
|
-
const rows = await provider.ExecuteSQL(sSQL, [ID], undefined, this.GetUserFromPayload(userPayload));
|
|
67811
|
-
const result = await this.MapFieldNamesToCodeNames('MJ: Output Trigger Types', rows && rows.length > 0 ? rows[0] : null, this.GetUserFromPayload(userPayload));
|
|
67812
|
-
return result;
|
|
67813
|
-
}
|
|
67814
|
-
|
|
67815
|
-
@FieldResolver(() => [MJReport_])
|
|
67816
|
-
async MJReports_OutputTriggerTypeIDArray(@Root() mjoutputtriggertype_: MJOutputTriggerType_, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
67817
|
-
this.CheckUserReadPermissions('MJ: Reports', userPayload);
|
|
67818
|
-
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
67819
|
-
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwReports')} WHERE ${provider.QuoteIdentifier('OutputTriggerTypeID')}=${provider.BuildParameterPlaceholder(0)} ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: Reports', userPayload, EntityPermissionType.Read, 'AND');
|
|
67820
|
-
const rows = await provider.ExecuteSQL(sSQL, [mjoutputtriggertype_.ID], undefined, this.GetUserFromPayload(userPayload));
|
|
67821
|
-
const result = await this.ArrayMapFieldNamesToCodeNames('MJ: Reports', rows, this.GetUserFromPayload(userPayload));
|
|
67822
|
-
return result;
|
|
67823
|
-
}
|
|
67824
|
-
|
|
67825
|
-
@Mutation(() => MJOutputTriggerType_)
|
|
67826
|
-
async CreateMJOutputTriggerType(
|
|
67827
|
-
@Arg('input', () => CreateMJOutputTriggerTypeInput) input: CreateMJOutputTriggerTypeInput,
|
|
67828
|
-
@Ctx() { providers, userPayload }: AppContext,
|
|
67829
|
-
@PubSub() pubSub: PubSubEngine
|
|
67830
|
-
) {
|
|
67831
|
-
const provider = GetReadWriteProvider(providers);
|
|
67832
|
-
return this.CreateRecord('MJ: Output Trigger Types', input, provider, userPayload, pubSub)
|
|
67833
|
-
}
|
|
67834
|
-
|
|
67835
|
-
@Mutation(() => MJOutputTriggerType_)
|
|
67836
|
-
async UpdateMJOutputTriggerType(
|
|
67837
|
-
@Arg('input', () => UpdateMJOutputTriggerTypeInput) input: UpdateMJOutputTriggerTypeInput,
|
|
67838
|
-
@Ctx() { providers, userPayload }: AppContext,
|
|
67839
|
-
@PubSub() pubSub: PubSubEngine
|
|
67840
|
-
) {
|
|
67841
|
-
const provider = GetReadWriteProvider(providers);
|
|
67842
|
-
return this.UpdateRecord('MJ: Output Trigger Types', input, provider, userPayload, pubSub);
|
|
67843
|
-
}
|
|
67844
|
-
|
|
67845
|
-
@Mutation(() => MJOutputTriggerType_)
|
|
67846
|
-
async DeleteMJOutputTriggerType(@Arg('ID', () => String) ID: string, @Arg('options___', () => DeleteOptionsInput) options: DeleteOptionsInput, @Ctx() { providers, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
67847
|
-
const provider = GetReadWriteProvider(providers);
|
|
67848
|
-
const key = new CompositeKey([{FieldName: 'ID', Value: ID}]);
|
|
67849
|
-
return this.DeleteRecord('MJ: Output Trigger Types', key, options, provider, userPayload, pubSub);
|
|
67850
|
-
}
|
|
67851
|
-
|
|
67852
|
-
}
|
|
67853
|
-
|
|
67854
68105
|
//****************************************************************************
|
|
67855
68106
|
// ENTITY CLASS for MJ: Permission Domains
|
|
67856
68107
|
//****************************************************************************
|
|
@@ -75398,1118 +75649,6 @@ export class MJRemoteOperationResolver extends ResolverBase {
|
|
|
75398
75649
|
|
|
75399
75650
|
}
|
|
75400
75651
|
|
|
75401
|
-
//****************************************************************************
|
|
75402
|
-
// ENTITY CLASS for MJ: Report Categories
|
|
75403
|
-
//****************************************************************************
|
|
75404
|
-
@ObjectType({ description: `Organizes reports into logical groupings for navigation, access control, and discovery within the reporting system.` })
|
|
75405
|
-
export class MJReportCategory_ {
|
|
75406
|
-
@Field()
|
|
75407
|
-
@MaxLength(36)
|
|
75408
|
-
ID: string;
|
|
75409
|
-
|
|
75410
|
-
@Field()
|
|
75411
|
-
@MaxLength(100)
|
|
75412
|
-
Name: string;
|
|
75413
|
-
|
|
75414
|
-
@Field({nullable: true})
|
|
75415
|
-
Description?: string;
|
|
75416
|
-
|
|
75417
|
-
@Field({nullable: true})
|
|
75418
|
-
@MaxLength(36)
|
|
75419
|
-
ParentID?: string;
|
|
75420
|
-
|
|
75421
|
-
@Field()
|
|
75422
|
-
@MaxLength(36)
|
|
75423
|
-
UserID: string;
|
|
75424
|
-
|
|
75425
|
-
@Field()
|
|
75426
|
-
_mj__CreatedAt: Date;
|
|
75427
|
-
|
|
75428
|
-
@Field()
|
|
75429
|
-
_mj__UpdatedAt: Date;
|
|
75430
|
-
|
|
75431
|
-
@Field({nullable: true})
|
|
75432
|
-
@MaxLength(100)
|
|
75433
|
-
Parent?: string;
|
|
75434
|
-
|
|
75435
|
-
@Field()
|
|
75436
|
-
@MaxLength(100)
|
|
75437
|
-
User: string;
|
|
75438
|
-
|
|
75439
|
-
@Field({nullable: true})
|
|
75440
|
-
@MaxLength(36)
|
|
75441
|
-
RootParentID?: string;
|
|
75442
|
-
|
|
75443
|
-
@Field(() => [MJReportCategory_])
|
|
75444
|
-
MJReportCategories_ParentIDArray: MJReportCategory_[]; // Link to MJReportCategories
|
|
75445
|
-
|
|
75446
|
-
@Field(() => [MJReport_])
|
|
75447
|
-
MJReports_CategoryIDArray: MJReport_[]; // Link to MJReports
|
|
75448
|
-
|
|
75449
|
-
}
|
|
75450
|
-
|
|
75451
|
-
//****************************************************************************
|
|
75452
|
-
// INPUT TYPE for MJ: Report Categories
|
|
75453
|
-
//****************************************************************************
|
|
75454
|
-
@InputType()
|
|
75455
|
-
export class CreateMJReportCategoryInput {
|
|
75456
|
-
@Field({ nullable: true })
|
|
75457
|
-
ID?: string;
|
|
75458
|
-
|
|
75459
|
-
@Field({ nullable: true })
|
|
75460
|
-
Name?: string;
|
|
75461
|
-
|
|
75462
|
-
@Field({ nullable: true })
|
|
75463
|
-
Description: string | null;
|
|
75464
|
-
|
|
75465
|
-
@Field({ nullable: true })
|
|
75466
|
-
ParentID: string | null;
|
|
75467
|
-
|
|
75468
|
-
@Field({ nullable: true })
|
|
75469
|
-
UserID?: string;
|
|
75470
|
-
|
|
75471
|
-
@Field(() => RestoreContextInput, { nullable: true })
|
|
75472
|
-
RestoreContext___?: RestoreContextInput;
|
|
75473
|
-
}
|
|
75474
|
-
|
|
75475
|
-
|
|
75476
|
-
//****************************************************************************
|
|
75477
|
-
// INPUT TYPE for MJ: Report Categories
|
|
75478
|
-
//****************************************************************************
|
|
75479
|
-
@InputType()
|
|
75480
|
-
export class UpdateMJReportCategoryInput {
|
|
75481
|
-
@Field()
|
|
75482
|
-
ID: string;
|
|
75483
|
-
|
|
75484
|
-
@Field({ nullable: true })
|
|
75485
|
-
Name?: string;
|
|
75486
|
-
|
|
75487
|
-
@Field({ nullable: true })
|
|
75488
|
-
Description?: string | null;
|
|
75489
|
-
|
|
75490
|
-
@Field({ nullable: true })
|
|
75491
|
-
ParentID?: string | null;
|
|
75492
|
-
|
|
75493
|
-
@Field({ nullable: true })
|
|
75494
|
-
UserID?: string;
|
|
75495
|
-
|
|
75496
|
-
@Field(() => [KeyValuePairInput], { nullable: true })
|
|
75497
|
-
OldValues___?: KeyValuePairInput[];
|
|
75498
|
-
|
|
75499
|
-
@Field(() => RestoreContextInput, { nullable: true })
|
|
75500
|
-
RestoreContext___?: RestoreContextInput;
|
|
75501
|
-
}
|
|
75502
|
-
|
|
75503
|
-
//****************************************************************************
|
|
75504
|
-
// RESOLVER for MJ: Report Categories
|
|
75505
|
-
//****************************************************************************
|
|
75506
|
-
@ObjectType()
|
|
75507
|
-
export class RunMJReportCategoryViewResult {
|
|
75508
|
-
@Field(() => [MJReportCategory_])
|
|
75509
|
-
Results: MJReportCategory_[];
|
|
75510
|
-
|
|
75511
|
-
@Field(() => String, {nullable: true})
|
|
75512
|
-
UserViewRunID?: string;
|
|
75513
|
-
|
|
75514
|
-
@Field(() => Int, {nullable: true})
|
|
75515
|
-
RowCount: number;
|
|
75516
|
-
|
|
75517
|
-
@Field(() => Int, {nullable: true})
|
|
75518
|
-
TotalRowCount: number;
|
|
75519
|
-
|
|
75520
|
-
@Field(() => Int, {nullable: true})
|
|
75521
|
-
ExecutionTime: number;
|
|
75522
|
-
|
|
75523
|
-
@Field({nullable: true})
|
|
75524
|
-
ErrorMessage?: string;
|
|
75525
|
-
|
|
75526
|
-
@Field(() => Boolean, {nullable: false})
|
|
75527
|
-
Success: boolean;
|
|
75528
|
-
}
|
|
75529
|
-
|
|
75530
|
-
@Resolver(MJReportCategory_)
|
|
75531
|
-
export class MJReportCategoryResolver extends ResolverBase {
|
|
75532
|
-
@Query(() => RunMJReportCategoryViewResult)
|
|
75533
|
-
async RunMJReportCategoryViewByID(@Arg('input', () => RunViewByIDInput) input: RunViewByIDInput, @Ctx() { providers, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
75534
|
-
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
75535
|
-
return super.RunViewByIDGeneric(input, provider, userPayload, pubSub);
|
|
75536
|
-
}
|
|
75537
|
-
|
|
75538
|
-
@Query(() => RunMJReportCategoryViewResult)
|
|
75539
|
-
async RunMJReportCategoryViewByName(@Arg('input', () => RunViewByNameInput) input: RunViewByNameInput, @Ctx() { providers, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
75540
|
-
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
75541
|
-
return super.RunViewByNameGeneric(input, provider, userPayload, pubSub);
|
|
75542
|
-
}
|
|
75543
|
-
|
|
75544
|
-
@Query(() => RunMJReportCategoryViewResult)
|
|
75545
|
-
async RunMJReportCategoryDynamicView(@Arg('input', () => RunDynamicViewInput) input: RunDynamicViewInput, @Ctx() { providers, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
75546
|
-
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
75547
|
-
input.EntityName = 'MJ: Report Categories';
|
|
75548
|
-
return super.RunDynamicViewGeneric(input, provider, userPayload, pubSub);
|
|
75549
|
-
}
|
|
75550
|
-
@Query(() => MJReportCategory_, { nullable: true })
|
|
75551
|
-
async MJReportCategory(@Arg('ID', () => String) ID: string, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine): Promise<MJReportCategory_ | null> {
|
|
75552
|
-
this.CheckUserReadPermissions('MJ: Report Categories', userPayload);
|
|
75553
|
-
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
75554
|
-
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwReportCategories')} WHERE ${provider.QuoteIdentifier('ID')}=${provider.BuildParameterPlaceholder(0)} ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: Report Categories', userPayload, EntityPermissionType.Read, 'AND');
|
|
75555
|
-
const rows = await provider.ExecuteSQL(sSQL, [ID], undefined, this.GetUserFromPayload(userPayload));
|
|
75556
|
-
const result = await this.MapFieldNamesToCodeNames('MJ: Report Categories', rows && rows.length > 0 ? rows[0] : null, this.GetUserFromPayload(userPayload));
|
|
75557
|
-
return result;
|
|
75558
|
-
}
|
|
75559
|
-
|
|
75560
|
-
@FieldResolver(() => [MJReportCategory_])
|
|
75561
|
-
async MJReportCategories_ParentIDArray(@Root() mjreportcategory_: MJReportCategory_, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
75562
|
-
this.CheckUserReadPermissions('MJ: Report Categories', userPayload);
|
|
75563
|
-
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
75564
|
-
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwReportCategories')} WHERE ${provider.QuoteIdentifier('ParentID')}=${provider.BuildParameterPlaceholder(0)} ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: Report Categories', userPayload, EntityPermissionType.Read, 'AND');
|
|
75565
|
-
const rows = await provider.ExecuteSQL(sSQL, [mjreportcategory_.ID], undefined, this.GetUserFromPayload(userPayload));
|
|
75566
|
-
const result = await this.ArrayMapFieldNamesToCodeNames('MJ: Report Categories', rows, this.GetUserFromPayload(userPayload));
|
|
75567
|
-
return result;
|
|
75568
|
-
}
|
|
75569
|
-
|
|
75570
|
-
@FieldResolver(() => [MJReport_])
|
|
75571
|
-
async MJReports_CategoryIDArray(@Root() mjreportcategory_: MJReportCategory_, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
75572
|
-
this.CheckUserReadPermissions('MJ: Reports', userPayload);
|
|
75573
|
-
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
75574
|
-
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwReports')} WHERE ${provider.QuoteIdentifier('CategoryID')}=${provider.BuildParameterPlaceholder(0)} ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: Reports', userPayload, EntityPermissionType.Read, 'AND');
|
|
75575
|
-
const rows = await provider.ExecuteSQL(sSQL, [mjreportcategory_.ID], undefined, this.GetUserFromPayload(userPayload));
|
|
75576
|
-
const result = await this.ArrayMapFieldNamesToCodeNames('MJ: Reports', rows, this.GetUserFromPayload(userPayload));
|
|
75577
|
-
return result;
|
|
75578
|
-
}
|
|
75579
|
-
|
|
75580
|
-
@Mutation(() => MJReportCategory_)
|
|
75581
|
-
async CreateMJReportCategory(
|
|
75582
|
-
@Arg('input', () => CreateMJReportCategoryInput) input: CreateMJReportCategoryInput,
|
|
75583
|
-
@Ctx() { providers, userPayload }: AppContext,
|
|
75584
|
-
@PubSub() pubSub: PubSubEngine
|
|
75585
|
-
) {
|
|
75586
|
-
const provider = GetReadWriteProvider(providers);
|
|
75587
|
-
return this.CreateRecord('MJ: Report Categories', input, provider, userPayload, pubSub)
|
|
75588
|
-
}
|
|
75589
|
-
|
|
75590
|
-
@Mutation(() => MJReportCategory_)
|
|
75591
|
-
async UpdateMJReportCategory(
|
|
75592
|
-
@Arg('input', () => UpdateMJReportCategoryInput) input: UpdateMJReportCategoryInput,
|
|
75593
|
-
@Ctx() { providers, userPayload }: AppContext,
|
|
75594
|
-
@PubSub() pubSub: PubSubEngine
|
|
75595
|
-
) {
|
|
75596
|
-
const provider = GetReadWriteProvider(providers);
|
|
75597
|
-
return this.UpdateRecord('MJ: Report Categories', input, provider, userPayload, pubSub);
|
|
75598
|
-
}
|
|
75599
|
-
|
|
75600
|
-
@Mutation(() => MJReportCategory_)
|
|
75601
|
-
async DeleteMJReportCategory(@Arg('ID', () => String) ID: string, @Arg('options___', () => DeleteOptionsInput) options: DeleteOptionsInput, @Ctx() { providers, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
75602
|
-
const provider = GetReadWriteProvider(providers);
|
|
75603
|
-
const key = new CompositeKey([{FieldName: 'ID', Value: ID}]);
|
|
75604
|
-
return this.DeleteRecord('MJ: Report Categories', key, options, provider, userPayload, pubSub);
|
|
75605
|
-
}
|
|
75606
|
-
|
|
75607
|
-
}
|
|
75608
|
-
|
|
75609
|
-
//****************************************************************************
|
|
75610
|
-
// ENTITY CLASS for MJ: Report Snapshots
|
|
75611
|
-
//****************************************************************************
|
|
75612
|
-
@ObjectType({ description: `Stores point-in-time captures of report outputs, preserving historical data and enabling comparison over time.` })
|
|
75613
|
-
export class MJReportSnapshot_ {
|
|
75614
|
-
@Field()
|
|
75615
|
-
@MaxLength(36)
|
|
75616
|
-
ID: string;
|
|
75617
|
-
|
|
75618
|
-
@Field()
|
|
75619
|
-
@MaxLength(36)
|
|
75620
|
-
ReportID: string;
|
|
75621
|
-
|
|
75622
|
-
@Field({description: `Field ResultSet for entity Report Snapshots.`})
|
|
75623
|
-
ResultSet: string;
|
|
75624
|
-
|
|
75625
|
-
@Field()
|
|
75626
|
-
@MaxLength(36)
|
|
75627
|
-
UserID: string;
|
|
75628
|
-
|
|
75629
|
-
@Field()
|
|
75630
|
-
_mj__CreatedAt: Date;
|
|
75631
|
-
|
|
75632
|
-
@Field()
|
|
75633
|
-
_mj__UpdatedAt: Date;
|
|
75634
|
-
|
|
75635
|
-
@Field()
|
|
75636
|
-
@MaxLength(255)
|
|
75637
|
-
Report: string;
|
|
75638
|
-
|
|
75639
|
-
@Field()
|
|
75640
|
-
@MaxLength(100)
|
|
75641
|
-
User: string;
|
|
75642
|
-
|
|
75643
|
-
}
|
|
75644
|
-
|
|
75645
|
-
//****************************************************************************
|
|
75646
|
-
// INPUT TYPE for MJ: Report Snapshots
|
|
75647
|
-
//****************************************************************************
|
|
75648
|
-
@InputType()
|
|
75649
|
-
export class CreateMJReportSnapshotInput {
|
|
75650
|
-
@Field({ nullable: true })
|
|
75651
|
-
ID?: string;
|
|
75652
|
-
|
|
75653
|
-
@Field({ nullable: true })
|
|
75654
|
-
ReportID?: string;
|
|
75655
|
-
|
|
75656
|
-
@Field({ nullable: true })
|
|
75657
|
-
ResultSet?: string;
|
|
75658
|
-
|
|
75659
|
-
@Field({ nullable: true })
|
|
75660
|
-
UserID?: string;
|
|
75661
|
-
|
|
75662
|
-
@Field(() => RestoreContextInput, { nullable: true })
|
|
75663
|
-
RestoreContext___?: RestoreContextInput;
|
|
75664
|
-
}
|
|
75665
|
-
|
|
75666
|
-
|
|
75667
|
-
//****************************************************************************
|
|
75668
|
-
// INPUT TYPE for MJ: Report Snapshots
|
|
75669
|
-
//****************************************************************************
|
|
75670
|
-
@InputType()
|
|
75671
|
-
export class UpdateMJReportSnapshotInput {
|
|
75672
|
-
@Field()
|
|
75673
|
-
ID: string;
|
|
75674
|
-
|
|
75675
|
-
@Field({ nullable: true })
|
|
75676
|
-
ReportID?: string;
|
|
75677
|
-
|
|
75678
|
-
@Field({ nullable: true })
|
|
75679
|
-
ResultSet?: string;
|
|
75680
|
-
|
|
75681
|
-
@Field({ nullable: true })
|
|
75682
|
-
UserID?: string;
|
|
75683
|
-
|
|
75684
|
-
@Field(() => [KeyValuePairInput], { nullable: true })
|
|
75685
|
-
OldValues___?: KeyValuePairInput[];
|
|
75686
|
-
|
|
75687
|
-
@Field(() => RestoreContextInput, { nullable: true })
|
|
75688
|
-
RestoreContext___?: RestoreContextInput;
|
|
75689
|
-
}
|
|
75690
|
-
|
|
75691
|
-
//****************************************************************************
|
|
75692
|
-
// RESOLVER for MJ: Report Snapshots
|
|
75693
|
-
//****************************************************************************
|
|
75694
|
-
@ObjectType()
|
|
75695
|
-
export class RunMJReportSnapshotViewResult {
|
|
75696
|
-
@Field(() => [MJReportSnapshot_])
|
|
75697
|
-
Results: MJReportSnapshot_[];
|
|
75698
|
-
|
|
75699
|
-
@Field(() => String, {nullable: true})
|
|
75700
|
-
UserViewRunID?: string;
|
|
75701
|
-
|
|
75702
|
-
@Field(() => Int, {nullable: true})
|
|
75703
|
-
RowCount: number;
|
|
75704
|
-
|
|
75705
|
-
@Field(() => Int, {nullable: true})
|
|
75706
|
-
TotalRowCount: number;
|
|
75707
|
-
|
|
75708
|
-
@Field(() => Int, {nullable: true})
|
|
75709
|
-
ExecutionTime: number;
|
|
75710
|
-
|
|
75711
|
-
@Field({nullable: true})
|
|
75712
|
-
ErrorMessage?: string;
|
|
75713
|
-
|
|
75714
|
-
@Field(() => Boolean, {nullable: false})
|
|
75715
|
-
Success: boolean;
|
|
75716
|
-
}
|
|
75717
|
-
|
|
75718
|
-
@Resolver(MJReportSnapshot_)
|
|
75719
|
-
export class MJReportSnapshotResolver extends ResolverBase {
|
|
75720
|
-
@Query(() => RunMJReportSnapshotViewResult)
|
|
75721
|
-
async RunMJReportSnapshotViewByID(@Arg('input', () => RunViewByIDInput) input: RunViewByIDInput, @Ctx() { providers, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
75722
|
-
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
75723
|
-
return super.RunViewByIDGeneric(input, provider, userPayload, pubSub);
|
|
75724
|
-
}
|
|
75725
|
-
|
|
75726
|
-
@Query(() => RunMJReportSnapshotViewResult)
|
|
75727
|
-
async RunMJReportSnapshotViewByName(@Arg('input', () => RunViewByNameInput) input: RunViewByNameInput, @Ctx() { providers, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
75728
|
-
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
75729
|
-
return super.RunViewByNameGeneric(input, provider, userPayload, pubSub);
|
|
75730
|
-
}
|
|
75731
|
-
|
|
75732
|
-
@Query(() => RunMJReportSnapshotViewResult)
|
|
75733
|
-
async RunMJReportSnapshotDynamicView(@Arg('input', () => RunDynamicViewInput) input: RunDynamicViewInput, @Ctx() { providers, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
75734
|
-
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
75735
|
-
input.EntityName = 'MJ: Report Snapshots';
|
|
75736
|
-
return super.RunDynamicViewGeneric(input, provider, userPayload, pubSub);
|
|
75737
|
-
}
|
|
75738
|
-
@Query(() => MJReportSnapshot_, { nullable: true })
|
|
75739
|
-
async MJReportSnapshot(@Arg('ID', () => String) ID: string, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine): Promise<MJReportSnapshot_ | null> {
|
|
75740
|
-
this.CheckUserReadPermissions('MJ: Report Snapshots', userPayload);
|
|
75741
|
-
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
75742
|
-
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwReportSnapshots')} WHERE ${provider.QuoteIdentifier('ID')}=${provider.BuildParameterPlaceholder(0)} ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: Report Snapshots', userPayload, EntityPermissionType.Read, 'AND');
|
|
75743
|
-
const rows = await provider.ExecuteSQL(sSQL, [ID], undefined, this.GetUserFromPayload(userPayload));
|
|
75744
|
-
const result = await this.MapFieldNamesToCodeNames('MJ: Report Snapshots', rows && rows.length > 0 ? rows[0] : null, this.GetUserFromPayload(userPayload));
|
|
75745
|
-
return result;
|
|
75746
|
-
}
|
|
75747
|
-
|
|
75748
|
-
@Mutation(() => MJReportSnapshot_)
|
|
75749
|
-
async CreateMJReportSnapshot(
|
|
75750
|
-
@Arg('input', () => CreateMJReportSnapshotInput) input: CreateMJReportSnapshotInput,
|
|
75751
|
-
@Ctx() { providers, userPayload }: AppContext,
|
|
75752
|
-
@PubSub() pubSub: PubSubEngine
|
|
75753
|
-
) {
|
|
75754
|
-
const provider = GetReadWriteProvider(providers);
|
|
75755
|
-
return this.CreateRecord('MJ: Report Snapshots', input, provider, userPayload, pubSub)
|
|
75756
|
-
}
|
|
75757
|
-
|
|
75758
|
-
@Mutation(() => MJReportSnapshot_)
|
|
75759
|
-
async UpdateMJReportSnapshot(
|
|
75760
|
-
@Arg('input', () => UpdateMJReportSnapshotInput) input: UpdateMJReportSnapshotInput,
|
|
75761
|
-
@Ctx() { providers, userPayload }: AppContext,
|
|
75762
|
-
@PubSub() pubSub: PubSubEngine
|
|
75763
|
-
) {
|
|
75764
|
-
const provider = GetReadWriteProvider(providers);
|
|
75765
|
-
return this.UpdateRecord('MJ: Report Snapshots', input, provider, userPayload, pubSub);
|
|
75766
|
-
}
|
|
75767
|
-
|
|
75768
|
-
@Mutation(() => MJReportSnapshot_)
|
|
75769
|
-
async DeleteMJReportSnapshot(@Arg('ID', () => String) ID: string, @Arg('options___', () => DeleteOptionsInput) options: DeleteOptionsInput, @Ctx() { providers, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
75770
|
-
const provider = GetReadWriteProvider(providers);
|
|
75771
|
-
const key = new CompositeKey([{FieldName: 'ID', Value: ID}]);
|
|
75772
|
-
return this.DeleteRecord('MJ: Report Snapshots', key, options, provider, userPayload, pubSub);
|
|
75773
|
-
}
|
|
75774
|
-
|
|
75775
|
-
}
|
|
75776
|
-
|
|
75777
|
-
//****************************************************************************
|
|
75778
|
-
// ENTITY CLASS for MJ: Report User States
|
|
75779
|
-
//****************************************************************************
|
|
75780
|
-
@ObjectType({ description: `Tracks individual user state within interactive reports` })
|
|
75781
|
-
export class MJReportUserState_ {
|
|
75782
|
-
@Field()
|
|
75783
|
-
@MaxLength(36)
|
|
75784
|
-
ID: string;
|
|
75785
|
-
|
|
75786
|
-
@Field()
|
|
75787
|
-
@MaxLength(36)
|
|
75788
|
-
ReportID: string;
|
|
75789
|
-
|
|
75790
|
-
@Field()
|
|
75791
|
-
@MaxLength(36)
|
|
75792
|
-
UserID: string;
|
|
75793
|
-
|
|
75794
|
-
@Field({nullable: true, description: `JSON serialized state of user interaction with the report`})
|
|
75795
|
-
ReportState?: string;
|
|
75796
|
-
|
|
75797
|
-
@Field()
|
|
75798
|
-
_mj__CreatedAt: Date;
|
|
75799
|
-
|
|
75800
|
-
@Field()
|
|
75801
|
-
_mj__UpdatedAt: Date;
|
|
75802
|
-
|
|
75803
|
-
@Field()
|
|
75804
|
-
@MaxLength(255)
|
|
75805
|
-
Report: string;
|
|
75806
|
-
|
|
75807
|
-
@Field()
|
|
75808
|
-
@MaxLength(100)
|
|
75809
|
-
User: string;
|
|
75810
|
-
|
|
75811
|
-
}
|
|
75812
|
-
|
|
75813
|
-
//****************************************************************************
|
|
75814
|
-
// INPUT TYPE for MJ: Report User States
|
|
75815
|
-
//****************************************************************************
|
|
75816
|
-
@InputType()
|
|
75817
|
-
export class CreateMJReportUserStateInput {
|
|
75818
|
-
@Field({ nullable: true })
|
|
75819
|
-
ID?: string;
|
|
75820
|
-
|
|
75821
|
-
@Field({ nullable: true })
|
|
75822
|
-
ReportID?: string;
|
|
75823
|
-
|
|
75824
|
-
@Field({ nullable: true })
|
|
75825
|
-
UserID?: string;
|
|
75826
|
-
|
|
75827
|
-
@Field({ nullable: true })
|
|
75828
|
-
ReportState: string | null;
|
|
75829
|
-
|
|
75830
|
-
@Field(() => RestoreContextInput, { nullable: true })
|
|
75831
|
-
RestoreContext___?: RestoreContextInput;
|
|
75832
|
-
}
|
|
75833
|
-
|
|
75834
|
-
|
|
75835
|
-
//****************************************************************************
|
|
75836
|
-
// INPUT TYPE for MJ: Report User States
|
|
75837
|
-
//****************************************************************************
|
|
75838
|
-
@InputType()
|
|
75839
|
-
export class UpdateMJReportUserStateInput {
|
|
75840
|
-
@Field()
|
|
75841
|
-
ID: string;
|
|
75842
|
-
|
|
75843
|
-
@Field({ nullable: true })
|
|
75844
|
-
ReportID?: string;
|
|
75845
|
-
|
|
75846
|
-
@Field({ nullable: true })
|
|
75847
|
-
UserID?: string;
|
|
75848
|
-
|
|
75849
|
-
@Field({ nullable: true })
|
|
75850
|
-
ReportState?: string | null;
|
|
75851
|
-
|
|
75852
|
-
@Field(() => [KeyValuePairInput], { nullable: true })
|
|
75853
|
-
OldValues___?: KeyValuePairInput[];
|
|
75854
|
-
|
|
75855
|
-
@Field(() => RestoreContextInput, { nullable: true })
|
|
75856
|
-
RestoreContext___?: RestoreContextInput;
|
|
75857
|
-
}
|
|
75858
|
-
|
|
75859
|
-
//****************************************************************************
|
|
75860
|
-
// RESOLVER for MJ: Report User States
|
|
75861
|
-
//****************************************************************************
|
|
75862
|
-
@ObjectType()
|
|
75863
|
-
export class RunMJReportUserStateViewResult {
|
|
75864
|
-
@Field(() => [MJReportUserState_])
|
|
75865
|
-
Results: MJReportUserState_[];
|
|
75866
|
-
|
|
75867
|
-
@Field(() => String, {nullable: true})
|
|
75868
|
-
UserViewRunID?: string;
|
|
75869
|
-
|
|
75870
|
-
@Field(() => Int, {nullable: true})
|
|
75871
|
-
RowCount: number;
|
|
75872
|
-
|
|
75873
|
-
@Field(() => Int, {nullable: true})
|
|
75874
|
-
TotalRowCount: number;
|
|
75875
|
-
|
|
75876
|
-
@Field(() => Int, {nullable: true})
|
|
75877
|
-
ExecutionTime: number;
|
|
75878
|
-
|
|
75879
|
-
@Field({nullable: true})
|
|
75880
|
-
ErrorMessage?: string;
|
|
75881
|
-
|
|
75882
|
-
@Field(() => Boolean, {nullable: false})
|
|
75883
|
-
Success: boolean;
|
|
75884
|
-
}
|
|
75885
|
-
|
|
75886
|
-
@Resolver(MJReportUserState_)
|
|
75887
|
-
export class MJReportUserStateResolver extends ResolverBase {
|
|
75888
|
-
@Query(() => RunMJReportUserStateViewResult)
|
|
75889
|
-
async RunMJReportUserStateViewByID(@Arg('input', () => RunViewByIDInput) input: RunViewByIDInput, @Ctx() { providers, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
75890
|
-
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
75891
|
-
return super.RunViewByIDGeneric(input, provider, userPayload, pubSub);
|
|
75892
|
-
}
|
|
75893
|
-
|
|
75894
|
-
@Query(() => RunMJReportUserStateViewResult)
|
|
75895
|
-
async RunMJReportUserStateViewByName(@Arg('input', () => RunViewByNameInput) input: RunViewByNameInput, @Ctx() { providers, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
75896
|
-
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
75897
|
-
return super.RunViewByNameGeneric(input, provider, userPayload, pubSub);
|
|
75898
|
-
}
|
|
75899
|
-
|
|
75900
|
-
@Query(() => RunMJReportUserStateViewResult)
|
|
75901
|
-
async RunMJReportUserStateDynamicView(@Arg('input', () => RunDynamicViewInput) input: RunDynamicViewInput, @Ctx() { providers, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
75902
|
-
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
75903
|
-
input.EntityName = 'MJ: Report User States';
|
|
75904
|
-
return super.RunDynamicViewGeneric(input, provider, userPayload, pubSub);
|
|
75905
|
-
}
|
|
75906
|
-
@Query(() => MJReportUserState_, { nullable: true })
|
|
75907
|
-
async MJReportUserState(@Arg('ID', () => String) ID: string, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine): Promise<MJReportUserState_ | null> {
|
|
75908
|
-
this.CheckUserReadPermissions('MJ: Report User States', userPayload);
|
|
75909
|
-
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
75910
|
-
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwReportUserStates')} WHERE ${provider.QuoteIdentifier('ID')}=${provider.BuildParameterPlaceholder(0)} ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: Report User States', userPayload, EntityPermissionType.Read, 'AND');
|
|
75911
|
-
const rows = await provider.ExecuteSQL(sSQL, [ID], undefined, this.GetUserFromPayload(userPayload));
|
|
75912
|
-
const result = await this.MapFieldNamesToCodeNames('MJ: Report User States', rows && rows.length > 0 ? rows[0] : null, this.GetUserFromPayload(userPayload));
|
|
75913
|
-
return result;
|
|
75914
|
-
}
|
|
75915
|
-
|
|
75916
|
-
@Mutation(() => MJReportUserState_)
|
|
75917
|
-
async CreateMJReportUserState(
|
|
75918
|
-
@Arg('input', () => CreateMJReportUserStateInput) input: CreateMJReportUserStateInput,
|
|
75919
|
-
@Ctx() { providers, userPayload }: AppContext,
|
|
75920
|
-
@PubSub() pubSub: PubSubEngine
|
|
75921
|
-
) {
|
|
75922
|
-
const provider = GetReadWriteProvider(providers);
|
|
75923
|
-
return this.CreateRecord('MJ: Report User States', input, provider, userPayload, pubSub)
|
|
75924
|
-
}
|
|
75925
|
-
|
|
75926
|
-
@Mutation(() => MJReportUserState_)
|
|
75927
|
-
async UpdateMJReportUserState(
|
|
75928
|
-
@Arg('input', () => UpdateMJReportUserStateInput) input: UpdateMJReportUserStateInput,
|
|
75929
|
-
@Ctx() { providers, userPayload }: AppContext,
|
|
75930
|
-
@PubSub() pubSub: PubSubEngine
|
|
75931
|
-
) {
|
|
75932
|
-
const provider = GetReadWriteProvider(providers);
|
|
75933
|
-
return this.UpdateRecord('MJ: Report User States', input, provider, userPayload, pubSub);
|
|
75934
|
-
}
|
|
75935
|
-
|
|
75936
|
-
@Mutation(() => MJReportUserState_)
|
|
75937
|
-
async DeleteMJReportUserState(@Arg('ID', () => String) ID: string, @Arg('options___', () => DeleteOptionsInput) options: DeleteOptionsInput, @Ctx() { providers, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
75938
|
-
const provider = GetReadWriteProvider(providers);
|
|
75939
|
-
const key = new CompositeKey([{FieldName: 'ID', Value: ID}]);
|
|
75940
|
-
return this.DeleteRecord('MJ: Report User States', key, options, provider, userPayload, pubSub);
|
|
75941
|
-
}
|
|
75942
|
-
|
|
75943
|
-
}
|
|
75944
|
-
|
|
75945
|
-
//****************************************************************************
|
|
75946
|
-
// ENTITY CLASS for MJ: Report Versions
|
|
75947
|
-
//****************************************************************************
|
|
75948
|
-
@ObjectType({ description: `Stores iterations of report logic, structure, and layout changes` })
|
|
75949
|
-
export class MJReportVersion_ {
|
|
75950
|
-
@Field()
|
|
75951
|
-
@MaxLength(36)
|
|
75952
|
-
ID: string;
|
|
75953
|
-
|
|
75954
|
-
@Field()
|
|
75955
|
-
@MaxLength(36)
|
|
75956
|
-
ReportID: string;
|
|
75957
|
-
|
|
75958
|
-
@Field(() => Int, {description: `Report version number, sequential per report starting at 1`})
|
|
75959
|
-
VersionNumber: number;
|
|
75960
|
-
|
|
75961
|
-
@Field({description: `Name of this report version`})
|
|
75962
|
-
@MaxLength(255)
|
|
75963
|
-
Name: string;
|
|
75964
|
-
|
|
75965
|
-
@Field({nullable: true, description: `Description of this report version`})
|
|
75966
|
-
Description?: string;
|
|
75967
|
-
|
|
75968
|
-
@Field({nullable: true, description: `JSON configuration of report structure, layout and logic`})
|
|
75969
|
-
Configuration?: string;
|
|
75970
|
-
|
|
75971
|
-
@Field(() => Boolean, {description: `Indicates if the data context was updated in this version`})
|
|
75972
|
-
DataContextUpdated: boolean;
|
|
75973
|
-
|
|
75974
|
-
@Field()
|
|
75975
|
-
_mj__CreatedAt: Date;
|
|
75976
|
-
|
|
75977
|
-
@Field()
|
|
75978
|
-
_mj__UpdatedAt: Date;
|
|
75979
|
-
|
|
75980
|
-
@Field()
|
|
75981
|
-
@MaxLength(255)
|
|
75982
|
-
Report: string;
|
|
75983
|
-
|
|
75984
|
-
}
|
|
75985
|
-
|
|
75986
|
-
//****************************************************************************
|
|
75987
|
-
// INPUT TYPE for MJ: Report Versions
|
|
75988
|
-
//****************************************************************************
|
|
75989
|
-
@InputType()
|
|
75990
|
-
export class CreateMJReportVersionInput {
|
|
75991
|
-
@Field({ nullable: true })
|
|
75992
|
-
ID?: string;
|
|
75993
|
-
|
|
75994
|
-
@Field({ nullable: true })
|
|
75995
|
-
ReportID?: string;
|
|
75996
|
-
|
|
75997
|
-
@Field(() => Int, { nullable: true })
|
|
75998
|
-
VersionNumber?: number;
|
|
75999
|
-
|
|
76000
|
-
@Field({ nullable: true })
|
|
76001
|
-
Name?: string;
|
|
76002
|
-
|
|
76003
|
-
@Field({ nullable: true })
|
|
76004
|
-
Description: string | null;
|
|
76005
|
-
|
|
76006
|
-
@Field({ nullable: true })
|
|
76007
|
-
Configuration: string | null;
|
|
76008
|
-
|
|
76009
|
-
@Field(() => Boolean, { nullable: true })
|
|
76010
|
-
DataContextUpdated?: boolean;
|
|
76011
|
-
|
|
76012
|
-
@Field(() => RestoreContextInput, { nullable: true })
|
|
76013
|
-
RestoreContext___?: RestoreContextInput;
|
|
76014
|
-
}
|
|
76015
|
-
|
|
76016
|
-
|
|
76017
|
-
//****************************************************************************
|
|
76018
|
-
// INPUT TYPE for MJ: Report Versions
|
|
76019
|
-
//****************************************************************************
|
|
76020
|
-
@InputType()
|
|
76021
|
-
export class UpdateMJReportVersionInput {
|
|
76022
|
-
@Field()
|
|
76023
|
-
ID: string;
|
|
76024
|
-
|
|
76025
|
-
@Field({ nullable: true })
|
|
76026
|
-
ReportID?: string;
|
|
76027
|
-
|
|
76028
|
-
@Field(() => Int, { nullable: true })
|
|
76029
|
-
VersionNumber?: number;
|
|
76030
|
-
|
|
76031
|
-
@Field({ nullable: true })
|
|
76032
|
-
Name?: string;
|
|
76033
|
-
|
|
76034
|
-
@Field({ nullable: true })
|
|
76035
|
-
Description?: string | null;
|
|
76036
|
-
|
|
76037
|
-
@Field({ nullable: true })
|
|
76038
|
-
Configuration?: string | null;
|
|
76039
|
-
|
|
76040
|
-
@Field(() => Boolean, { nullable: true })
|
|
76041
|
-
DataContextUpdated?: boolean;
|
|
76042
|
-
|
|
76043
|
-
@Field(() => [KeyValuePairInput], { nullable: true })
|
|
76044
|
-
OldValues___?: KeyValuePairInput[];
|
|
76045
|
-
|
|
76046
|
-
@Field(() => RestoreContextInput, { nullable: true })
|
|
76047
|
-
RestoreContext___?: RestoreContextInput;
|
|
76048
|
-
}
|
|
76049
|
-
|
|
76050
|
-
//****************************************************************************
|
|
76051
|
-
// RESOLVER for MJ: Report Versions
|
|
76052
|
-
//****************************************************************************
|
|
76053
|
-
@ObjectType()
|
|
76054
|
-
export class RunMJReportVersionViewResult {
|
|
76055
|
-
@Field(() => [MJReportVersion_])
|
|
76056
|
-
Results: MJReportVersion_[];
|
|
76057
|
-
|
|
76058
|
-
@Field(() => String, {nullable: true})
|
|
76059
|
-
UserViewRunID?: string;
|
|
76060
|
-
|
|
76061
|
-
@Field(() => Int, {nullable: true})
|
|
76062
|
-
RowCount: number;
|
|
76063
|
-
|
|
76064
|
-
@Field(() => Int, {nullable: true})
|
|
76065
|
-
TotalRowCount: number;
|
|
76066
|
-
|
|
76067
|
-
@Field(() => Int, {nullable: true})
|
|
76068
|
-
ExecutionTime: number;
|
|
76069
|
-
|
|
76070
|
-
@Field({nullable: true})
|
|
76071
|
-
ErrorMessage?: string;
|
|
76072
|
-
|
|
76073
|
-
@Field(() => Boolean, {nullable: false})
|
|
76074
|
-
Success: boolean;
|
|
76075
|
-
}
|
|
76076
|
-
|
|
76077
|
-
@Resolver(MJReportVersion_)
|
|
76078
|
-
export class MJReportVersionResolver extends ResolverBase {
|
|
76079
|
-
@Query(() => RunMJReportVersionViewResult)
|
|
76080
|
-
async RunMJReportVersionViewByID(@Arg('input', () => RunViewByIDInput) input: RunViewByIDInput, @Ctx() { providers, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
76081
|
-
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
76082
|
-
return super.RunViewByIDGeneric(input, provider, userPayload, pubSub);
|
|
76083
|
-
}
|
|
76084
|
-
|
|
76085
|
-
@Query(() => RunMJReportVersionViewResult)
|
|
76086
|
-
async RunMJReportVersionViewByName(@Arg('input', () => RunViewByNameInput) input: RunViewByNameInput, @Ctx() { providers, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
76087
|
-
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
76088
|
-
return super.RunViewByNameGeneric(input, provider, userPayload, pubSub);
|
|
76089
|
-
}
|
|
76090
|
-
|
|
76091
|
-
@Query(() => RunMJReportVersionViewResult)
|
|
76092
|
-
async RunMJReportVersionDynamicView(@Arg('input', () => RunDynamicViewInput) input: RunDynamicViewInput, @Ctx() { providers, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
76093
|
-
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
76094
|
-
input.EntityName = 'MJ: Report Versions';
|
|
76095
|
-
return super.RunDynamicViewGeneric(input, provider, userPayload, pubSub);
|
|
76096
|
-
}
|
|
76097
|
-
@Query(() => MJReportVersion_, { nullable: true })
|
|
76098
|
-
async MJReportVersion(@Arg('ID', () => String) ID: string, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine): Promise<MJReportVersion_ | null> {
|
|
76099
|
-
this.CheckUserReadPermissions('MJ: Report Versions', userPayload);
|
|
76100
|
-
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
76101
|
-
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwReportVersions')} WHERE ${provider.QuoteIdentifier('ID')}=${provider.BuildParameterPlaceholder(0)} ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: Report Versions', userPayload, EntityPermissionType.Read, 'AND');
|
|
76102
|
-
const rows = await provider.ExecuteSQL(sSQL, [ID], undefined, this.GetUserFromPayload(userPayload));
|
|
76103
|
-
const result = await this.MapFieldNamesToCodeNames('MJ: Report Versions', rows && rows.length > 0 ? rows[0] : null, this.GetUserFromPayload(userPayload));
|
|
76104
|
-
return result;
|
|
76105
|
-
}
|
|
76106
|
-
|
|
76107
|
-
@Mutation(() => MJReportVersion_)
|
|
76108
|
-
async CreateMJReportVersion(
|
|
76109
|
-
@Arg('input', () => CreateMJReportVersionInput) input: CreateMJReportVersionInput,
|
|
76110
|
-
@Ctx() { providers, userPayload }: AppContext,
|
|
76111
|
-
@PubSub() pubSub: PubSubEngine
|
|
76112
|
-
) {
|
|
76113
|
-
const provider = GetReadWriteProvider(providers);
|
|
76114
|
-
return this.CreateRecord('MJ: Report Versions', input, provider, userPayload, pubSub)
|
|
76115
|
-
}
|
|
76116
|
-
|
|
76117
|
-
@Mutation(() => MJReportVersion_)
|
|
76118
|
-
async UpdateMJReportVersion(
|
|
76119
|
-
@Arg('input', () => UpdateMJReportVersionInput) input: UpdateMJReportVersionInput,
|
|
76120
|
-
@Ctx() { providers, userPayload }: AppContext,
|
|
76121
|
-
@PubSub() pubSub: PubSubEngine
|
|
76122
|
-
) {
|
|
76123
|
-
const provider = GetReadWriteProvider(providers);
|
|
76124
|
-
return this.UpdateRecord('MJ: Report Versions', input, provider, userPayload, pubSub);
|
|
76125
|
-
}
|
|
76126
|
-
|
|
76127
|
-
@Mutation(() => MJReportVersion_)
|
|
76128
|
-
async DeleteMJReportVersion(@Arg('ID', () => String) ID: string, @Arg('options___', () => DeleteOptionsInput) options: DeleteOptionsInput, @Ctx() { providers, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
76129
|
-
const provider = GetReadWriteProvider(providers);
|
|
76130
|
-
const key = new CompositeKey([{FieldName: 'ID', Value: ID}]);
|
|
76131
|
-
return this.DeleteRecord('MJ: Report Versions', key, options, provider, userPayload, pubSub);
|
|
76132
|
-
}
|
|
76133
|
-
|
|
76134
|
-
}
|
|
76135
|
-
|
|
76136
|
-
//****************************************************************************
|
|
76137
|
-
// ENTITY CLASS for MJ: Reports
|
|
76138
|
-
//****************************************************************************
|
|
76139
|
-
@ObjectType({ description: `Defines report configurations including data sources, layouts, filters, and scheduling for automated report generation.` })
|
|
76140
|
-
export class MJReport_ {
|
|
76141
|
-
@Field()
|
|
76142
|
-
@MaxLength(36)
|
|
76143
|
-
ID: string;
|
|
76144
|
-
|
|
76145
|
-
@Field()
|
|
76146
|
-
@MaxLength(255)
|
|
76147
|
-
Name: string;
|
|
76148
|
-
|
|
76149
|
-
@Field({nullable: true})
|
|
76150
|
-
Description?: string;
|
|
76151
|
-
|
|
76152
|
-
@Field({nullable: true})
|
|
76153
|
-
@MaxLength(36)
|
|
76154
|
-
CategoryID?: string;
|
|
76155
|
-
|
|
76156
|
-
@Field()
|
|
76157
|
-
@MaxLength(36)
|
|
76158
|
-
UserID: string;
|
|
76159
|
-
|
|
76160
|
-
@Field({description: `Field SharingScope for entity Reports.`})
|
|
76161
|
-
@MaxLength(20)
|
|
76162
|
-
SharingScope: string;
|
|
76163
|
-
|
|
76164
|
-
@Field({nullable: true})
|
|
76165
|
-
@MaxLength(36)
|
|
76166
|
-
ConversationID?: string;
|
|
76167
|
-
|
|
76168
|
-
@Field({nullable: true})
|
|
76169
|
-
@MaxLength(36)
|
|
76170
|
-
ConversationDetailID?: string;
|
|
76171
|
-
|
|
76172
|
-
@Field({nullable: true})
|
|
76173
|
-
@MaxLength(36)
|
|
76174
|
-
DataContextID?: string;
|
|
76175
|
-
|
|
76176
|
-
@Field({nullable: true, description: `Field Configuration for entity Reports.`})
|
|
76177
|
-
Configuration?: string;
|
|
76178
|
-
|
|
76179
|
-
@Field({nullable: true})
|
|
76180
|
-
@MaxLength(36)
|
|
76181
|
-
OutputTriggerTypeID?: string;
|
|
76182
|
-
|
|
76183
|
-
@Field({nullable: true})
|
|
76184
|
-
@MaxLength(36)
|
|
76185
|
-
OutputFormatTypeID?: string;
|
|
76186
|
-
|
|
76187
|
-
@Field({nullable: true})
|
|
76188
|
-
@MaxLength(36)
|
|
76189
|
-
OutputDeliveryTypeID?: string;
|
|
76190
|
-
|
|
76191
|
-
@Field({nullable: true, description: `For scheduled reports, the frequency of generation (Daily, Weekly, Monthly, etc.).`})
|
|
76192
|
-
@MaxLength(50)
|
|
76193
|
-
OutputFrequency?: string;
|
|
76194
|
-
|
|
76195
|
-
@Field({nullable: true, description: `Email address(es) to send the report to when using email delivery.`})
|
|
76196
|
-
@MaxLength(255)
|
|
76197
|
-
OutputTargetEmail?: string;
|
|
76198
|
-
|
|
76199
|
-
@Field({nullable: true})
|
|
76200
|
-
@MaxLength(36)
|
|
76201
|
-
OutputWorkflowID?: string;
|
|
76202
|
-
|
|
76203
|
-
@Field()
|
|
76204
|
-
_mj__CreatedAt: Date;
|
|
76205
|
-
|
|
76206
|
-
@Field()
|
|
76207
|
-
_mj__UpdatedAt: Date;
|
|
76208
|
-
|
|
76209
|
-
@Field({nullable: true, description: `Thumbnail image for the report that can be displayed in gallery views. Can contain either a URL to an image file or a Base64-encoded image string.`})
|
|
76210
|
-
Thumbnail?: string;
|
|
76211
|
-
|
|
76212
|
-
@Field()
|
|
76213
|
-
@MaxLength(36)
|
|
76214
|
-
EnvironmentID: string;
|
|
76215
|
-
|
|
76216
|
-
@Field({nullable: true})
|
|
76217
|
-
@MaxLength(100)
|
|
76218
|
-
Category?: string;
|
|
76219
|
-
|
|
76220
|
-
@Field()
|
|
76221
|
-
@MaxLength(100)
|
|
76222
|
-
User: string;
|
|
76223
|
-
|
|
76224
|
-
@Field({nullable: true})
|
|
76225
|
-
@MaxLength(255)
|
|
76226
|
-
Conversation?: string;
|
|
76227
|
-
|
|
76228
|
-
@Field({nullable: true})
|
|
76229
|
-
@MaxLength(100)
|
|
76230
|
-
ConversationDetail?: string;
|
|
76231
|
-
|
|
76232
|
-
@Field({nullable: true})
|
|
76233
|
-
@MaxLength(255)
|
|
76234
|
-
DataContext?: string;
|
|
76235
|
-
|
|
76236
|
-
@Field({nullable: true})
|
|
76237
|
-
@MaxLength(255)
|
|
76238
|
-
OutputTriggerType?: string;
|
|
76239
|
-
|
|
76240
|
-
@Field({nullable: true})
|
|
76241
|
-
@MaxLength(255)
|
|
76242
|
-
OutputFormatType?: string;
|
|
76243
|
-
|
|
76244
|
-
@Field({nullable: true})
|
|
76245
|
-
@MaxLength(255)
|
|
76246
|
-
OutputDeliveryType?: string;
|
|
76247
|
-
|
|
76248
|
-
@Field({nullable: true})
|
|
76249
|
-
@MaxLength(100)
|
|
76250
|
-
OutputWorkflow?: string;
|
|
76251
|
-
|
|
76252
|
-
@Field()
|
|
76253
|
-
@MaxLength(255)
|
|
76254
|
-
Environment: string;
|
|
76255
|
-
|
|
76256
|
-
@Field(() => [MJReportSnapshot_])
|
|
76257
|
-
MJReportSnapshots_ReportIDArray: MJReportSnapshot_[]; // Link to MJReportSnapshots
|
|
76258
|
-
|
|
76259
|
-
@Field(() => [MJReportVersion_])
|
|
76260
|
-
MJReportVersions_ReportIDArray: MJReportVersion_[]; // Link to MJReportVersions
|
|
76261
|
-
|
|
76262
|
-
@Field(() => [MJReportUserState_])
|
|
76263
|
-
MJReportUserStates_ReportIDArray: MJReportUserState_[]; // Link to MJReportUserStates
|
|
76264
|
-
|
|
76265
|
-
}
|
|
76266
|
-
|
|
76267
|
-
//****************************************************************************
|
|
76268
|
-
// INPUT TYPE for MJ: Reports
|
|
76269
|
-
//****************************************************************************
|
|
76270
|
-
@InputType()
|
|
76271
|
-
export class CreateMJReportInput {
|
|
76272
|
-
@Field({ nullable: true })
|
|
76273
|
-
ID?: string;
|
|
76274
|
-
|
|
76275
|
-
@Field({ nullable: true })
|
|
76276
|
-
Name?: string;
|
|
76277
|
-
|
|
76278
|
-
@Field({ nullable: true })
|
|
76279
|
-
Description: string | null;
|
|
76280
|
-
|
|
76281
|
-
@Field({ nullable: true })
|
|
76282
|
-
CategoryID: string | null;
|
|
76283
|
-
|
|
76284
|
-
@Field({ nullable: true })
|
|
76285
|
-
UserID?: string;
|
|
76286
|
-
|
|
76287
|
-
@Field({ nullable: true })
|
|
76288
|
-
SharingScope?: string;
|
|
76289
|
-
|
|
76290
|
-
@Field({ nullable: true })
|
|
76291
|
-
ConversationID: string | null;
|
|
76292
|
-
|
|
76293
|
-
@Field({ nullable: true })
|
|
76294
|
-
ConversationDetailID: string | null;
|
|
76295
|
-
|
|
76296
|
-
@Field({ nullable: true })
|
|
76297
|
-
DataContextID: string | null;
|
|
76298
|
-
|
|
76299
|
-
@Field({ nullable: true })
|
|
76300
|
-
Configuration: string | null;
|
|
76301
|
-
|
|
76302
|
-
@Field({ nullable: true })
|
|
76303
|
-
OutputTriggerTypeID: string | null;
|
|
76304
|
-
|
|
76305
|
-
@Field({ nullable: true })
|
|
76306
|
-
OutputFormatTypeID: string | null;
|
|
76307
|
-
|
|
76308
|
-
@Field({ nullable: true })
|
|
76309
|
-
OutputDeliveryTypeID: string | null;
|
|
76310
|
-
|
|
76311
|
-
@Field({ nullable: true })
|
|
76312
|
-
OutputFrequency: string | null;
|
|
76313
|
-
|
|
76314
|
-
@Field({ nullable: true })
|
|
76315
|
-
OutputTargetEmail: string | null;
|
|
76316
|
-
|
|
76317
|
-
@Field({ nullable: true })
|
|
76318
|
-
OutputWorkflowID: string | null;
|
|
76319
|
-
|
|
76320
|
-
@Field({ nullable: true })
|
|
76321
|
-
Thumbnail: string | null;
|
|
76322
|
-
|
|
76323
|
-
@Field({ nullable: true })
|
|
76324
|
-
EnvironmentID?: string;
|
|
76325
|
-
|
|
76326
|
-
@Field(() => RestoreContextInput, { nullable: true })
|
|
76327
|
-
RestoreContext___?: RestoreContextInput;
|
|
76328
|
-
}
|
|
76329
|
-
|
|
76330
|
-
|
|
76331
|
-
//****************************************************************************
|
|
76332
|
-
// INPUT TYPE for MJ: Reports
|
|
76333
|
-
//****************************************************************************
|
|
76334
|
-
@InputType()
|
|
76335
|
-
export class UpdateMJReportInput {
|
|
76336
|
-
@Field()
|
|
76337
|
-
ID: string;
|
|
76338
|
-
|
|
76339
|
-
@Field({ nullable: true })
|
|
76340
|
-
Name?: string;
|
|
76341
|
-
|
|
76342
|
-
@Field({ nullable: true })
|
|
76343
|
-
Description?: string | null;
|
|
76344
|
-
|
|
76345
|
-
@Field({ nullable: true })
|
|
76346
|
-
CategoryID?: string | null;
|
|
76347
|
-
|
|
76348
|
-
@Field({ nullable: true })
|
|
76349
|
-
UserID?: string;
|
|
76350
|
-
|
|
76351
|
-
@Field({ nullable: true })
|
|
76352
|
-
SharingScope?: string;
|
|
76353
|
-
|
|
76354
|
-
@Field({ nullable: true })
|
|
76355
|
-
ConversationID?: string | null;
|
|
76356
|
-
|
|
76357
|
-
@Field({ nullable: true })
|
|
76358
|
-
ConversationDetailID?: string | null;
|
|
76359
|
-
|
|
76360
|
-
@Field({ nullable: true })
|
|
76361
|
-
DataContextID?: string | null;
|
|
76362
|
-
|
|
76363
|
-
@Field({ nullable: true })
|
|
76364
|
-
Configuration?: string | null;
|
|
76365
|
-
|
|
76366
|
-
@Field({ nullable: true })
|
|
76367
|
-
OutputTriggerTypeID?: string | null;
|
|
76368
|
-
|
|
76369
|
-
@Field({ nullable: true })
|
|
76370
|
-
OutputFormatTypeID?: string | null;
|
|
76371
|
-
|
|
76372
|
-
@Field({ nullable: true })
|
|
76373
|
-
OutputDeliveryTypeID?: string | null;
|
|
76374
|
-
|
|
76375
|
-
@Field({ nullable: true })
|
|
76376
|
-
OutputFrequency?: string | null;
|
|
76377
|
-
|
|
76378
|
-
@Field({ nullable: true })
|
|
76379
|
-
OutputTargetEmail?: string | null;
|
|
76380
|
-
|
|
76381
|
-
@Field({ nullable: true })
|
|
76382
|
-
OutputWorkflowID?: string | null;
|
|
76383
|
-
|
|
76384
|
-
@Field({ nullable: true })
|
|
76385
|
-
Thumbnail?: string | null;
|
|
76386
|
-
|
|
76387
|
-
@Field({ nullable: true })
|
|
76388
|
-
EnvironmentID?: string;
|
|
76389
|
-
|
|
76390
|
-
@Field(() => [KeyValuePairInput], { nullable: true })
|
|
76391
|
-
OldValues___?: KeyValuePairInput[];
|
|
76392
|
-
|
|
76393
|
-
@Field(() => RestoreContextInput, { nullable: true })
|
|
76394
|
-
RestoreContext___?: RestoreContextInput;
|
|
76395
|
-
}
|
|
76396
|
-
|
|
76397
|
-
//****************************************************************************
|
|
76398
|
-
// RESOLVER for MJ: Reports
|
|
76399
|
-
//****************************************************************************
|
|
76400
|
-
@ObjectType()
|
|
76401
|
-
export class RunMJReportViewResult {
|
|
76402
|
-
@Field(() => [MJReport_])
|
|
76403
|
-
Results: MJReport_[];
|
|
76404
|
-
|
|
76405
|
-
@Field(() => String, {nullable: true})
|
|
76406
|
-
UserViewRunID?: string;
|
|
76407
|
-
|
|
76408
|
-
@Field(() => Int, {nullable: true})
|
|
76409
|
-
RowCount: number;
|
|
76410
|
-
|
|
76411
|
-
@Field(() => Int, {nullable: true})
|
|
76412
|
-
TotalRowCount: number;
|
|
76413
|
-
|
|
76414
|
-
@Field(() => Int, {nullable: true})
|
|
76415
|
-
ExecutionTime: number;
|
|
76416
|
-
|
|
76417
|
-
@Field({nullable: true})
|
|
76418
|
-
ErrorMessage?: string;
|
|
76419
|
-
|
|
76420
|
-
@Field(() => Boolean, {nullable: false})
|
|
76421
|
-
Success: boolean;
|
|
76422
|
-
}
|
|
76423
|
-
|
|
76424
|
-
@Resolver(MJReport_)
|
|
76425
|
-
export class MJReportResolver extends ResolverBase {
|
|
76426
|
-
@Query(() => RunMJReportViewResult)
|
|
76427
|
-
async RunMJReportViewByID(@Arg('input', () => RunViewByIDInput) input: RunViewByIDInput, @Ctx() { providers, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
76428
|
-
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
76429
|
-
return super.RunViewByIDGeneric(input, provider, userPayload, pubSub);
|
|
76430
|
-
}
|
|
76431
|
-
|
|
76432
|
-
@Query(() => RunMJReportViewResult)
|
|
76433
|
-
async RunMJReportViewByName(@Arg('input', () => RunViewByNameInput) input: RunViewByNameInput, @Ctx() { providers, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
76434
|
-
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
76435
|
-
return super.RunViewByNameGeneric(input, provider, userPayload, pubSub);
|
|
76436
|
-
}
|
|
76437
|
-
|
|
76438
|
-
@Query(() => RunMJReportViewResult)
|
|
76439
|
-
async RunMJReportDynamicView(@Arg('input', () => RunDynamicViewInput) input: RunDynamicViewInput, @Ctx() { providers, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
76440
|
-
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
76441
|
-
input.EntityName = 'MJ: Reports';
|
|
76442
|
-
return super.RunDynamicViewGeneric(input, provider, userPayload, pubSub);
|
|
76443
|
-
}
|
|
76444
|
-
@Query(() => MJReport_, { nullable: true })
|
|
76445
|
-
async MJReport(@Arg('ID', () => String) ID: string, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine): Promise<MJReport_ | null> {
|
|
76446
|
-
this.CheckUserReadPermissions('MJ: Reports', userPayload);
|
|
76447
|
-
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
76448
|
-
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwReports')} WHERE ${provider.QuoteIdentifier('ID')}=${provider.BuildParameterPlaceholder(0)} ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: Reports', userPayload, EntityPermissionType.Read, 'AND');
|
|
76449
|
-
const rows = await provider.ExecuteSQL(sSQL, [ID], undefined, this.GetUserFromPayload(userPayload));
|
|
76450
|
-
const result = await this.MapFieldNamesToCodeNames('MJ: Reports', rows && rows.length > 0 ? rows[0] : null, this.GetUserFromPayload(userPayload));
|
|
76451
|
-
return result;
|
|
76452
|
-
}
|
|
76453
|
-
|
|
76454
|
-
@FieldResolver(() => [MJReportSnapshot_])
|
|
76455
|
-
async MJReportSnapshots_ReportIDArray(@Root() mjreport_: MJReport_, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
76456
|
-
this.CheckUserReadPermissions('MJ: Report Snapshots', userPayload);
|
|
76457
|
-
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
76458
|
-
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwReportSnapshots')} WHERE ${provider.QuoteIdentifier('ReportID')}=${provider.BuildParameterPlaceholder(0)} ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: Report Snapshots', userPayload, EntityPermissionType.Read, 'AND');
|
|
76459
|
-
const rows = await provider.ExecuteSQL(sSQL, [mjreport_.ID], undefined, this.GetUserFromPayload(userPayload));
|
|
76460
|
-
const result = await this.ArrayMapFieldNamesToCodeNames('MJ: Report Snapshots', rows, this.GetUserFromPayload(userPayload));
|
|
76461
|
-
return result;
|
|
76462
|
-
}
|
|
76463
|
-
|
|
76464
|
-
@FieldResolver(() => [MJReportVersion_])
|
|
76465
|
-
async MJReportVersions_ReportIDArray(@Root() mjreport_: MJReport_, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
76466
|
-
this.CheckUserReadPermissions('MJ: Report Versions', userPayload);
|
|
76467
|
-
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
76468
|
-
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwReportVersions')} WHERE ${provider.QuoteIdentifier('ReportID')}=${provider.BuildParameterPlaceholder(0)} ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: Report Versions', userPayload, EntityPermissionType.Read, 'AND');
|
|
76469
|
-
const rows = await provider.ExecuteSQL(sSQL, [mjreport_.ID], undefined, this.GetUserFromPayload(userPayload));
|
|
76470
|
-
const result = await this.ArrayMapFieldNamesToCodeNames('MJ: Report Versions', rows, this.GetUserFromPayload(userPayload));
|
|
76471
|
-
return result;
|
|
76472
|
-
}
|
|
76473
|
-
|
|
76474
|
-
@FieldResolver(() => [MJReportUserState_])
|
|
76475
|
-
async MJReportUserStates_ReportIDArray(@Root() mjreport_: MJReport_, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
76476
|
-
this.CheckUserReadPermissions('MJ: Report User States', userPayload);
|
|
76477
|
-
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
76478
|
-
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwReportUserStates')} WHERE ${provider.QuoteIdentifier('ReportID')}=${provider.BuildParameterPlaceholder(0)} ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: Report User States', userPayload, EntityPermissionType.Read, 'AND');
|
|
76479
|
-
const rows = await provider.ExecuteSQL(sSQL, [mjreport_.ID], undefined, this.GetUserFromPayload(userPayload));
|
|
76480
|
-
const result = await this.ArrayMapFieldNamesToCodeNames('MJ: Report User States', rows, this.GetUserFromPayload(userPayload));
|
|
76481
|
-
return result;
|
|
76482
|
-
}
|
|
76483
|
-
|
|
76484
|
-
@Mutation(() => MJReport_)
|
|
76485
|
-
async CreateMJReport(
|
|
76486
|
-
@Arg('input', () => CreateMJReportInput) input: CreateMJReportInput,
|
|
76487
|
-
@Ctx() { providers, userPayload }: AppContext,
|
|
76488
|
-
@PubSub() pubSub: PubSubEngine
|
|
76489
|
-
) {
|
|
76490
|
-
const provider = GetReadWriteProvider(providers);
|
|
76491
|
-
return this.CreateRecord('MJ: Reports', input, provider, userPayload, pubSub)
|
|
76492
|
-
}
|
|
76493
|
-
|
|
76494
|
-
@Mutation(() => MJReport_)
|
|
76495
|
-
async UpdateMJReport(
|
|
76496
|
-
@Arg('input', () => UpdateMJReportInput) input: UpdateMJReportInput,
|
|
76497
|
-
@Ctx() { providers, userPayload }: AppContext,
|
|
76498
|
-
@PubSub() pubSub: PubSubEngine
|
|
76499
|
-
) {
|
|
76500
|
-
const provider = GetReadWriteProvider(providers);
|
|
76501
|
-
return this.UpdateRecord('MJ: Reports', input, provider, userPayload, pubSub);
|
|
76502
|
-
}
|
|
76503
|
-
|
|
76504
|
-
@Mutation(() => MJReport_)
|
|
76505
|
-
async DeleteMJReport(@Arg('ID', () => String) ID: string, @Arg('options___', () => DeleteOptionsInput) options: DeleteOptionsInput, @Ctx() { providers, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
76506
|
-
const provider = GetReadWriteProvider(providers);
|
|
76507
|
-
const key = new CompositeKey([{FieldName: 'ID', Value: ID}]);
|
|
76508
|
-
return this.DeleteRecord('MJ: Reports', key, options, provider, userPayload, pubSub);
|
|
76509
|
-
}
|
|
76510
|
-
|
|
76511
|
-
}
|
|
76512
|
-
|
|
76513
75652
|
//****************************************************************************
|
|
76514
75653
|
// ENTITY CLASS for MJ: Resource Links
|
|
76515
75654
|
//****************************************************************************
|
|
@@ -77842,485 +76981,6 @@ export class MJRowLevelSecurityFilterResolver extends ResolverBase {
|
|
|
77842
76981
|
|
|
77843
76982
|
}
|
|
77844
76983
|
|
|
77845
|
-
//****************************************************************************
|
|
77846
|
-
// ENTITY CLASS for MJ: Scheduled Action Params
|
|
77847
|
-
//****************************************************************************
|
|
77848
|
-
@ObjectType({ description: `Stores parameter values for scheduled action executions, configuring inputs for automated action runs.` })
|
|
77849
|
-
export class MJScheduledActionParam_ {
|
|
77850
|
-
@Field()
|
|
77851
|
-
@MaxLength(36)
|
|
77852
|
-
ID: string;
|
|
77853
|
-
|
|
77854
|
-
@Field()
|
|
77855
|
-
@MaxLength(36)
|
|
77856
|
-
ScheduledActionID: string;
|
|
77857
|
-
|
|
77858
|
-
@Field()
|
|
77859
|
-
@MaxLength(36)
|
|
77860
|
-
ActionParamID: string;
|
|
77861
|
-
|
|
77862
|
-
@Field({description: `Field ValueType for entity Scheduled Action Params.`})
|
|
77863
|
-
@MaxLength(20)
|
|
77864
|
-
ValueType: string;
|
|
77865
|
-
|
|
77866
|
-
@Field({nullable: true, description: `Field Value for entity Scheduled Action Params.`})
|
|
77867
|
-
Value?: string;
|
|
77868
|
-
|
|
77869
|
-
@Field({nullable: true})
|
|
77870
|
-
Comments?: string;
|
|
77871
|
-
|
|
77872
|
-
@Field()
|
|
77873
|
-
_mj__CreatedAt: Date;
|
|
77874
|
-
|
|
77875
|
-
@Field()
|
|
77876
|
-
_mj__UpdatedAt: Date;
|
|
77877
|
-
|
|
77878
|
-
@Field()
|
|
77879
|
-
@MaxLength(255)
|
|
77880
|
-
ScheduledAction: string;
|
|
77881
|
-
|
|
77882
|
-
@Field()
|
|
77883
|
-
@MaxLength(255)
|
|
77884
|
-
ActionParam: string;
|
|
77885
|
-
|
|
77886
|
-
}
|
|
77887
|
-
|
|
77888
|
-
//****************************************************************************
|
|
77889
|
-
// INPUT TYPE for MJ: Scheduled Action Params
|
|
77890
|
-
//****************************************************************************
|
|
77891
|
-
@InputType()
|
|
77892
|
-
export class CreateMJScheduledActionParamInput {
|
|
77893
|
-
@Field({ nullable: true })
|
|
77894
|
-
ID?: string;
|
|
77895
|
-
|
|
77896
|
-
@Field({ nullable: true })
|
|
77897
|
-
ScheduledActionID?: string;
|
|
77898
|
-
|
|
77899
|
-
@Field({ nullable: true })
|
|
77900
|
-
ActionParamID?: string;
|
|
77901
|
-
|
|
77902
|
-
@Field({ nullable: true })
|
|
77903
|
-
ValueType?: string;
|
|
77904
|
-
|
|
77905
|
-
@Field({ nullable: true })
|
|
77906
|
-
Value: string | null;
|
|
77907
|
-
|
|
77908
|
-
@Field({ nullable: true })
|
|
77909
|
-
Comments: string | null;
|
|
77910
|
-
|
|
77911
|
-
@Field(() => RestoreContextInput, { nullable: true })
|
|
77912
|
-
RestoreContext___?: RestoreContextInput;
|
|
77913
|
-
}
|
|
77914
|
-
|
|
77915
|
-
|
|
77916
|
-
//****************************************************************************
|
|
77917
|
-
// INPUT TYPE for MJ: Scheduled Action Params
|
|
77918
|
-
//****************************************************************************
|
|
77919
|
-
@InputType()
|
|
77920
|
-
export class UpdateMJScheduledActionParamInput {
|
|
77921
|
-
@Field()
|
|
77922
|
-
ID: string;
|
|
77923
|
-
|
|
77924
|
-
@Field({ nullable: true })
|
|
77925
|
-
ScheduledActionID?: string;
|
|
77926
|
-
|
|
77927
|
-
@Field({ nullable: true })
|
|
77928
|
-
ActionParamID?: string;
|
|
77929
|
-
|
|
77930
|
-
@Field({ nullable: true })
|
|
77931
|
-
ValueType?: string;
|
|
77932
|
-
|
|
77933
|
-
@Field({ nullable: true })
|
|
77934
|
-
Value?: string | null;
|
|
77935
|
-
|
|
77936
|
-
@Field({ nullable: true })
|
|
77937
|
-
Comments?: string | null;
|
|
77938
|
-
|
|
77939
|
-
@Field(() => [KeyValuePairInput], { nullable: true })
|
|
77940
|
-
OldValues___?: KeyValuePairInput[];
|
|
77941
|
-
|
|
77942
|
-
@Field(() => RestoreContextInput, { nullable: true })
|
|
77943
|
-
RestoreContext___?: RestoreContextInput;
|
|
77944
|
-
}
|
|
77945
|
-
|
|
77946
|
-
//****************************************************************************
|
|
77947
|
-
// RESOLVER for MJ: Scheduled Action Params
|
|
77948
|
-
//****************************************************************************
|
|
77949
|
-
@ObjectType()
|
|
77950
|
-
export class RunMJScheduledActionParamViewResult {
|
|
77951
|
-
@Field(() => [MJScheduledActionParam_])
|
|
77952
|
-
Results: MJScheduledActionParam_[];
|
|
77953
|
-
|
|
77954
|
-
@Field(() => String, {nullable: true})
|
|
77955
|
-
UserViewRunID?: string;
|
|
77956
|
-
|
|
77957
|
-
@Field(() => Int, {nullable: true})
|
|
77958
|
-
RowCount: number;
|
|
77959
|
-
|
|
77960
|
-
@Field(() => Int, {nullable: true})
|
|
77961
|
-
TotalRowCount: number;
|
|
77962
|
-
|
|
77963
|
-
@Field(() => Int, {nullable: true})
|
|
77964
|
-
ExecutionTime: number;
|
|
77965
|
-
|
|
77966
|
-
@Field({nullable: true})
|
|
77967
|
-
ErrorMessage?: string;
|
|
77968
|
-
|
|
77969
|
-
@Field(() => Boolean, {nullable: false})
|
|
77970
|
-
Success: boolean;
|
|
77971
|
-
}
|
|
77972
|
-
|
|
77973
|
-
@Resolver(MJScheduledActionParam_)
|
|
77974
|
-
export class MJScheduledActionParamResolver extends ResolverBase {
|
|
77975
|
-
@Query(() => RunMJScheduledActionParamViewResult)
|
|
77976
|
-
async RunMJScheduledActionParamViewByID(@Arg('input', () => RunViewByIDInput) input: RunViewByIDInput, @Ctx() { providers, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
77977
|
-
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
77978
|
-
return super.RunViewByIDGeneric(input, provider, userPayload, pubSub);
|
|
77979
|
-
}
|
|
77980
|
-
|
|
77981
|
-
@Query(() => RunMJScheduledActionParamViewResult)
|
|
77982
|
-
async RunMJScheduledActionParamViewByName(@Arg('input', () => RunViewByNameInput) input: RunViewByNameInput, @Ctx() { providers, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
77983
|
-
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
77984
|
-
return super.RunViewByNameGeneric(input, provider, userPayload, pubSub);
|
|
77985
|
-
}
|
|
77986
|
-
|
|
77987
|
-
@Query(() => RunMJScheduledActionParamViewResult)
|
|
77988
|
-
async RunMJScheduledActionParamDynamicView(@Arg('input', () => RunDynamicViewInput) input: RunDynamicViewInput, @Ctx() { providers, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
77989
|
-
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
77990
|
-
input.EntityName = 'MJ: Scheduled Action Params';
|
|
77991
|
-
return super.RunDynamicViewGeneric(input, provider, userPayload, pubSub);
|
|
77992
|
-
}
|
|
77993
|
-
@Query(() => MJScheduledActionParam_, { nullable: true })
|
|
77994
|
-
async MJScheduledActionParam(@Arg('ID', () => String) ID: string, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine): Promise<MJScheduledActionParam_ | null> {
|
|
77995
|
-
this.CheckUserReadPermissions('MJ: Scheduled Action Params', userPayload);
|
|
77996
|
-
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
77997
|
-
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwScheduledActionParams')} WHERE ${provider.QuoteIdentifier('ID')}=${provider.BuildParameterPlaceholder(0)} ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: Scheduled Action Params', userPayload, EntityPermissionType.Read, 'AND');
|
|
77998
|
-
const rows = await provider.ExecuteSQL(sSQL, [ID], undefined, this.GetUserFromPayload(userPayload));
|
|
77999
|
-
const result = await this.MapFieldNamesToCodeNames('MJ: Scheduled Action Params', rows && rows.length > 0 ? rows[0] : null, this.GetUserFromPayload(userPayload));
|
|
78000
|
-
return result;
|
|
78001
|
-
}
|
|
78002
|
-
|
|
78003
|
-
@Mutation(() => MJScheduledActionParam_)
|
|
78004
|
-
async CreateMJScheduledActionParam(
|
|
78005
|
-
@Arg('input', () => CreateMJScheduledActionParamInput) input: CreateMJScheduledActionParamInput,
|
|
78006
|
-
@Ctx() { providers, userPayload }: AppContext,
|
|
78007
|
-
@PubSub() pubSub: PubSubEngine
|
|
78008
|
-
) {
|
|
78009
|
-
const provider = GetReadWriteProvider(providers);
|
|
78010
|
-
return this.CreateRecord('MJ: Scheduled Action Params', input, provider, userPayload, pubSub)
|
|
78011
|
-
}
|
|
78012
|
-
|
|
78013
|
-
@Mutation(() => MJScheduledActionParam_)
|
|
78014
|
-
async UpdateMJScheduledActionParam(
|
|
78015
|
-
@Arg('input', () => UpdateMJScheduledActionParamInput) input: UpdateMJScheduledActionParamInput,
|
|
78016
|
-
@Ctx() { providers, userPayload }: AppContext,
|
|
78017
|
-
@PubSub() pubSub: PubSubEngine
|
|
78018
|
-
) {
|
|
78019
|
-
const provider = GetReadWriteProvider(providers);
|
|
78020
|
-
return this.UpdateRecord('MJ: Scheduled Action Params', input, provider, userPayload, pubSub);
|
|
78021
|
-
}
|
|
78022
|
-
|
|
78023
|
-
@Mutation(() => MJScheduledActionParam_)
|
|
78024
|
-
async DeleteMJScheduledActionParam(@Arg('ID', () => String) ID: string, @Arg('options___', () => DeleteOptionsInput) options: DeleteOptionsInput, @Ctx() { providers, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
78025
|
-
const provider = GetReadWriteProvider(providers);
|
|
78026
|
-
const key = new CompositeKey([{FieldName: 'ID', Value: ID}]);
|
|
78027
|
-
return this.DeleteRecord('MJ: Scheduled Action Params', key, options, provider, userPayload, pubSub);
|
|
78028
|
-
}
|
|
78029
|
-
|
|
78030
|
-
}
|
|
78031
|
-
|
|
78032
|
-
//****************************************************************************
|
|
78033
|
-
// ENTITY CLASS for MJ: Scheduled Actions
|
|
78034
|
-
//****************************************************************************
|
|
78035
|
-
@ObjectType({ description: `Track scheduled actions and their details` })
|
|
78036
|
-
export class MJScheduledAction_ {
|
|
78037
|
-
@Field()
|
|
78038
|
-
@MaxLength(36)
|
|
78039
|
-
ID: string;
|
|
78040
|
-
|
|
78041
|
-
@Field()
|
|
78042
|
-
@MaxLength(255)
|
|
78043
|
-
Name: string;
|
|
78044
|
-
|
|
78045
|
-
@Field({nullable: true})
|
|
78046
|
-
Description?: string;
|
|
78047
|
-
|
|
78048
|
-
@Field()
|
|
78049
|
-
@MaxLength(36)
|
|
78050
|
-
CreatedByUserID: string;
|
|
78051
|
-
|
|
78052
|
-
@Field()
|
|
78053
|
-
@MaxLength(36)
|
|
78054
|
-
ActionID: string;
|
|
78055
|
-
|
|
78056
|
-
@Field({description: `Type of the scheduled action (Daily, Weekly, Monthly, Yearly, Custom)`})
|
|
78057
|
-
@MaxLength(20)
|
|
78058
|
-
Type: string;
|
|
78059
|
-
|
|
78060
|
-
@Field({nullable: true, description: `Cron expression defining the schedule, automatically maintained by the system unless Type is Custom, in which case the user directly sets this`})
|
|
78061
|
-
@MaxLength(100)
|
|
78062
|
-
CronExpression?: string;
|
|
78063
|
-
|
|
78064
|
-
@Field({description: `Timezone for the scheduled action, if not specified defaults to UTC/Z`})
|
|
78065
|
-
@MaxLength(100)
|
|
78066
|
-
Timezone: string;
|
|
78067
|
-
|
|
78068
|
-
@Field({description: `Status of the scheduled action (Pending, Active, Disabled, Expired)`})
|
|
78069
|
-
@MaxLength(20)
|
|
78070
|
-
Status: string;
|
|
78071
|
-
|
|
78072
|
-
@Field(() => Int, {nullable: true, description: `Interval in days for the scheduled action`})
|
|
78073
|
-
IntervalDays?: number;
|
|
78074
|
-
|
|
78075
|
-
@Field({nullable: true, description: `Day of the week for the scheduled action`})
|
|
78076
|
-
@MaxLength(20)
|
|
78077
|
-
DayOfWeek?: string;
|
|
78078
|
-
|
|
78079
|
-
@Field(() => Int, {nullable: true, description: `Day of the month for the scheduled action`})
|
|
78080
|
-
DayOfMonth?: number;
|
|
78081
|
-
|
|
78082
|
-
@Field({nullable: true, description: `Month for the scheduled action`})
|
|
78083
|
-
@MaxLength(20)
|
|
78084
|
-
Month?: string;
|
|
78085
|
-
|
|
78086
|
-
@Field({nullable: true, description: `Field CustomCronExpression for entity Scheduled Actions.`})
|
|
78087
|
-
@MaxLength(255)
|
|
78088
|
-
CustomCronExpression?: string;
|
|
78089
|
-
|
|
78090
|
-
@Field()
|
|
78091
|
-
_mj__CreatedAt: Date;
|
|
78092
|
-
|
|
78093
|
-
@Field()
|
|
78094
|
-
_mj__UpdatedAt: Date;
|
|
78095
|
-
|
|
78096
|
-
@Field()
|
|
78097
|
-
@MaxLength(100)
|
|
78098
|
-
CreatedByUser: string;
|
|
78099
|
-
|
|
78100
|
-
@Field()
|
|
78101
|
-
@MaxLength(425)
|
|
78102
|
-
Action: string;
|
|
78103
|
-
|
|
78104
|
-
@Field(() => [MJScheduledActionParam_])
|
|
78105
|
-
MJScheduledActionParams_ScheduledActionIDArray: MJScheduledActionParam_[]; // Link to MJScheduledActionParams
|
|
78106
|
-
|
|
78107
|
-
@Field(() => [MJContentSource_])
|
|
78108
|
-
MJContentSources_ScheduledActionIDArray: MJContentSource_[]; // Link to MJContentSources
|
|
78109
|
-
|
|
78110
|
-
}
|
|
78111
|
-
|
|
78112
|
-
//****************************************************************************
|
|
78113
|
-
// INPUT TYPE for MJ: Scheduled Actions
|
|
78114
|
-
//****************************************************************************
|
|
78115
|
-
@InputType()
|
|
78116
|
-
export class CreateMJScheduledActionInput {
|
|
78117
|
-
@Field({ nullable: true })
|
|
78118
|
-
ID?: string;
|
|
78119
|
-
|
|
78120
|
-
@Field({ nullable: true })
|
|
78121
|
-
Name?: string;
|
|
78122
|
-
|
|
78123
|
-
@Field({ nullable: true })
|
|
78124
|
-
Description: string | null;
|
|
78125
|
-
|
|
78126
|
-
@Field({ nullable: true })
|
|
78127
|
-
CreatedByUserID?: string;
|
|
78128
|
-
|
|
78129
|
-
@Field({ nullable: true })
|
|
78130
|
-
ActionID?: string;
|
|
78131
|
-
|
|
78132
|
-
@Field({ nullable: true })
|
|
78133
|
-
Type?: string;
|
|
78134
|
-
|
|
78135
|
-
@Field({ nullable: true })
|
|
78136
|
-
CronExpression: string | null;
|
|
78137
|
-
|
|
78138
|
-
@Field({ nullable: true })
|
|
78139
|
-
Timezone?: string;
|
|
78140
|
-
|
|
78141
|
-
@Field({ nullable: true })
|
|
78142
|
-
Status?: string;
|
|
78143
|
-
|
|
78144
|
-
@Field(() => Int, { nullable: true })
|
|
78145
|
-
IntervalDays: number | null;
|
|
78146
|
-
|
|
78147
|
-
@Field({ nullable: true })
|
|
78148
|
-
DayOfWeek: string | null;
|
|
78149
|
-
|
|
78150
|
-
@Field(() => Int, { nullable: true })
|
|
78151
|
-
DayOfMonth: number | null;
|
|
78152
|
-
|
|
78153
|
-
@Field({ nullable: true })
|
|
78154
|
-
Month: string | null;
|
|
78155
|
-
|
|
78156
|
-
@Field({ nullable: true })
|
|
78157
|
-
CustomCronExpression: string | null;
|
|
78158
|
-
|
|
78159
|
-
@Field(() => RestoreContextInput, { nullable: true })
|
|
78160
|
-
RestoreContext___?: RestoreContextInput;
|
|
78161
|
-
}
|
|
78162
|
-
|
|
78163
|
-
|
|
78164
|
-
//****************************************************************************
|
|
78165
|
-
// INPUT TYPE for MJ: Scheduled Actions
|
|
78166
|
-
//****************************************************************************
|
|
78167
|
-
@InputType()
|
|
78168
|
-
export class UpdateMJScheduledActionInput {
|
|
78169
|
-
@Field()
|
|
78170
|
-
ID: string;
|
|
78171
|
-
|
|
78172
|
-
@Field({ nullable: true })
|
|
78173
|
-
Name?: string;
|
|
78174
|
-
|
|
78175
|
-
@Field({ nullable: true })
|
|
78176
|
-
Description?: string | null;
|
|
78177
|
-
|
|
78178
|
-
@Field({ nullable: true })
|
|
78179
|
-
CreatedByUserID?: string;
|
|
78180
|
-
|
|
78181
|
-
@Field({ nullable: true })
|
|
78182
|
-
ActionID?: string;
|
|
78183
|
-
|
|
78184
|
-
@Field({ nullable: true })
|
|
78185
|
-
Type?: string;
|
|
78186
|
-
|
|
78187
|
-
@Field({ nullable: true })
|
|
78188
|
-
CronExpression?: string | null;
|
|
78189
|
-
|
|
78190
|
-
@Field({ nullable: true })
|
|
78191
|
-
Timezone?: string;
|
|
78192
|
-
|
|
78193
|
-
@Field({ nullable: true })
|
|
78194
|
-
Status?: string;
|
|
78195
|
-
|
|
78196
|
-
@Field(() => Int, { nullable: true })
|
|
78197
|
-
IntervalDays?: number | null;
|
|
78198
|
-
|
|
78199
|
-
@Field({ nullable: true })
|
|
78200
|
-
DayOfWeek?: string | null;
|
|
78201
|
-
|
|
78202
|
-
@Field(() => Int, { nullable: true })
|
|
78203
|
-
DayOfMonth?: number | null;
|
|
78204
|
-
|
|
78205
|
-
@Field({ nullable: true })
|
|
78206
|
-
Month?: string | null;
|
|
78207
|
-
|
|
78208
|
-
@Field({ nullable: true })
|
|
78209
|
-
CustomCronExpression?: string | null;
|
|
78210
|
-
|
|
78211
|
-
@Field(() => [KeyValuePairInput], { nullable: true })
|
|
78212
|
-
OldValues___?: KeyValuePairInput[];
|
|
78213
|
-
|
|
78214
|
-
@Field(() => RestoreContextInput, { nullable: true })
|
|
78215
|
-
RestoreContext___?: RestoreContextInput;
|
|
78216
|
-
}
|
|
78217
|
-
|
|
78218
|
-
//****************************************************************************
|
|
78219
|
-
// RESOLVER for MJ: Scheduled Actions
|
|
78220
|
-
//****************************************************************************
|
|
78221
|
-
@ObjectType()
|
|
78222
|
-
export class RunMJScheduledActionViewResult {
|
|
78223
|
-
@Field(() => [MJScheduledAction_])
|
|
78224
|
-
Results: MJScheduledAction_[];
|
|
78225
|
-
|
|
78226
|
-
@Field(() => String, {nullable: true})
|
|
78227
|
-
UserViewRunID?: string;
|
|
78228
|
-
|
|
78229
|
-
@Field(() => Int, {nullable: true})
|
|
78230
|
-
RowCount: number;
|
|
78231
|
-
|
|
78232
|
-
@Field(() => Int, {nullable: true})
|
|
78233
|
-
TotalRowCount: number;
|
|
78234
|
-
|
|
78235
|
-
@Field(() => Int, {nullable: true})
|
|
78236
|
-
ExecutionTime: number;
|
|
78237
|
-
|
|
78238
|
-
@Field({nullable: true})
|
|
78239
|
-
ErrorMessage?: string;
|
|
78240
|
-
|
|
78241
|
-
@Field(() => Boolean, {nullable: false})
|
|
78242
|
-
Success: boolean;
|
|
78243
|
-
}
|
|
78244
|
-
|
|
78245
|
-
@Resolver(MJScheduledAction_)
|
|
78246
|
-
export class MJScheduledActionResolver extends ResolverBase {
|
|
78247
|
-
@Query(() => RunMJScheduledActionViewResult)
|
|
78248
|
-
async RunMJScheduledActionViewByID(@Arg('input', () => RunViewByIDInput) input: RunViewByIDInput, @Ctx() { providers, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
78249
|
-
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
78250
|
-
return super.RunViewByIDGeneric(input, provider, userPayload, pubSub);
|
|
78251
|
-
}
|
|
78252
|
-
|
|
78253
|
-
@Query(() => RunMJScheduledActionViewResult)
|
|
78254
|
-
async RunMJScheduledActionViewByName(@Arg('input', () => RunViewByNameInput) input: RunViewByNameInput, @Ctx() { providers, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
78255
|
-
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
78256
|
-
return super.RunViewByNameGeneric(input, provider, userPayload, pubSub);
|
|
78257
|
-
}
|
|
78258
|
-
|
|
78259
|
-
@Query(() => RunMJScheduledActionViewResult)
|
|
78260
|
-
async RunMJScheduledActionDynamicView(@Arg('input', () => RunDynamicViewInput) input: RunDynamicViewInput, @Ctx() { providers, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
78261
|
-
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
78262
|
-
input.EntityName = 'MJ: Scheduled Actions';
|
|
78263
|
-
return super.RunDynamicViewGeneric(input, provider, userPayload, pubSub);
|
|
78264
|
-
}
|
|
78265
|
-
@Query(() => MJScheduledAction_, { nullable: true })
|
|
78266
|
-
async MJScheduledAction(@Arg('ID', () => String) ID: string, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine): Promise<MJScheduledAction_ | null> {
|
|
78267
|
-
this.CheckUserReadPermissions('MJ: Scheduled Actions', userPayload);
|
|
78268
|
-
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
78269
|
-
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwScheduledActions')} WHERE ${provider.QuoteIdentifier('ID')}=${provider.BuildParameterPlaceholder(0)} ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: Scheduled Actions', userPayload, EntityPermissionType.Read, 'AND');
|
|
78270
|
-
const rows = await provider.ExecuteSQL(sSQL, [ID], undefined, this.GetUserFromPayload(userPayload));
|
|
78271
|
-
const result = await this.MapFieldNamesToCodeNames('MJ: Scheduled Actions', rows && rows.length > 0 ? rows[0] : null, this.GetUserFromPayload(userPayload));
|
|
78272
|
-
return result;
|
|
78273
|
-
}
|
|
78274
|
-
|
|
78275
|
-
@FieldResolver(() => [MJScheduledActionParam_])
|
|
78276
|
-
async MJScheduledActionParams_ScheduledActionIDArray(@Root() mjscheduledaction_: MJScheduledAction_, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
78277
|
-
this.CheckUserReadPermissions('MJ: Scheduled Action Params', userPayload);
|
|
78278
|
-
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
78279
|
-
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwScheduledActionParams')} WHERE ${provider.QuoteIdentifier('ScheduledActionID')}=${provider.BuildParameterPlaceholder(0)} ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: Scheduled Action Params', userPayload, EntityPermissionType.Read, 'AND');
|
|
78280
|
-
const rows = await provider.ExecuteSQL(sSQL, [mjscheduledaction_.ID], undefined, this.GetUserFromPayload(userPayload));
|
|
78281
|
-
const result = await this.ArrayMapFieldNamesToCodeNames('MJ: Scheduled Action Params', rows, this.GetUserFromPayload(userPayload));
|
|
78282
|
-
return result;
|
|
78283
|
-
}
|
|
78284
|
-
|
|
78285
|
-
@FieldResolver(() => [MJContentSource_])
|
|
78286
|
-
async MJContentSources_ScheduledActionIDArray(@Root() mjscheduledaction_: MJScheduledAction_, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
78287
|
-
this.CheckUserReadPermissions('MJ: Content Sources', userPayload);
|
|
78288
|
-
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
78289
|
-
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwContentSources')} WHERE ${provider.QuoteIdentifier('ScheduledActionID')}=${provider.BuildParameterPlaceholder(0)} ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: Content Sources', userPayload, EntityPermissionType.Read, 'AND');
|
|
78290
|
-
const rows = await provider.ExecuteSQL(sSQL, [mjscheduledaction_.ID], undefined, this.GetUserFromPayload(userPayload));
|
|
78291
|
-
const result = await this.ArrayMapFieldNamesToCodeNames('MJ: Content Sources', rows, this.GetUserFromPayload(userPayload));
|
|
78292
|
-
return result;
|
|
78293
|
-
}
|
|
78294
|
-
|
|
78295
|
-
@Mutation(() => MJScheduledAction_)
|
|
78296
|
-
async CreateMJScheduledAction(
|
|
78297
|
-
@Arg('input', () => CreateMJScheduledActionInput) input: CreateMJScheduledActionInput,
|
|
78298
|
-
@Ctx() { providers, userPayload }: AppContext,
|
|
78299
|
-
@PubSub() pubSub: PubSubEngine
|
|
78300
|
-
) {
|
|
78301
|
-
const provider = GetReadWriteProvider(providers);
|
|
78302
|
-
return this.CreateRecord('MJ: Scheduled Actions', input, provider, userPayload, pubSub)
|
|
78303
|
-
}
|
|
78304
|
-
|
|
78305
|
-
@Mutation(() => MJScheduledAction_)
|
|
78306
|
-
async UpdateMJScheduledAction(
|
|
78307
|
-
@Arg('input', () => UpdateMJScheduledActionInput) input: UpdateMJScheduledActionInput,
|
|
78308
|
-
@Ctx() { providers, userPayload }: AppContext,
|
|
78309
|
-
@PubSub() pubSub: PubSubEngine
|
|
78310
|
-
) {
|
|
78311
|
-
const provider = GetReadWriteProvider(providers);
|
|
78312
|
-
return this.UpdateRecord('MJ: Scheduled Actions', input, provider, userPayload, pubSub);
|
|
78313
|
-
}
|
|
78314
|
-
|
|
78315
|
-
@Mutation(() => MJScheduledAction_)
|
|
78316
|
-
async DeleteMJScheduledAction(@Arg('ID', () => String) ID: string, @Arg('options___', () => DeleteOptionsInput) options: DeleteOptionsInput, @Ctx() { providers, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
78317
|
-
const provider = GetReadWriteProvider(providers);
|
|
78318
|
-
const key = new CompositeKey([{FieldName: 'ID', Value: ID}]);
|
|
78319
|
-
return this.DeleteRecord('MJ: Scheduled Actions', key, options, provider, userPayload, pubSub);
|
|
78320
|
-
}
|
|
78321
|
-
|
|
78322
|
-
}
|
|
78323
|
-
|
|
78324
76984
|
//****************************************************************************
|
|
78325
76985
|
// ENTITY CLASS for MJ: Scheduled Job Runs
|
|
78326
76986
|
//****************************************************************************
|
|
@@ -78891,6 +77551,10 @@ export class MJScheduledJob_ {
|
|
|
78891
77551
|
@Field(() => Int, {nullable: true, description: `Optional per-job override for the acquire-time lock lease length, in minutes. When set and positive, the engine uses max(default lease, MaxRuntimeMinutes) as the initial ExpectedCompletionAt — so it only ever EXTENDS the default lease, never shrinks it. Intended for jobs whose work is a single long-running call that cannot heartbeat mid-flight (e.g. one slow synchronous action). Jobs that heartbeat via the plugin opt-in pattern do not need this. NULL = use the engine default lease (LeaseTimeoutMinutes). See plans/scheduled-job-engine-heartbeat-lease.md (GH #2749).`})
|
|
78892
77552
|
MaxRuntimeMinutes?: number;
|
|
78893
77553
|
|
|
77554
|
+
@Field({description: `What this job does about fire times that passed while the scheduler was not running (a deploy, a crash, a sleeping machine). RunOnce (the default) performs a single catch-up run and then resumes the normal schedule — correct for digests, syncs and anything where only the latest state matters, and identical to the behavior every job had before this column existed. RunAll replays each missed occurrence, one per poll tick so a long outage drains gradually rather than dispatching at once — correct for per-period work such as billing or metric snapshots, where skipping a period loses data nothing else recreates. Skip performs no catch-up at all and simply advances to the next future occurrence — correct for work whose value expires, such as a cache warm. A run is only treated as missed when a LATER occurrence has also come due, so a job that merely became due seconds ago is never misclassified; this is evaluated cron-relatively rather than against a fixed grace window, which would misjudge both a per-minute job after a short pause and a monthly job that is a week late.`})
|
|
77555
|
+
@MaxLength(20)
|
|
77556
|
+
MissedRunPolicy: string;
|
|
77557
|
+
|
|
78894
77558
|
@Field()
|
|
78895
77559
|
@MaxLength(100)
|
|
78896
77560
|
JobType: string;
|
|
@@ -78906,6 +77570,9 @@ export class MJScheduledJob_ {
|
|
|
78906
77570
|
@Field(() => [MJScheduledJobRun_])
|
|
78907
77571
|
MJScheduledJobRuns_ScheduledJobIDArray: MJScheduledJobRun_[]; // Link to MJScheduledJobRuns
|
|
78908
77572
|
|
|
77573
|
+
@Field(() => [MJContentSource_])
|
|
77574
|
+
MJContentSources_ScheduledJobIDArray: MJContentSource_[]; // Link to MJContentSources
|
|
77575
|
+
|
|
78909
77576
|
@Field(() => [MJCompanyIntegration_])
|
|
78910
77577
|
MJCompanyIntegrations_ScheduledJobIDArray: MJCompanyIntegration_[]; // Link to MJCompanyIntegrations
|
|
78911
77578
|
|
|
@@ -79000,6 +77667,9 @@ export class CreateMJScheduledJobInput {
|
|
|
79000
77667
|
@Field(() => Int, { nullable: true })
|
|
79001
77668
|
MaxRuntimeMinutes: number | null;
|
|
79002
77669
|
|
|
77670
|
+
@Field({ nullable: true })
|
|
77671
|
+
MissedRunPolicy?: string;
|
|
77672
|
+
|
|
79003
77673
|
@Field(() => RestoreContextInput, { nullable: true })
|
|
79004
77674
|
RestoreContext___?: RestoreContextInput;
|
|
79005
77675
|
}
|
|
@@ -79094,6 +77764,9 @@ export class UpdateMJScheduledJobInput {
|
|
|
79094
77764
|
@Field(() => Int, { nullable: true })
|
|
79095
77765
|
MaxRuntimeMinutes?: number | null;
|
|
79096
77766
|
|
|
77767
|
+
@Field({ nullable: true })
|
|
77768
|
+
MissedRunPolicy?: string;
|
|
77769
|
+
|
|
79097
77770
|
@Field(() => [KeyValuePairInput], { nullable: true })
|
|
79098
77771
|
OldValues___?: KeyValuePairInput[];
|
|
79099
77772
|
|
|
@@ -79168,6 +77841,16 @@ export class MJScheduledJobResolver extends ResolverBase {
|
|
|
79168
77841
|
return result;
|
|
79169
77842
|
}
|
|
79170
77843
|
|
|
77844
|
+
@FieldResolver(() => [MJContentSource_])
|
|
77845
|
+
async MJContentSources_ScheduledJobIDArray(@Root() mjscheduledjob_: MJScheduledJob_, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
77846
|
+
this.CheckUserReadPermissions('MJ: Content Sources', userPayload);
|
|
77847
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
77848
|
+
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwContentSources')} WHERE ${provider.QuoteIdentifier('ScheduledJobID')}=${provider.BuildParameterPlaceholder(0)} ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: Content Sources', userPayload, EntityPermissionType.Read, 'AND');
|
|
77849
|
+
const rows = await provider.ExecuteSQL(sSQL, [mjscheduledjob_.ID], undefined, this.GetUserFromPayload(userPayload));
|
|
77850
|
+
const result = await this.ArrayMapFieldNamesToCodeNames('MJ: Content Sources', rows, this.GetUserFromPayload(userPayload));
|
|
77851
|
+
return result;
|
|
77852
|
+
}
|
|
77853
|
+
|
|
79171
77854
|
@FieldResolver(() => [MJCompanyIntegration_])
|
|
79172
77855
|
async MJCompanyIntegrations_ScheduledJobIDArray(@Root() mjscheduledjob_: MJScheduledJob_, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
79173
77856
|
this.CheckUserReadPermissions('MJ: Company Integrations', userPayload);
|
|
@@ -85739,6 +84422,9 @@ export class MJTaskDependency_ {
|
|
|
85739
84422
|
@Field()
|
|
85740
84423
|
_mj__UpdatedAt: Date;
|
|
85741
84424
|
|
|
84425
|
+
@Field({nullable: true, description: `Optional boolean expression gating this dependency edge. NULL (the default, and the value every pre-existing row carries) means the edge is unconditional, so adding this column changes the meaning of no existing graph. When present it is evaluated by the shared GraphTraversalEngine against the same context a design-time AIAgentStepPath.Condition sees, which is what lets a runtime task graph and a flow-editor graph be the same graph. A condition that evaluates false skips the edge; one that fails to evaluate ALSO skips it, but is reported distinctly so a graph stalled by a malformed expression cannot be mistaken for one that finished normally.`})
|
|
84426
|
+
Condition?: string;
|
|
84427
|
+
|
|
85742
84428
|
@Field()
|
|
85743
84429
|
@MaxLength(255)
|
|
85744
84430
|
Task: string;
|
|
@@ -85766,6 +84452,9 @@ export class CreateMJTaskDependencyInput {
|
|
|
85766
84452
|
@Field({ nullable: true })
|
|
85767
84453
|
DependencyType?: string;
|
|
85768
84454
|
|
|
84455
|
+
@Field({ nullable: true })
|
|
84456
|
+
Condition: string | null;
|
|
84457
|
+
|
|
85769
84458
|
@Field(() => RestoreContextInput, { nullable: true })
|
|
85770
84459
|
RestoreContext___?: RestoreContextInput;
|
|
85771
84460
|
}
|
|
@@ -85788,6 +84477,9 @@ export class UpdateMJTaskDependencyInput {
|
|
|
85788
84477
|
@Field({ nullable: true })
|
|
85789
84478
|
DependencyType?: string;
|
|
85790
84479
|
|
|
84480
|
+
@Field({ nullable: true })
|
|
84481
|
+
Condition?: string | null;
|
|
84482
|
+
|
|
85791
84483
|
@Field(() => [KeyValuePairInput], { nullable: true })
|
|
85792
84484
|
OldValues___?: KeyValuePairInput[];
|
|
85793
84485
|
|
|
@@ -86110,6 +84802,26 @@ export class MJTask_ {
|
|
|
86110
84802
|
@Field()
|
|
86111
84803
|
_mj__UpdatedAt: Date;
|
|
86112
84804
|
|
|
84805
|
+
@Field({nullable: true, description: `Structured input for this task, stored as JSON. Replaces the legacy __TASK_METADATA__ marker that was embedded in Description.`})
|
|
84806
|
+
InputPayload?: string;
|
|
84807
|
+
|
|
84808
|
+
@Field({nullable: true, description: `Structured output produced by this task, stored as JSON. Downstream tasks read their dependencies' outputs from here. Replaces the legacy __TASK_OUTPUT__ marker that was embedded in Description.`})
|
|
84809
|
+
OutputPayload?: string;
|
|
84810
|
+
|
|
84811
|
+
@Field({nullable: true, description: `Failure detail when Status is Failed. Null for tasks that have not failed.`})
|
|
84812
|
+
ErrorMessage?: string;
|
|
84813
|
+
|
|
84814
|
+
@Field({nullable: true, description: `The specific AI Agent Run that executed this task. Distinct from the conversation-level link: sibling tasks in one graph each get their own run, so this is what run-history and Gantt views should follow.`})
|
|
84815
|
+
@MaxLength(36)
|
|
84816
|
+
AgentRunID?: string;
|
|
84817
|
+
|
|
84818
|
+
@Field({nullable: true, description: `Identifier of the dispatcher instance currently executing this task. Part of the compare-and-swap claim protocol; set only by the dispatcher, never by user-facing writes. Null when unclaimed. Human-assigned tasks never carry a claim.`})
|
|
84819
|
+
@MaxLength(100)
|
|
84820
|
+
ClaimedBy?: string;
|
|
84821
|
+
|
|
84822
|
+
@Field({nullable: true, description: `When the current dispatcher claim lapses. Long-running tasks extend it by heartbeat; reconciliation treats an expired claim as an orphaned task and returns it to Pending.`})
|
|
84823
|
+
ClaimExpiresAt?: Date;
|
|
84824
|
+
|
|
86113
84825
|
@Field({nullable: true})
|
|
86114
84826
|
@MaxLength(255)
|
|
86115
84827
|
Parent?: string;
|
|
@@ -86138,6 +84850,10 @@ export class MJTask_ {
|
|
|
86138
84850
|
@MaxLength(255)
|
|
86139
84851
|
Agent?: string;
|
|
86140
84852
|
|
|
84853
|
+
@Field({nullable: true})
|
|
84854
|
+
@MaxLength(255)
|
|
84855
|
+
AgentRun?: string;
|
|
84856
|
+
|
|
86141
84857
|
@Field({nullable: true})
|
|
86142
84858
|
@MaxLength(36)
|
|
86143
84859
|
RootParentID?: string;
|
|
@@ -86203,6 +84919,24 @@ export class CreateMJTaskInput {
|
|
|
86203
84919
|
@Field({ nullable: true })
|
|
86204
84920
|
CompletedAt: Date | null;
|
|
86205
84921
|
|
|
84922
|
+
@Field({ nullable: true })
|
|
84923
|
+
InputPayload: string | null;
|
|
84924
|
+
|
|
84925
|
+
@Field({ nullable: true })
|
|
84926
|
+
OutputPayload: string | null;
|
|
84927
|
+
|
|
84928
|
+
@Field({ nullable: true })
|
|
84929
|
+
ErrorMessage: string | null;
|
|
84930
|
+
|
|
84931
|
+
@Field({ nullable: true })
|
|
84932
|
+
AgentRunID: string | null;
|
|
84933
|
+
|
|
84934
|
+
@Field({ nullable: true })
|
|
84935
|
+
ClaimedBy: string | null;
|
|
84936
|
+
|
|
84937
|
+
@Field({ nullable: true })
|
|
84938
|
+
ClaimExpiresAt: Date | null;
|
|
84939
|
+
|
|
86206
84940
|
@Field(() => RestoreContextInput, { nullable: true })
|
|
86207
84941
|
RestoreContext___?: RestoreContextInput;
|
|
86208
84942
|
}
|
|
@@ -86258,6 +84992,24 @@ export class UpdateMJTaskInput {
|
|
|
86258
84992
|
@Field({ nullable: true })
|
|
86259
84993
|
CompletedAt?: Date | null;
|
|
86260
84994
|
|
|
84995
|
+
@Field({ nullable: true })
|
|
84996
|
+
InputPayload?: string | null;
|
|
84997
|
+
|
|
84998
|
+
@Field({ nullable: true })
|
|
84999
|
+
OutputPayload?: string | null;
|
|
85000
|
+
|
|
85001
|
+
@Field({ nullable: true })
|
|
85002
|
+
ErrorMessage?: string | null;
|
|
85003
|
+
|
|
85004
|
+
@Field({ nullable: true })
|
|
85005
|
+
AgentRunID?: string | null;
|
|
85006
|
+
|
|
85007
|
+
@Field({ nullable: true })
|
|
85008
|
+
ClaimedBy?: string | null;
|
|
85009
|
+
|
|
85010
|
+
@Field({ nullable: true })
|
|
85011
|
+
ClaimExpiresAt?: Date | null;
|
|
85012
|
+
|
|
86261
85013
|
@Field(() => [KeyValuePairInput], { nullable: true })
|
|
86262
85014
|
OldValues___?: KeyValuePairInput[];
|
|
86263
85015
|
|
|
@@ -94207,15 +92959,6 @@ export class MJUser_ {
|
|
|
94207
92959
|
@Field(() => [MJRecordMergeLog_])
|
|
94208
92960
|
MJRecordMergeLogs_ApprovedByUserIDArray: MJRecordMergeLog_[]; // Link to MJRecordMergeLogs
|
|
94209
92961
|
|
|
94210
|
-
@Field(() => [MJReportCategory_])
|
|
94211
|
-
MJReportCategories_UserIDArray: MJReportCategory_[]; // Link to MJReportCategories
|
|
94212
|
-
|
|
94213
|
-
@Field(() => [MJReportSnapshot_])
|
|
94214
|
-
MJReportSnapshots_UserIDArray: MJReportSnapshot_[]; // Link to MJReportSnapshots
|
|
94215
|
-
|
|
94216
|
-
@Field(() => [MJReport_])
|
|
94217
|
-
MJReports_UserIDArray: MJReport_[]; // Link to MJReports
|
|
94218
|
-
|
|
94219
92962
|
@Field(() => [MJTemplateCategory_])
|
|
94220
92963
|
MJTemplateCategories_UserIDArray: MJTemplateCategory_[]; // Link to MJTemplateCategories
|
|
94221
92964
|
|
|
@@ -94324,18 +93067,12 @@ export class MJUser_ {
|
|
|
94324
93067
|
@Field(() => [MJPublicLink_])
|
|
94325
93068
|
MJPublicLinks_UserIDArray: MJPublicLink_[]; // Link to MJPublicLinks
|
|
94326
93069
|
|
|
94327
|
-
@Field(() => [MJReportUserState_])
|
|
94328
|
-
MJReportUserStates_UserIDArray: MJReportUserState_[]; // Link to MJReportUserStates
|
|
94329
|
-
|
|
94330
93070
|
@Field(() => [MJResourceLink_])
|
|
94331
93071
|
MJResourceLinks_UserIDArray: MJResourceLink_[]; // Link to MJResourceLinks
|
|
94332
93072
|
|
|
94333
93073
|
@Field(() => [MJResourcePermission_])
|
|
94334
93074
|
MJResourcePermissions_SharedByUserIDArray: MJResourcePermission_[]; // Link to MJResourcePermissions
|
|
94335
93075
|
|
|
94336
|
-
@Field(() => [MJScheduledAction_])
|
|
94337
|
-
MJScheduledActions_CreatedByUserIDArray: MJScheduledAction_[]; // Link to MJScheduledActions
|
|
94338
|
-
|
|
94339
93076
|
@Field(() => [MJScheduledJobRun_])
|
|
94340
93077
|
MJScheduledJobRuns_ExecutedByUserIDArray: MJScheduledJobRun_[]; // Link to MJScheduledJobRuns
|
|
94341
93078
|
|
|
@@ -94821,36 +93558,6 @@ export class MJUserResolverBase extends ResolverBase {
|
|
|
94821
93558
|
return result;
|
|
94822
93559
|
}
|
|
94823
93560
|
|
|
94824
|
-
@FieldResolver(() => [MJReportCategory_])
|
|
94825
|
-
async MJReportCategories_UserIDArray(@Root() mjuser_: MJUser_, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
94826
|
-
this.CheckUserReadPermissions('MJ: Report Categories', userPayload);
|
|
94827
|
-
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
94828
|
-
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwReportCategories')} WHERE ${provider.QuoteIdentifier('UserID')}=${provider.BuildParameterPlaceholder(0)} ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: Report Categories', userPayload, EntityPermissionType.Read, 'AND');
|
|
94829
|
-
const rows = await provider.ExecuteSQL(sSQL, [mjuser_.ID], undefined, this.GetUserFromPayload(userPayload));
|
|
94830
|
-
const result = await this.ArrayMapFieldNamesToCodeNames('MJ: Report Categories', rows, this.GetUserFromPayload(userPayload));
|
|
94831
|
-
return result;
|
|
94832
|
-
}
|
|
94833
|
-
|
|
94834
|
-
@FieldResolver(() => [MJReportSnapshot_])
|
|
94835
|
-
async MJReportSnapshots_UserIDArray(@Root() mjuser_: MJUser_, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
94836
|
-
this.CheckUserReadPermissions('MJ: Report Snapshots', userPayload);
|
|
94837
|
-
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
94838
|
-
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwReportSnapshots')} WHERE ${provider.QuoteIdentifier('UserID')}=${provider.BuildParameterPlaceholder(0)} ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: Report Snapshots', userPayload, EntityPermissionType.Read, 'AND');
|
|
94839
|
-
const rows = await provider.ExecuteSQL(sSQL, [mjuser_.ID], undefined, this.GetUserFromPayload(userPayload));
|
|
94840
|
-
const result = await this.ArrayMapFieldNamesToCodeNames('MJ: Report Snapshots', rows, this.GetUserFromPayload(userPayload));
|
|
94841
|
-
return result;
|
|
94842
|
-
}
|
|
94843
|
-
|
|
94844
|
-
@FieldResolver(() => [MJReport_])
|
|
94845
|
-
async MJReports_UserIDArray(@Root() mjuser_: MJUser_, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
94846
|
-
this.CheckUserReadPermissions('MJ: Reports', userPayload);
|
|
94847
|
-
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
94848
|
-
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwReports')} WHERE ${provider.QuoteIdentifier('UserID')}=${provider.BuildParameterPlaceholder(0)} ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: Reports', userPayload, EntityPermissionType.Read, 'AND');
|
|
94849
|
-
const rows = await provider.ExecuteSQL(sSQL, [mjuser_.ID], undefined, this.GetUserFromPayload(userPayload));
|
|
94850
|
-
const result = await this.ArrayMapFieldNamesToCodeNames('MJ: Reports', rows, this.GetUserFromPayload(userPayload));
|
|
94851
|
-
return result;
|
|
94852
|
-
}
|
|
94853
|
-
|
|
94854
93561
|
@FieldResolver(() => [MJTemplateCategory_])
|
|
94855
93562
|
async MJTemplateCategories_UserIDArray(@Root() mjuser_: MJUser_, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
94856
93563
|
this.CheckUserReadPermissions('MJ: Template Categories', userPayload);
|
|
@@ -95211,16 +93918,6 @@ export class MJUserResolverBase extends ResolverBase {
|
|
|
95211
93918
|
return result;
|
|
95212
93919
|
}
|
|
95213
93920
|
|
|
95214
|
-
@FieldResolver(() => [MJReportUserState_])
|
|
95215
|
-
async MJReportUserStates_UserIDArray(@Root() mjuser_: MJUser_, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
95216
|
-
this.CheckUserReadPermissions('MJ: Report User States', userPayload);
|
|
95217
|
-
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
95218
|
-
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwReportUserStates')} WHERE ${provider.QuoteIdentifier('UserID')}=${provider.BuildParameterPlaceholder(0)} ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: Report User States', userPayload, EntityPermissionType.Read, 'AND');
|
|
95219
|
-
const rows = await provider.ExecuteSQL(sSQL, [mjuser_.ID], undefined, this.GetUserFromPayload(userPayload));
|
|
95220
|
-
const result = await this.ArrayMapFieldNamesToCodeNames('MJ: Report User States', rows, this.GetUserFromPayload(userPayload));
|
|
95221
|
-
return result;
|
|
95222
|
-
}
|
|
95223
|
-
|
|
95224
93921
|
@FieldResolver(() => [MJResourceLink_])
|
|
95225
93922
|
async MJResourceLinks_UserIDArray(@Root() mjuser_: MJUser_, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
95226
93923
|
this.CheckUserReadPermissions('MJ: Resource Links', userPayload);
|
|
@@ -95241,16 +93938,6 @@ export class MJUserResolverBase extends ResolverBase {
|
|
|
95241
93938
|
return result;
|
|
95242
93939
|
}
|
|
95243
93940
|
|
|
95244
|
-
@FieldResolver(() => [MJScheduledAction_])
|
|
95245
|
-
async MJScheduledActions_CreatedByUserIDArray(@Root() mjuser_: MJUser_, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
95246
|
-
this.CheckUserReadPermissions('MJ: Scheduled Actions', userPayload);
|
|
95247
|
-
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
95248
|
-
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwScheduledActions')} WHERE ${provider.QuoteIdentifier('CreatedByUserID')}=${provider.BuildParameterPlaceholder(0)} ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: Scheduled Actions', userPayload, EntityPermissionType.Read, 'AND');
|
|
95249
|
-
const rows = await provider.ExecuteSQL(sSQL, [mjuser_.ID], undefined, this.GetUserFromPayload(userPayload));
|
|
95250
|
-
const result = await this.ArrayMapFieldNamesToCodeNames('MJ: Scheduled Actions', rows, this.GetUserFromPayload(userPayload));
|
|
95251
|
-
return result;
|
|
95252
|
-
}
|
|
95253
|
-
|
|
95254
93941
|
@FieldResolver(() => [MJScheduledJobRun_])
|
|
95255
93942
|
async MJScheduledJobRuns_ExecutedByUserIDArray(@Root() mjuser_: MJUser_, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
95256
93943
|
this.CheckUserReadPermissions('MJ: Scheduled Job Runs', userPayload);
|
|
@@ -97445,622 +96132,6 @@ export class MJViewTypeResolver extends ResolverBase {
|
|
|
97445
96132
|
|
|
97446
96133
|
}
|
|
97447
96134
|
|
|
97448
|
-
//****************************************************************************
|
|
97449
|
-
// ENTITY CLASS for MJ: Workflow Engines
|
|
97450
|
-
//****************************************************************************
|
|
97451
|
-
@ObjectType({ description: `Registers available workflow execution engines with their capabilities, configuration, and supported workflow types.` })
|
|
97452
|
-
export class MJWorkflowEngine_ {
|
|
97453
|
-
@Field()
|
|
97454
|
-
@MaxLength(36)
|
|
97455
|
-
ID: string;
|
|
97456
|
-
|
|
97457
|
-
@Field()
|
|
97458
|
-
@MaxLength(100)
|
|
97459
|
-
Name: string;
|
|
97460
|
-
|
|
97461
|
-
@Field({nullable: true})
|
|
97462
|
-
Description?: string;
|
|
97463
|
-
|
|
97464
|
-
@Field({description: `Import path for the workflow engine driver.`})
|
|
97465
|
-
@MaxLength(500)
|
|
97466
|
-
DriverPath: string;
|
|
97467
|
-
|
|
97468
|
-
@Field({description: `Class name implementing the workflow engine interface.`})
|
|
97469
|
-
@MaxLength(100)
|
|
97470
|
-
DriverClass: string;
|
|
97471
|
-
|
|
97472
|
-
@Field()
|
|
97473
|
-
_mj__CreatedAt: Date;
|
|
97474
|
-
|
|
97475
|
-
@Field()
|
|
97476
|
-
_mj__UpdatedAt: Date;
|
|
97477
|
-
|
|
97478
|
-
@Field(() => [MJWorkflow_])
|
|
97479
|
-
MJWorkflows_WorkflowEngineIDArray: MJWorkflow_[]; // Link to MJWorkflows
|
|
97480
|
-
|
|
97481
|
-
}
|
|
97482
|
-
|
|
97483
|
-
//****************************************************************************
|
|
97484
|
-
// INPUT TYPE for MJ: Workflow Engines
|
|
97485
|
-
//****************************************************************************
|
|
97486
|
-
@InputType()
|
|
97487
|
-
export class CreateMJWorkflowEngineInput {
|
|
97488
|
-
@Field({ nullable: true })
|
|
97489
|
-
ID?: string;
|
|
97490
|
-
|
|
97491
|
-
@Field({ nullable: true })
|
|
97492
|
-
Name?: string;
|
|
97493
|
-
|
|
97494
|
-
@Field({ nullable: true })
|
|
97495
|
-
Description: string | null;
|
|
97496
|
-
|
|
97497
|
-
@Field({ nullable: true })
|
|
97498
|
-
DriverPath?: string;
|
|
97499
|
-
|
|
97500
|
-
@Field({ nullable: true })
|
|
97501
|
-
DriverClass?: string;
|
|
97502
|
-
|
|
97503
|
-
@Field(() => RestoreContextInput, { nullable: true })
|
|
97504
|
-
RestoreContext___?: RestoreContextInput;
|
|
97505
|
-
}
|
|
97506
|
-
|
|
97507
|
-
|
|
97508
|
-
//****************************************************************************
|
|
97509
|
-
// INPUT TYPE for MJ: Workflow Engines
|
|
97510
|
-
//****************************************************************************
|
|
97511
|
-
@InputType()
|
|
97512
|
-
export class UpdateMJWorkflowEngineInput {
|
|
97513
|
-
@Field()
|
|
97514
|
-
ID: string;
|
|
97515
|
-
|
|
97516
|
-
@Field({ nullable: true })
|
|
97517
|
-
Name?: string;
|
|
97518
|
-
|
|
97519
|
-
@Field({ nullable: true })
|
|
97520
|
-
Description?: string | null;
|
|
97521
|
-
|
|
97522
|
-
@Field({ nullable: true })
|
|
97523
|
-
DriverPath?: string;
|
|
97524
|
-
|
|
97525
|
-
@Field({ nullable: true })
|
|
97526
|
-
DriverClass?: string;
|
|
97527
|
-
|
|
97528
|
-
@Field(() => [KeyValuePairInput], { nullable: true })
|
|
97529
|
-
OldValues___?: KeyValuePairInput[];
|
|
97530
|
-
|
|
97531
|
-
@Field(() => RestoreContextInput, { nullable: true })
|
|
97532
|
-
RestoreContext___?: RestoreContextInput;
|
|
97533
|
-
}
|
|
97534
|
-
|
|
97535
|
-
//****************************************************************************
|
|
97536
|
-
// RESOLVER for MJ: Workflow Engines
|
|
97537
|
-
//****************************************************************************
|
|
97538
|
-
@ObjectType()
|
|
97539
|
-
export class RunMJWorkflowEngineViewResult {
|
|
97540
|
-
@Field(() => [MJWorkflowEngine_])
|
|
97541
|
-
Results: MJWorkflowEngine_[];
|
|
97542
|
-
|
|
97543
|
-
@Field(() => String, {nullable: true})
|
|
97544
|
-
UserViewRunID?: string;
|
|
97545
|
-
|
|
97546
|
-
@Field(() => Int, {nullable: true})
|
|
97547
|
-
RowCount: number;
|
|
97548
|
-
|
|
97549
|
-
@Field(() => Int, {nullable: true})
|
|
97550
|
-
TotalRowCount: number;
|
|
97551
|
-
|
|
97552
|
-
@Field(() => Int, {nullable: true})
|
|
97553
|
-
ExecutionTime: number;
|
|
97554
|
-
|
|
97555
|
-
@Field({nullable: true})
|
|
97556
|
-
ErrorMessage?: string;
|
|
97557
|
-
|
|
97558
|
-
@Field(() => Boolean, {nullable: false})
|
|
97559
|
-
Success: boolean;
|
|
97560
|
-
}
|
|
97561
|
-
|
|
97562
|
-
@Resolver(MJWorkflowEngine_)
|
|
97563
|
-
export class MJWorkflowEngineResolver extends ResolverBase {
|
|
97564
|
-
@Query(() => RunMJWorkflowEngineViewResult)
|
|
97565
|
-
async RunMJWorkflowEngineViewByID(@Arg('input', () => RunViewByIDInput) input: RunViewByIDInput, @Ctx() { providers, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
97566
|
-
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
97567
|
-
return super.RunViewByIDGeneric(input, provider, userPayload, pubSub);
|
|
97568
|
-
}
|
|
97569
|
-
|
|
97570
|
-
@Query(() => RunMJWorkflowEngineViewResult)
|
|
97571
|
-
async RunMJWorkflowEngineViewByName(@Arg('input', () => RunViewByNameInput) input: RunViewByNameInput, @Ctx() { providers, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
97572
|
-
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
97573
|
-
return super.RunViewByNameGeneric(input, provider, userPayload, pubSub);
|
|
97574
|
-
}
|
|
97575
|
-
|
|
97576
|
-
@Query(() => RunMJWorkflowEngineViewResult)
|
|
97577
|
-
async RunMJWorkflowEngineDynamicView(@Arg('input', () => RunDynamicViewInput) input: RunDynamicViewInput, @Ctx() { providers, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
97578
|
-
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
97579
|
-
input.EntityName = 'MJ: Workflow Engines';
|
|
97580
|
-
return super.RunDynamicViewGeneric(input, provider, userPayload, pubSub);
|
|
97581
|
-
}
|
|
97582
|
-
@Query(() => MJWorkflowEngine_, { nullable: true })
|
|
97583
|
-
async MJWorkflowEngine(@Arg('ID', () => String) ID: string, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine): Promise<MJWorkflowEngine_ | null> {
|
|
97584
|
-
this.CheckUserReadPermissions('MJ: Workflow Engines', userPayload);
|
|
97585
|
-
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
97586
|
-
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwWorkflowEngines')} WHERE ${provider.QuoteIdentifier('ID')}=${provider.BuildParameterPlaceholder(0)} ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: Workflow Engines', userPayload, EntityPermissionType.Read, 'AND');
|
|
97587
|
-
const rows = await provider.ExecuteSQL(sSQL, [ID], undefined, this.GetUserFromPayload(userPayload));
|
|
97588
|
-
const result = await this.MapFieldNamesToCodeNames('MJ: Workflow Engines', rows && rows.length > 0 ? rows[0] : null, this.GetUserFromPayload(userPayload));
|
|
97589
|
-
return result;
|
|
97590
|
-
}
|
|
97591
|
-
|
|
97592
|
-
@FieldResolver(() => [MJWorkflow_])
|
|
97593
|
-
async MJWorkflows_WorkflowEngineIDArray(@Root() mjworkflowengine_: MJWorkflowEngine_, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
97594
|
-
this.CheckUserReadPermissions('MJ: Workflows', userPayload);
|
|
97595
|
-
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
97596
|
-
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwWorkflows')} WHERE ${provider.QuoteIdentifier('WorkflowEngineID')}=${provider.BuildParameterPlaceholder(0)} ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: Workflows', userPayload, EntityPermissionType.Read, 'AND');
|
|
97597
|
-
const rows = await provider.ExecuteSQL(sSQL, [mjworkflowengine_.ID], undefined, this.GetUserFromPayload(userPayload));
|
|
97598
|
-
const result = await this.ArrayMapFieldNamesToCodeNames('MJ: Workflows', rows, this.GetUserFromPayload(userPayload));
|
|
97599
|
-
return result;
|
|
97600
|
-
}
|
|
97601
|
-
|
|
97602
|
-
@Mutation(() => MJWorkflowEngine_)
|
|
97603
|
-
async CreateMJWorkflowEngine(
|
|
97604
|
-
@Arg('input', () => CreateMJWorkflowEngineInput) input: CreateMJWorkflowEngineInput,
|
|
97605
|
-
@Ctx() { providers, userPayload }: AppContext,
|
|
97606
|
-
@PubSub() pubSub: PubSubEngine
|
|
97607
|
-
) {
|
|
97608
|
-
const provider = GetReadWriteProvider(providers);
|
|
97609
|
-
return this.CreateRecord('MJ: Workflow Engines', input, provider, userPayload, pubSub)
|
|
97610
|
-
}
|
|
97611
|
-
|
|
97612
|
-
@Mutation(() => MJWorkflowEngine_)
|
|
97613
|
-
async UpdateMJWorkflowEngine(
|
|
97614
|
-
@Arg('input', () => UpdateMJWorkflowEngineInput) input: UpdateMJWorkflowEngineInput,
|
|
97615
|
-
@Ctx() { providers, userPayload }: AppContext,
|
|
97616
|
-
@PubSub() pubSub: PubSubEngine
|
|
97617
|
-
) {
|
|
97618
|
-
const provider = GetReadWriteProvider(providers);
|
|
97619
|
-
return this.UpdateRecord('MJ: Workflow Engines', input, provider, userPayload, pubSub);
|
|
97620
|
-
}
|
|
97621
|
-
|
|
97622
|
-
@Mutation(() => MJWorkflowEngine_)
|
|
97623
|
-
async DeleteMJWorkflowEngine(@Arg('ID', () => String) ID: string, @Arg('options___', () => DeleteOptionsInput) options: DeleteOptionsInput, @Ctx() { providers, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
97624
|
-
const provider = GetReadWriteProvider(providers);
|
|
97625
|
-
const key = new CompositeKey([{FieldName: 'ID', Value: ID}]);
|
|
97626
|
-
return this.DeleteRecord('MJ: Workflow Engines', key, options, provider, userPayload, pubSub);
|
|
97627
|
-
}
|
|
97628
|
-
|
|
97629
|
-
}
|
|
97630
|
-
|
|
97631
|
-
//****************************************************************************
|
|
97632
|
-
// ENTITY CLASS for MJ: Workflow Runs
|
|
97633
|
-
//****************************************************************************
|
|
97634
|
-
@ObjectType({ description: `Tracks execution instances of workflows including status, timing, context data, and detailed step-by-step results.` })
|
|
97635
|
-
export class MJWorkflowRun_ {
|
|
97636
|
-
@Field()
|
|
97637
|
-
@MaxLength(36)
|
|
97638
|
-
ID: string;
|
|
97639
|
-
|
|
97640
|
-
@Field()
|
|
97641
|
-
@MaxLength(36)
|
|
97642
|
-
WorkflowID: string;
|
|
97643
|
-
|
|
97644
|
-
@Field({description: `Field ExternalSystemRecordID for entity Workflow Runs.`})
|
|
97645
|
-
@MaxLength(500)
|
|
97646
|
-
ExternalSystemRecordID: string;
|
|
97647
|
-
|
|
97648
|
-
@Field()
|
|
97649
|
-
StartedAt: Date;
|
|
97650
|
-
|
|
97651
|
-
@Field({nullable: true})
|
|
97652
|
-
EndedAt?: Date;
|
|
97653
|
-
|
|
97654
|
-
@Field()
|
|
97655
|
-
@MaxLength(10)
|
|
97656
|
-
Status: string;
|
|
97657
|
-
|
|
97658
|
-
@Field({nullable: true, description: `JSON-formatted detailed results from the workflow execution, including outputs from each step and any error information.`})
|
|
97659
|
-
Results?: string;
|
|
97660
|
-
|
|
97661
|
-
@Field()
|
|
97662
|
-
_mj__CreatedAt: Date;
|
|
97663
|
-
|
|
97664
|
-
@Field()
|
|
97665
|
-
_mj__UpdatedAt: Date;
|
|
97666
|
-
|
|
97667
|
-
@Field()
|
|
97668
|
-
@MaxLength(100)
|
|
97669
|
-
Workflow: string;
|
|
97670
|
-
|
|
97671
|
-
@Field()
|
|
97672
|
-
@MaxLength(100)
|
|
97673
|
-
WorkflowEngineName: string;
|
|
97674
|
-
|
|
97675
|
-
}
|
|
97676
|
-
|
|
97677
|
-
//****************************************************************************
|
|
97678
|
-
// INPUT TYPE for MJ: Workflow Runs
|
|
97679
|
-
//****************************************************************************
|
|
97680
|
-
@InputType()
|
|
97681
|
-
export class CreateMJWorkflowRunInput {
|
|
97682
|
-
@Field({ nullable: true })
|
|
97683
|
-
ID?: string;
|
|
97684
|
-
|
|
97685
|
-
@Field({ nullable: true })
|
|
97686
|
-
WorkflowID?: string;
|
|
97687
|
-
|
|
97688
|
-
@Field({ nullable: true })
|
|
97689
|
-
ExternalSystemRecordID?: string;
|
|
97690
|
-
|
|
97691
|
-
@Field({ nullable: true })
|
|
97692
|
-
StartedAt?: Date;
|
|
97693
|
-
|
|
97694
|
-
@Field({ nullable: true })
|
|
97695
|
-
EndedAt: Date | null;
|
|
97696
|
-
|
|
97697
|
-
@Field({ nullable: true })
|
|
97698
|
-
Status?: string;
|
|
97699
|
-
|
|
97700
|
-
@Field({ nullable: true })
|
|
97701
|
-
Results: string | null;
|
|
97702
|
-
|
|
97703
|
-
@Field(() => RestoreContextInput, { nullable: true })
|
|
97704
|
-
RestoreContext___?: RestoreContextInput;
|
|
97705
|
-
}
|
|
97706
|
-
|
|
97707
|
-
|
|
97708
|
-
//****************************************************************************
|
|
97709
|
-
// INPUT TYPE for MJ: Workflow Runs
|
|
97710
|
-
//****************************************************************************
|
|
97711
|
-
@InputType()
|
|
97712
|
-
export class UpdateMJWorkflowRunInput {
|
|
97713
|
-
@Field()
|
|
97714
|
-
ID: string;
|
|
97715
|
-
|
|
97716
|
-
@Field({ nullable: true })
|
|
97717
|
-
WorkflowID?: string;
|
|
97718
|
-
|
|
97719
|
-
@Field({ nullable: true })
|
|
97720
|
-
ExternalSystemRecordID?: string;
|
|
97721
|
-
|
|
97722
|
-
@Field({ nullable: true })
|
|
97723
|
-
StartedAt?: Date;
|
|
97724
|
-
|
|
97725
|
-
@Field({ nullable: true })
|
|
97726
|
-
EndedAt?: Date | null;
|
|
97727
|
-
|
|
97728
|
-
@Field({ nullable: true })
|
|
97729
|
-
Status?: string;
|
|
97730
|
-
|
|
97731
|
-
@Field({ nullable: true })
|
|
97732
|
-
Results?: string | null;
|
|
97733
|
-
|
|
97734
|
-
@Field(() => [KeyValuePairInput], { nullable: true })
|
|
97735
|
-
OldValues___?: KeyValuePairInput[];
|
|
97736
|
-
|
|
97737
|
-
@Field(() => RestoreContextInput, { nullable: true })
|
|
97738
|
-
RestoreContext___?: RestoreContextInput;
|
|
97739
|
-
}
|
|
97740
|
-
|
|
97741
|
-
//****************************************************************************
|
|
97742
|
-
// RESOLVER for MJ: Workflow Runs
|
|
97743
|
-
//****************************************************************************
|
|
97744
|
-
@ObjectType()
|
|
97745
|
-
export class RunMJWorkflowRunViewResult {
|
|
97746
|
-
@Field(() => [MJWorkflowRun_])
|
|
97747
|
-
Results: MJWorkflowRun_[];
|
|
97748
|
-
|
|
97749
|
-
@Field(() => String, {nullable: true})
|
|
97750
|
-
UserViewRunID?: string;
|
|
97751
|
-
|
|
97752
|
-
@Field(() => Int, {nullable: true})
|
|
97753
|
-
RowCount: number;
|
|
97754
|
-
|
|
97755
|
-
@Field(() => Int, {nullable: true})
|
|
97756
|
-
TotalRowCount: number;
|
|
97757
|
-
|
|
97758
|
-
@Field(() => Int, {nullable: true})
|
|
97759
|
-
ExecutionTime: number;
|
|
97760
|
-
|
|
97761
|
-
@Field({nullable: true})
|
|
97762
|
-
ErrorMessage?: string;
|
|
97763
|
-
|
|
97764
|
-
@Field(() => Boolean, {nullable: false})
|
|
97765
|
-
Success: boolean;
|
|
97766
|
-
}
|
|
97767
|
-
|
|
97768
|
-
@Resolver(MJWorkflowRun_)
|
|
97769
|
-
export class MJWorkflowRunResolver extends ResolverBase {
|
|
97770
|
-
@Query(() => RunMJWorkflowRunViewResult)
|
|
97771
|
-
async RunMJWorkflowRunViewByID(@Arg('input', () => RunViewByIDInput) input: RunViewByIDInput, @Ctx() { providers, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
97772
|
-
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
97773
|
-
return super.RunViewByIDGeneric(input, provider, userPayload, pubSub);
|
|
97774
|
-
}
|
|
97775
|
-
|
|
97776
|
-
@Query(() => RunMJWorkflowRunViewResult)
|
|
97777
|
-
async RunMJWorkflowRunViewByName(@Arg('input', () => RunViewByNameInput) input: RunViewByNameInput, @Ctx() { providers, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
97778
|
-
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
97779
|
-
return super.RunViewByNameGeneric(input, provider, userPayload, pubSub);
|
|
97780
|
-
}
|
|
97781
|
-
|
|
97782
|
-
@Query(() => RunMJWorkflowRunViewResult)
|
|
97783
|
-
async RunMJWorkflowRunDynamicView(@Arg('input', () => RunDynamicViewInput) input: RunDynamicViewInput, @Ctx() { providers, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
97784
|
-
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
97785
|
-
input.EntityName = 'MJ: Workflow Runs';
|
|
97786
|
-
return super.RunDynamicViewGeneric(input, provider, userPayload, pubSub);
|
|
97787
|
-
}
|
|
97788
|
-
@Query(() => MJWorkflowRun_, { nullable: true })
|
|
97789
|
-
async MJWorkflowRun(@Arg('ID', () => String) ID: string, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine): Promise<MJWorkflowRun_ | null> {
|
|
97790
|
-
this.CheckUserReadPermissions('MJ: Workflow Runs', userPayload);
|
|
97791
|
-
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
97792
|
-
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwWorkflowRuns')} WHERE ${provider.QuoteIdentifier('ID')}=${provider.BuildParameterPlaceholder(0)} ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: Workflow Runs', userPayload, EntityPermissionType.Read, 'AND');
|
|
97793
|
-
const rows = await provider.ExecuteSQL(sSQL, [ID], undefined, this.GetUserFromPayload(userPayload));
|
|
97794
|
-
const result = await this.MapFieldNamesToCodeNames('MJ: Workflow Runs', rows && rows.length > 0 ? rows[0] : null, this.GetUserFromPayload(userPayload));
|
|
97795
|
-
return result;
|
|
97796
|
-
}
|
|
97797
|
-
|
|
97798
|
-
@Mutation(() => MJWorkflowRun_)
|
|
97799
|
-
async CreateMJWorkflowRun(
|
|
97800
|
-
@Arg('input', () => CreateMJWorkflowRunInput) input: CreateMJWorkflowRunInput,
|
|
97801
|
-
@Ctx() { providers, userPayload }: AppContext,
|
|
97802
|
-
@PubSub() pubSub: PubSubEngine
|
|
97803
|
-
) {
|
|
97804
|
-
const provider = GetReadWriteProvider(providers);
|
|
97805
|
-
return this.CreateRecord('MJ: Workflow Runs', input, provider, userPayload, pubSub)
|
|
97806
|
-
}
|
|
97807
|
-
|
|
97808
|
-
@Mutation(() => MJWorkflowRun_)
|
|
97809
|
-
async UpdateMJWorkflowRun(
|
|
97810
|
-
@Arg('input', () => UpdateMJWorkflowRunInput) input: UpdateMJWorkflowRunInput,
|
|
97811
|
-
@Ctx() { providers, userPayload }: AppContext,
|
|
97812
|
-
@PubSub() pubSub: PubSubEngine
|
|
97813
|
-
) {
|
|
97814
|
-
const provider = GetReadWriteProvider(providers);
|
|
97815
|
-
return this.UpdateRecord('MJ: Workflow Runs', input, provider, userPayload, pubSub);
|
|
97816
|
-
}
|
|
97817
|
-
|
|
97818
|
-
@Mutation(() => MJWorkflowRun_)
|
|
97819
|
-
async DeleteMJWorkflowRun(@Arg('ID', () => String) ID: string, @Arg('options___', () => DeleteOptionsInput) options: DeleteOptionsInput, @Ctx() { providers, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
97820
|
-
const provider = GetReadWriteProvider(providers);
|
|
97821
|
-
const key = new CompositeKey([{FieldName: 'ID', Value: ID}]);
|
|
97822
|
-
return this.DeleteRecord('MJ: Workflow Runs', key, options, provider, userPayload, pubSub);
|
|
97823
|
-
}
|
|
97824
|
-
|
|
97825
|
-
}
|
|
97826
|
-
|
|
97827
|
-
//****************************************************************************
|
|
97828
|
-
// ENTITY CLASS for MJ: Workflows
|
|
97829
|
-
//****************************************************************************
|
|
97830
|
-
@ObjectType({ description: `Defines automated workflows with steps, conditions, and actions for orchestrating complex business processes.` })
|
|
97831
|
-
export class MJWorkflow_ {
|
|
97832
|
-
@Field()
|
|
97833
|
-
@MaxLength(36)
|
|
97834
|
-
ID: string;
|
|
97835
|
-
|
|
97836
|
-
@Field()
|
|
97837
|
-
@MaxLength(100)
|
|
97838
|
-
Name: string;
|
|
97839
|
-
|
|
97840
|
-
@Field({nullable: true})
|
|
97841
|
-
Description?: string;
|
|
97842
|
-
|
|
97843
|
-
@Field()
|
|
97844
|
-
@MaxLength(36)
|
|
97845
|
-
WorkflowEngineID: string;
|
|
97846
|
-
|
|
97847
|
-
@Field({description: `The unique identifier of this workflow in an external system, used for synchronization with external workflow engines.`})
|
|
97848
|
-
@MaxLength(100)
|
|
97849
|
-
ExternalSystemRecordID: string;
|
|
97850
|
-
|
|
97851
|
-
@Field(() => Boolean, {description: `If set to 1, the workflow will be run automatically on the interval specified by the AutoRunIntervalType and AutoRunInterval fields`})
|
|
97852
|
-
AutoRunEnabled: boolean;
|
|
97853
|
-
|
|
97854
|
-
@Field({nullable: true, description: `Minutes, Hours, Days, Weeks, Months, Years`})
|
|
97855
|
-
@MaxLength(20)
|
|
97856
|
-
AutoRunIntervalUnits?: string;
|
|
97857
|
-
|
|
97858
|
-
@Field(() => Int, {nullable: true, description: `The interval, denominated in the units specified in the AutoRunIntervalUnits column, between auto runs of this workflow.`})
|
|
97859
|
-
AutoRunInterval?: number;
|
|
97860
|
-
|
|
97861
|
-
@Field({nullable: true, description: `If specified, this subclass key, via the ClassFactory, will be instantiated, to execute this workflow. If not specified the WorkflowBase class will be used by default.`})
|
|
97862
|
-
@MaxLength(200)
|
|
97863
|
-
SubclassName?: string;
|
|
97864
|
-
|
|
97865
|
-
@Field()
|
|
97866
|
-
_mj__CreatedAt: Date;
|
|
97867
|
-
|
|
97868
|
-
@Field()
|
|
97869
|
-
_mj__UpdatedAt: Date;
|
|
97870
|
-
|
|
97871
|
-
@Field(() => Int, {nullable: true})
|
|
97872
|
-
AutoRunIntervalMinutes?: number;
|
|
97873
|
-
|
|
97874
|
-
@Field(() => [MJReport_])
|
|
97875
|
-
MJReports_OutputWorkflowIDArray: MJReport_[]; // Link to MJReports
|
|
97876
|
-
|
|
97877
|
-
@Field(() => [MJWorkflowRun_])
|
|
97878
|
-
MJWorkflowRuns_WorkflowIDArray: MJWorkflowRun_[]; // Link to MJWorkflowRuns
|
|
97879
|
-
|
|
97880
|
-
}
|
|
97881
|
-
|
|
97882
|
-
//****************************************************************************
|
|
97883
|
-
// INPUT TYPE for MJ: Workflows
|
|
97884
|
-
//****************************************************************************
|
|
97885
|
-
@InputType()
|
|
97886
|
-
export class CreateMJWorkflowInput {
|
|
97887
|
-
@Field({ nullable: true })
|
|
97888
|
-
ID?: string;
|
|
97889
|
-
|
|
97890
|
-
@Field({ nullable: true })
|
|
97891
|
-
Name?: string;
|
|
97892
|
-
|
|
97893
|
-
@Field({ nullable: true })
|
|
97894
|
-
Description: string | null;
|
|
97895
|
-
|
|
97896
|
-
@Field({ nullable: true })
|
|
97897
|
-
WorkflowEngineID?: string;
|
|
97898
|
-
|
|
97899
|
-
@Field({ nullable: true })
|
|
97900
|
-
ExternalSystemRecordID?: string;
|
|
97901
|
-
|
|
97902
|
-
@Field(() => Boolean, { nullable: true })
|
|
97903
|
-
AutoRunEnabled?: boolean;
|
|
97904
|
-
|
|
97905
|
-
@Field({ nullable: true })
|
|
97906
|
-
AutoRunIntervalUnits: string | null;
|
|
97907
|
-
|
|
97908
|
-
@Field(() => Int, { nullable: true })
|
|
97909
|
-
AutoRunInterval: number | null;
|
|
97910
|
-
|
|
97911
|
-
@Field({ nullable: true })
|
|
97912
|
-
SubclassName: string | null;
|
|
97913
|
-
|
|
97914
|
-
@Field(() => RestoreContextInput, { nullable: true })
|
|
97915
|
-
RestoreContext___?: RestoreContextInput;
|
|
97916
|
-
}
|
|
97917
|
-
|
|
97918
|
-
|
|
97919
|
-
//****************************************************************************
|
|
97920
|
-
// INPUT TYPE for MJ: Workflows
|
|
97921
|
-
//****************************************************************************
|
|
97922
|
-
@InputType()
|
|
97923
|
-
export class UpdateMJWorkflowInput {
|
|
97924
|
-
@Field()
|
|
97925
|
-
ID: string;
|
|
97926
|
-
|
|
97927
|
-
@Field({ nullable: true })
|
|
97928
|
-
Name?: string;
|
|
97929
|
-
|
|
97930
|
-
@Field({ nullable: true })
|
|
97931
|
-
Description?: string | null;
|
|
97932
|
-
|
|
97933
|
-
@Field({ nullable: true })
|
|
97934
|
-
WorkflowEngineID?: string;
|
|
97935
|
-
|
|
97936
|
-
@Field({ nullable: true })
|
|
97937
|
-
ExternalSystemRecordID?: string;
|
|
97938
|
-
|
|
97939
|
-
@Field(() => Boolean, { nullable: true })
|
|
97940
|
-
AutoRunEnabled?: boolean;
|
|
97941
|
-
|
|
97942
|
-
@Field({ nullable: true })
|
|
97943
|
-
AutoRunIntervalUnits?: string | null;
|
|
97944
|
-
|
|
97945
|
-
@Field(() => Int, { nullable: true })
|
|
97946
|
-
AutoRunInterval?: number | null;
|
|
97947
|
-
|
|
97948
|
-
@Field({ nullable: true })
|
|
97949
|
-
SubclassName?: string | null;
|
|
97950
|
-
|
|
97951
|
-
@Field(() => [KeyValuePairInput], { nullable: true })
|
|
97952
|
-
OldValues___?: KeyValuePairInput[];
|
|
97953
|
-
|
|
97954
|
-
@Field(() => RestoreContextInput, { nullable: true })
|
|
97955
|
-
RestoreContext___?: RestoreContextInput;
|
|
97956
|
-
}
|
|
97957
|
-
|
|
97958
|
-
//****************************************************************************
|
|
97959
|
-
// RESOLVER for MJ: Workflows
|
|
97960
|
-
//****************************************************************************
|
|
97961
|
-
@ObjectType()
|
|
97962
|
-
export class RunMJWorkflowViewResult {
|
|
97963
|
-
@Field(() => [MJWorkflow_])
|
|
97964
|
-
Results: MJWorkflow_[];
|
|
97965
|
-
|
|
97966
|
-
@Field(() => String, {nullable: true})
|
|
97967
|
-
UserViewRunID?: string;
|
|
97968
|
-
|
|
97969
|
-
@Field(() => Int, {nullable: true})
|
|
97970
|
-
RowCount: number;
|
|
97971
|
-
|
|
97972
|
-
@Field(() => Int, {nullable: true})
|
|
97973
|
-
TotalRowCount: number;
|
|
97974
|
-
|
|
97975
|
-
@Field(() => Int, {nullable: true})
|
|
97976
|
-
ExecutionTime: number;
|
|
97977
|
-
|
|
97978
|
-
@Field({nullable: true})
|
|
97979
|
-
ErrorMessage?: string;
|
|
97980
|
-
|
|
97981
|
-
@Field(() => Boolean, {nullable: false})
|
|
97982
|
-
Success: boolean;
|
|
97983
|
-
}
|
|
97984
|
-
|
|
97985
|
-
@Resolver(MJWorkflow_)
|
|
97986
|
-
export class MJWorkflowResolver extends ResolverBase {
|
|
97987
|
-
@Query(() => RunMJWorkflowViewResult)
|
|
97988
|
-
async RunMJWorkflowViewByID(@Arg('input', () => RunViewByIDInput) input: RunViewByIDInput, @Ctx() { providers, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
97989
|
-
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
97990
|
-
return super.RunViewByIDGeneric(input, provider, userPayload, pubSub);
|
|
97991
|
-
}
|
|
97992
|
-
|
|
97993
|
-
@Query(() => RunMJWorkflowViewResult)
|
|
97994
|
-
async RunMJWorkflowViewByName(@Arg('input', () => RunViewByNameInput) input: RunViewByNameInput, @Ctx() { providers, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
97995
|
-
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
97996
|
-
return super.RunViewByNameGeneric(input, provider, userPayload, pubSub);
|
|
97997
|
-
}
|
|
97998
|
-
|
|
97999
|
-
@Query(() => RunMJWorkflowViewResult)
|
|
98000
|
-
async RunMJWorkflowDynamicView(@Arg('input', () => RunDynamicViewInput) input: RunDynamicViewInput, @Ctx() { providers, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
98001
|
-
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
98002
|
-
input.EntityName = 'MJ: Workflows';
|
|
98003
|
-
return super.RunDynamicViewGeneric(input, provider, userPayload, pubSub);
|
|
98004
|
-
}
|
|
98005
|
-
@Query(() => MJWorkflow_, { nullable: true })
|
|
98006
|
-
async MJWorkflow(@Arg('ID', () => String) ID: string, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine): Promise<MJWorkflow_ | null> {
|
|
98007
|
-
this.CheckUserReadPermissions('MJ: Workflows', userPayload);
|
|
98008
|
-
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
98009
|
-
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwWorkflows')} WHERE ${provider.QuoteIdentifier('ID')}=${provider.BuildParameterPlaceholder(0)} ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: Workflows', userPayload, EntityPermissionType.Read, 'AND');
|
|
98010
|
-
const rows = await provider.ExecuteSQL(sSQL, [ID], undefined, this.GetUserFromPayload(userPayload));
|
|
98011
|
-
const result = await this.MapFieldNamesToCodeNames('MJ: Workflows', rows && rows.length > 0 ? rows[0] : null, this.GetUserFromPayload(userPayload));
|
|
98012
|
-
return result;
|
|
98013
|
-
}
|
|
98014
|
-
|
|
98015
|
-
@FieldResolver(() => [MJReport_])
|
|
98016
|
-
async MJReports_OutputWorkflowIDArray(@Root() mjworkflow_: MJWorkflow_, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
98017
|
-
this.CheckUserReadPermissions('MJ: Reports', userPayload);
|
|
98018
|
-
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
98019
|
-
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwReports')} WHERE ${provider.QuoteIdentifier('OutputWorkflowID')}=${provider.BuildParameterPlaceholder(0)} ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: Reports', userPayload, EntityPermissionType.Read, 'AND');
|
|
98020
|
-
const rows = await provider.ExecuteSQL(sSQL, [mjworkflow_.ID], undefined, this.GetUserFromPayload(userPayload));
|
|
98021
|
-
const result = await this.ArrayMapFieldNamesToCodeNames('MJ: Reports', rows, this.GetUserFromPayload(userPayload));
|
|
98022
|
-
return result;
|
|
98023
|
-
}
|
|
98024
|
-
|
|
98025
|
-
@FieldResolver(() => [MJWorkflowRun_])
|
|
98026
|
-
async MJWorkflowRuns_WorkflowIDArray(@Root() mjworkflow_: MJWorkflow_, @Ctx() { userPayload, providers }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
98027
|
-
this.CheckUserReadPermissions('MJ: Workflow Runs', userPayload);
|
|
98028
|
-
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
98029
|
-
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView(Metadata.Provider.ConfigData.MJCoreSchemaName, 'vwWorkflowRuns')} WHERE ${provider.QuoteIdentifier('WorkflowID')}=${provider.BuildParameterPlaceholder(0)} ` + this.getRowLevelSecurityWhereClause(provider, 'MJ: Workflow Runs', userPayload, EntityPermissionType.Read, 'AND');
|
|
98030
|
-
const rows = await provider.ExecuteSQL(sSQL, [mjworkflow_.ID], undefined, this.GetUserFromPayload(userPayload));
|
|
98031
|
-
const result = await this.ArrayMapFieldNamesToCodeNames('MJ: Workflow Runs', rows, this.GetUserFromPayload(userPayload));
|
|
98032
|
-
return result;
|
|
98033
|
-
}
|
|
98034
|
-
|
|
98035
|
-
@Mutation(() => MJWorkflow_)
|
|
98036
|
-
async CreateMJWorkflow(
|
|
98037
|
-
@Arg('input', () => CreateMJWorkflowInput) input: CreateMJWorkflowInput,
|
|
98038
|
-
@Ctx() { providers, userPayload }: AppContext,
|
|
98039
|
-
@PubSub() pubSub: PubSubEngine
|
|
98040
|
-
) {
|
|
98041
|
-
const provider = GetReadWriteProvider(providers);
|
|
98042
|
-
return this.CreateRecord('MJ: Workflows', input, provider, userPayload, pubSub)
|
|
98043
|
-
}
|
|
98044
|
-
|
|
98045
|
-
@Mutation(() => MJWorkflow_)
|
|
98046
|
-
async UpdateMJWorkflow(
|
|
98047
|
-
@Arg('input', () => UpdateMJWorkflowInput) input: UpdateMJWorkflowInput,
|
|
98048
|
-
@Ctx() { providers, userPayload }: AppContext,
|
|
98049
|
-
@PubSub() pubSub: PubSubEngine
|
|
98050
|
-
) {
|
|
98051
|
-
const provider = GetReadWriteProvider(providers);
|
|
98052
|
-
return this.UpdateRecord('MJ: Workflows', input, provider, userPayload, pubSub);
|
|
98053
|
-
}
|
|
98054
|
-
|
|
98055
|
-
@Mutation(() => MJWorkflow_)
|
|
98056
|
-
async DeleteMJWorkflow(@Arg('ID', () => String) ID: string, @Arg('options___', () => DeleteOptionsInput) options: DeleteOptionsInput, @Ctx() { providers, userPayload }: AppContext, @PubSub() pubSub: PubSubEngine) {
|
|
98057
|
-
const provider = GetReadWriteProvider(providers);
|
|
98058
|
-
const key = new CompositeKey([{FieldName: 'ID', Value: ID}]);
|
|
98059
|
-
return this.DeleteRecord('MJ: Workflows', key, options, provider, userPayload, pubSub);
|
|
98060
|
-
}
|
|
98061
|
-
|
|
98062
|
-
}
|
|
98063
|
-
|
|
98064
96135
|
//****************************************************************************
|
|
98065
96136
|
// ENTITY CLASS for MJ: Workspace Items
|
|
98066
96137
|
//****************************************************************************
|